Configure the Environment:
Virtual machines: VMware Workstation 12.0; system: CentOS;
PHP and Apache are installed
Php
PHP configuration file:/etc/php.ini
www directory:/var/www (project to be placed under WWW under the HTML directory)
Apache
Apache Installation path:/ETC/HTTPD
"1" Download Phpredis's installation package
to the http://redis.io/clients#php download, select Phpredis, click the link to download the installation package
"2" uses xftpportable to connect to the virtual machine and place the downloaded package on the virtual machine system via the local physical machine
"3" Decompression: Unzip the installation package with the TAR-XZVF phpredis-develop.tar.gz command
"4" into the extracted directory using the phpize command to compile
"5" Using Configure
If the following problem occurs:
./configure--with-php-c/local/php/bin/php-config
-bash:./configure:no such file or directory
The error shown is due to php-config path error, with sudo find-name php-config can be detected
Execute one more instruction:./configure--with-php-c/bin/php-config
"6" compile make and install make install, php.ini add extension= "redis.so", restart Apache
"7" Test
Create a new test.php file under the/www/html directory
in the physical machine browser address bar type: virtual machine ip/test.php
Show Redis indicates a successful installation of the Redis extension
The above describes the installation of CentOS under the Phpredis extension, including the centos,redis aspects of the content, I hope that the PHP tutorial interested in a friend helpful.