System is the lamp environment (centos6.7+apache2.2+mysql5.7+php5.3), the default
Software download to the/USR/LOCAL/SRC directory Redis installed under the/app/local/redis directory
#wget http://download.redis.io/releases/redis-2.8.24.tar.gz
#tar ZXVF redis-2.8.24.tar.gz
#mkdir-P/app/local/redis
#cd redis-2.8.24
#make Prefix=/app/local/redis Install
Start Redis
#/app/local/redis/bin/redis-server
Then install the Phpredis extension
#wget https://github.com/nicolasff/phpredis/archive/2.2.4.tar.gz
#tar ZXVF 2.2.4.tar.gz
#cd phpredis-2.2.4
#/app/local/php/bin/phpize #生成configure配置文件
A configuration file is generated with the following instructions
[Email protected] phpredis-2.2.4]#/app/local/php/bin/phpize configuring for:
PHP Api version:20090626
Zend Module Api no:20090626
Zend Extension Api no:220090626
#./configure--with-php-config=/app/local/php/bin/php-config
#make && make Install
Last build Extension file
Installing Shared extensions:/app/local/php/lib/php/extensions/no-debug-non-zts-20090626/
Then configure PHP.ini
#vi/app/local/php/etc/php.ini
Add after extension
Extension=redis.so
: X
Restart Apache
#/app/local/apache/bin/apachectl restart
Finally, see if the Redis extension is loaded in phpinfo
As shown in the following:
PHP Redis Extensions installation, configuration, usage summary