升级VestaCP面板PHP版本至PHP7.x

升级VestaCP面板PHP版本准备工作

演示环境 VestaCP by Centos7.6

1、备份数据

2、查看当前PHP版本(php -v)

执行VestaCP面板面板升级

1、安装repo PHP7依赖扩展

wget http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm

2、更新和升级

yum --enablerepo=remi update remi-release

3、暂停apache以及卸载php

service httpd stop
yum -y remove php

4、安装PHP7.2必备软件支持

memcached,这个扩展需要 libmemcached 客户端库

yum install libmemcached libmemcached-devel
yum --enablerepo=remi-php72 install php72-php php72-php-pear php72-php-bcmath php72-php-pecl-jsond-devel php72-php-mysqlnd php72-php-gd php72-php-common php72-php-fpm php72-php-intl php72-php-cli php72-php php72-php-xml php72-php-opcache php72-php-pecl-apcu php72-php-pecl-jsond php72-php-pdo php72-php-gmp php72-php-process php72-php-pecl-imagick php72-php-devel php72-php-mbstring php72-php-pecl-memcached

5、启动新PHP

service php-fpm stop
service php72-php-fpm start

6、设置软链接

rm /usr/bin/php
ln -s /usr/bin/php72 /usr/bin/php

7、启动生效

service httpd restart

8、查看PHP版本

php -v


本站应网安备相关要求规定全站关闭留言板,如您需要留言欢迎到本站镜像站进行留言
点击前往vas.ink



Last modification:September 26th, 2019 at 02:58 am
If you think my article is useful to you, please feel free to appreciate

Leave a Comment