首页 > TAG信息列表 > webtatic
PHP-PHP升级
开始升级PHP 查看版本 修订记录 版本 是否发布 2020-09-23 v1.0 否 CentOS7下安装PHP默认是5.4的,但是有些框架要求PHP的版本得在5.4以上,现在的框架大多要求php7以上的,比如typo3.8.x,必须7.0+;typo3.9.x,必须php7.2+。这时候我们就需要把PHP升级一下了。 yum provides phyum makecache报错Error: Cannot retrieve repository metadata (repomd.xml)
yum makecache报错: Error: Cannot retrieve repository metadata (repomd.xml) for repository: epel. Please verify its path and try again 解决办法: vim /etc/yum.repos.d/epel.repo 修改文件中的 [epel] 部分,把 enabled=1 改为 enabled=0 [epel] name=Extra PackagCentOs使用yum快速安装php环境
首先 yum install epel-release -y rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 2、清除历史版本 yum -y remove php* 3、安装需要的扩展包 yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel 4。启动 systemctl enableyum安装php7
1.因为安装php7需要2个额外的源,epel和webtatic,所以都要安装一下。 yum install epel-release -y rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 2.清除历史版本避免错误 yum -y remove php* 3.安装php7 yum -y install php72w php72w-cli php72w-fpm安装php时无法添加webtatic源
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm [root@web01 ~]# yum repolist all 没看到有webtatic源试了很多次都装不了源 解决: #rpm -qa |grep webtatic 查看 #rpm -e 删除上面搜的包 #rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-releasecentos7下php环境配置
php7源: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm yum -y install php72w php72w-cli php72w-fpm php72w-common php72w-devel php72w-embedded php72w-gd php72centos安装php7
https://webtatic.com/packages/php71/ # centos6 yum install epel-release rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm # centos7 yum install epel-release rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpmcentos7下安装php5.6
8 yum provides php #自带的只有5.4版本 9 rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm #更新源 10 rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 11 yum remove php-commonCentos7下 升级php5.4到7.1 yum安装
查看当前 PHP 版本 1 php -v 查看当前 PHP 相关的安装包,删除之 1 2 3 4 5 yum list installed | grep php yum remove php yum remove php-* 更换 RPM 源 1 2 3 4 5 6 7 8 9 #Centos 5.X: rpm -Uvh http://mirror.weyum升级php版本
查看当前 PHP 版本 1 php -v 查看当前 PHP 相关的安装包,删除之 1 2 3 4 5 yum list installed | grep php yum remove php yum remove php-* 更换 RPM 源 1 2 3 4 5 6 7 8 9 #Centos 5.X: rpm -Uvh http://mirror.weLinux用yum安装php7环境踩过的坑
网上很多方案,使用yum安装一般采用下面的方法(此种方法有可能会安装不成功);安装epel-releaserpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm (由于网站原因、防火墙、iptables受限等原因,会报 curl: (7) Failed connect to dl.fed