Page 1 of 1

Обновление php-fm 7.x

Posted: Mon Apr 09, 2018 8:31 pm
by aligan
Установил vestacp (ngnix+hp-fm). По умолчанию стоит php 5.6, а мне для корректной работы нужен php 7. Как обновить? ОС CentOS 7

Re: Обновление php-fm 7.x

Posted: Mon Apr 09, 2018 8:46 pm
by artscripts
Upgrading PHP
We’ve wrote a much more detailed post on how to do this before, we’ll go over it quickly here too.

Make sure everything is up to date.

Code: Select all

sudo yum update
Now install yum-utils so that we can replace the currently installed version of PHP.

Code: Select all

sudo yum install yum-utils
This is where Remi is used, you should have installed it with VestaCP but if not do this first then continue.

Enable the PHP 7 in Remi.

Code: Select all

sudo yum-config-manager --enable remi-php70
Now update Yum to apply the change.

Code: Select all

sudo yum update
Restart PHP.

Code: Select all

sudo service php-fpm restart
Check the new version that you have installed.

Code: Select all

php -v
Now disable the old versions of PHP.

Code: Select all

sudo yum-config-manager --disable remi-php56 && sudo yum-config-manager --disable remi-php55 && sudo yum-config-manager --disable remi-php56-debuginfo && sudo yum-config-manager --disable remi-php55-debuginfo
sudo yum clean all 
sudo yum update