PHP Installation 7 CENTOS and the panel VESTACP
I was looking for a long time the possibility of installing php 7.X for Centosa7 and panel vestacp.
Us alone installer installs PHP version 5.6 because that is the default repositories.
I was able to run without invasive php7 on a server with CentOS and the whole comes down to perform several commands.
We can replace php with this method 5.6 version 7.0.X or 7.1.X
We start by updating:
1 | yum update |
Then we check the currently installed version of php:
1 | php -v |
Installing the necessary package:
1 | sudo yum install yum-utils |
Then we add a dependent repository which version of php we want to install:
Dla PHP 7.1
1 | yum-config-manager --enable remi-php71 |
dla PHP 7.0.X
1 | yum-config-manager --enable remi-php70 |
Then we update:
1 | yum update |
When everything went well, we restart the services: php, httpd oraz nginx:
HTTPD:
1 | sudo service httpd restart |
PHP i Nginx:
1 | sudo service php-fpm restart && sudo service nginx restart |
Again, we can check the php version with the command
1 | php -v |
Instead of the version 5.6 we should see the chosen version of php:
1 2 3 | PHP 7.1.8 (cli) (built: Aug 2 2017 12:13:05) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies |