CentOS 7下,升级VestaCP的PHP版本到PHP 7.0 或 PHP 7.1

VestaCP,相当稳定、支持多用户的web面板,最新添加了一键安装应用的功能,很是实用,详情:VestaCP:WEB管理、支持PHP5.6、Nginx、Apache、DNS、Mail等的VPS面板。下面是把PHP版本升级到PHP 7.0 或 PHP 7.1。

1、更新源

wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
wget http://rpms.remirepo.net/enterprise/remi-release-7.rpm
rpm -Uvh remi-release-7.rpm epel-release-latest-7.noarch.rpm
yum --enablerepo=remi update remi-release

2、停止httpd并删除php默认版本

service php-fpm stop
service httpd stop
yum -y remove php

3、安装PHP 7.0 或 PHP 7.1
a、安装PHP 7.0

yum --enablerepo=remi-php70 install php70-php php70-php-pear php70-php-bcmath php70-php-pecl-jsond-devel php70-php-mysqlnd php70-php-gd php70-php-common php70-php-fpm php70-php-intl php70-php-cli php70-php php70-php-xml php70-php-opcache php70-php-pecl-apcu php70-php-pecl-jsond php70-php-pdo php70-php-gmp php70-php-process php70-php-pecl-imagick php70-php-devel php70-php-mbstring php70-php-pecl-zip php70-php-snmp -y

b、安装PHP 7.1

yum -y --enablerepo=remi-php71 install php php-pear php-bcmath php-mysqlnd php-gd php-common php-fpm php-intl php-cli php-xml php-pecl-apcu php-pdo php-gmp php-process php-pecl-imagick php-devel php-mbstring

4、安装memcache、opcache
适用于PHP 7.0

yum -y --enablerepo=remi-php70 install php-opcache php-memcache

适用于PHP 7.1

yum -y --enablerepo=remi-php71 install php-opcache php-memcache

5、重启php-fpm 或 httpd

启动httpd(Apache)

service httpd start

启动php-fpm(Nginx)

service php-fpm start

via:http://www.wangjunwei.com/website/vestacp/635.html、https://sadsu.com/?p=22

    所有主机信息仅是为及时分享并收录,不做推荐!
    专门搜集、分享国内高速、稳定的香港、日本、韩国、新加坡、美西CN2等优质线路的主机:FastVM