centos lanmp环境php5升级为php7
更新yum repo
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum clean all
yum make cache
yum repolist 查看是否有webtatic源
卸载现有版本的php
systemctl stop php-fpm
yum -y remove php*
安装新的php7及对应的扩展
yum install libxml2-devel gd-devel freetype-devel libmcrypt-devel curl curl-devel
yum install php70w-fpm.x86_64 php70w-common.x86_64 php70w-devel.x86_64
yum install php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysqlnd.x86_64
yum install php70w-pdo.x86_64 php70w-pgsql.x86_64
启动新有的php环境
systemctl start php-fpm
ss -tnlp 查看9000端口,确认php-fpm已经工作
php-fpm -v 查看现在php的版本
网友评论