Install php 5.6 and redis extension in CentOS 6.x
Install PHP 5.6
#yumcleanall
# Yumupdate upgrade the yum package
#yuminstall-yepel-release
# Yumlistinstalled | PHP installed during grepphp check
#rpm-Uvhhttp://mirror.webtatic.com/yum/el6/latest.rpm
#yum-yinstallphp56w.x86_64
#yum-y--enablerepo=webtaticinstallphp56w-devel
#yum-yinstallphp56w-xml.x86_64php56w-gd.x86_64php56w-ldap.x86_64php56w-mbstring.x86_64php56w-mcrypt.x86_64php56w-mysql.x86_64php56w-pdo.x86_64php56w-opcache.x86_64
#yum-yinstallphp56w-fpm
# Chkconfigphp-fpmon Automatic startup
#/Etc/init. d/php-fpmstart Start Process
# Php-v check whether the installation is successful
Note 1: If you want to change to php5.5 or 5.4, you can change the 56 W to 55 W or 54w;
NOTE 2: php-opcache and php-xcache can effectively improve the php Execution speed;
Installing php extensions is not very troublesome. The main steps are as follows:
1) Use phpize in the client folder of the extension module to generate a configure file;
2) execute the configure file, followed by the php path;
3) add the "module. so" file name to the php. ini file and restart the php-fpm process;
4) use the so file to call the client of the extension module to connect to the corresponding module;
Install redis Extension
# Redis-cli-v check whether redis is installed
#redis-server-v
#wgethttp://pecl.php.net/get/redis-2.2.8.tgz
#tar-zxvfredis-2.2.8.tgz
#cdredis-2.2.8
# Phpize is a specialized php extension tool. This command must be used in the main directory of the php module folder. The error Cannotfindconfig. m4 is reported here. Because phpize should be placed under the module folder according to the module configuration file generated by the module
#./configure--with-php-config=/usr/bin/php-config
#make&&makeinstall
#maketest
# Vim/etc/php. ini Add "extension =" redis. so "in php. ini ""
#servicephp-fpmrestart