sudo yum install yum-utils
If it’s already installed, great move on to the next step, if not then allow it to install.

Now we can enable remi-php71

Code:
sudo yum-config-manager –enable remi-php71
Now we can tell yum to update, this will upgrade our old version of PHP to 7.1

Code:

yum -y --enablerepo=remi install php71-php php71-php-pear php71-php-bcmath php71-php-pecl-jsond-devel php71-php-mysqlnd php71-php-gd php71-php-common php71-php-fpm php71-php-intl php71-php-cli php71-php php71-php-xml php71-php-opcache php71-php-pecl-apcu php71-php-pecl-jsond php71-php-pdo php71-php-gmp php71-php-process php71-php-pecl-imagick php71-php-devel php71-php-mbstring
service php-fpm stop
yum -y --enablerepo=remi install php71-php php71-php-pear php71-php-bcmath php71-php-pecl-jsond-devel php71-php-mysqlnd php71-php-gd php71-php-common php71-php-fpm php71-php-intl php71-php-cli php71-php php71-php-xml php71-php-opcache php71-php-pecl-apcu php71-php-pecl-jsond php71-php-pdo php71-php-gmp php71-php-process php71-php-pecl-imagick php71-php-devel php71-php-mbstring
# Link new php to default binary
rm -f /usr/bin/php
ln -s /usr/bin/php71 /usr/bin/php
/opt/remi/php71/root/usr/bin/php-cgi
# Replace old PHP.ini with new one MAKE BACKUP BEFORE THAT IF YOU DO CHANGES.
rm -f /etc/php.ini
ln -s /etc/opt/remi/php71/php.ini /etc/php.ini

FOR FAST-CGI

mv /usr/bin/php-cgi /usr/bin/php56-cgi
ln -s /usr/bin/php71-cgi /usr/bin/php-cgi

 

sudo yum update
After the process has finished your server will now have PHP 7.1 installed, we need to restart our web server for it to take effect however.

If you have Apache and NGINX installed, or just Apache installed run

Code:
sudo service httpd restart
If you are running NGINX and PHP-FPM then run

sudo service php-fpm restart && sudo service nginx restart
Lastly we’ll check the PHP version like we did at the start

Code:
php -v

 

https://github.com/Niklan/Trash/blob/master/VestaCP/CentOS%20and%20PHP7.md

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Этот сайт использует Akismet для борьбы со спамом. Узнайте, как обрабатываются ваши данные комментариев.