php7安装(php5升级到php7)

PHP admin 132℃ 0评论

查看当前 PHP 版本

php -v

如果不是7,则删除

yum list installed | grep php
 
yum remove php
 
yum remove php-*

更换 RPM 源

#Centos 5.X:
rpm -Uvh http://mirror.webtatic.com/yum/el5/latest.rpm
 
#CentOs 6.x:
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
 
#CentOs 7.X:
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

安装php7

yum install -y php71w php71w-cli php71w-common php71w-devel php71w-embedded php71w-fpm php71w-gd php71w-mbstring php71w-mysqlnd php71w-opcache php71w-pdo php71w-xml php71w-ldap php71w-mcrypt

再次检查版本

php -v

启动PHP-fpm

systemctl start php-fpm

 

转载请注明:朋克网 » php7安装(php5升级到php7)

喜欢 (0)
发表我的评论
取消评论
表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址