Home >Backend Development >PHP Tutorial >Install PHP5.6 instance on CentOS
This article mainly shares with you CentOS installation PHP5.6 examples, hoping to help everyone.
Configure yum source
Add the epel and remi sources of CentOS 6.5
rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpmrpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
The source of CentOS 7.0
yum install epel-releaserpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
Use the yum list command to view available Installed package (Packege)
yum list --enablerepo=remi --enablerepo=remi-php56 | grep php
Install PHP5.6
yum install --enablerepo=remi --enablerepo=remi-php56 php php-opcache php-devel php-mbstring php-mcrypt php-mysqlnd php-phpunit-PHPUnit php-pecl-xdebug php-pecl-xhprof
Use PHP command to check the version
php --version
The version installed here is PHP5. 6.34, careful users may have discovered that ZendGuardLoader has become Zend OPcahe.
Starting from PHP5.5, the PHP code cache has changed from APC to Zend OPcache.
If you configure nginx, you also need to install php-fpm
yum install --enablerepo=remi --enablerepo=remi-php56 php-fpm
Start the PHP-FPM service on the CentOS 6 system
service php-fpm start
Related recommendations:
centOs install and build php environment
The above is the detailed content of Install PHP5.6 instance on CentOS. For more information, please follow other related articles on the PHP Chinese website!