yum list installed | grep php
Delete the existing php version first, execute the following command to delete php
yum remove php-common
Then you are asked if you want to continue like the installation, just type yes
Add yum source
Source of CentOS 6.x
CentOS 7.x source
Install PHP
Note: Install version 5.6 as remi-php56, install version 5.5 as remi-php55
View PHP version
PHP 5.6.18 (cli) (built: Feb 3 2016 10:25:33)
Copyright (c) 1997-2016 The PHP Group
vi /usr/local/php/etc/php-fpm.conf
The php-fpm.pid directory must point to: /usr/local/php/var/run/php-fpm.pid
cp /home/soft/php-5.3.15/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
chmod 755 /etc/init.d/php-fpm
/etc/init.d/php-fpm start
chkconfig –add php-fpm
Finally, give php-fpm start, stop and restart as a service:
service php-fpm start
service php-fpm stop
service php-fpm reload
( adsbygoogle = window.adsbygoogle || []).push({});
Recommended Posts