Centos升级PHP5.4到7.x

March 8, 2022

PHP 7已经出来很长时间了,它的速度是php5.x的两倍,性能爆发啊,还不试试更新?

Centos 7.X 更新PHP方法:

SSH连接到你的服务器并执行以下命令:

sudo yum -y update 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

sudo yum install -y php70w php70w-opcache

Centos 6.X更新PHP方法:

SSH连接到你的服务器并执行以下命令:

sudo yum -y update

rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm

yum install -y php70w php70w-opcache 更新后可以写个以下info.php文件验证:

phpinfo();