Php redis extension installation, configuration, usage summary, redis Summary
The system is a lamp environment (centos6.7 + apache2.2 + mysql5.7 + php5.3). The default value is
Download the software to the/usr/local/src directory. Install redis in 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
Install 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 # generate the configure configuration file
The configuration file is generated as follows:
[Root @ localhost phpredis-2.2.4] #/app/local/php/bin/phpize locking ing:
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
Generate the extension file
Installing shared extensions:/app/local/php/lib/php/extensions/no-debug-non-zts-20090626/
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, check whether the redis extension is loaded in phpinfo.
As shown in: