Testing Some data on the test machine needs to use the redis extension, lazy yum installed PHP, previously yum install php-pecl-redis.x86_64 can be installed extensions, this time cannot find the installation package, do not toss the manual installation.
1. Download Phpredis
Cd/usr/local/src
wget https://github.com/nicolasff/phpredis/archive/2.2.4.tar.gz
TAR-ZXVF 2.2.4.tar.gz
CD phpredis-2.2.4/
2. Generate configure configuration file with Phpize
/usr/bin/phpize #会生成几个新文件, the default installation path is customized according to the custom path;
./configure--with-php-config=/usr/bin/php-config
Make #编译
Make install #安装
Make Test #测试
3. Configure PHP Support
Vim/usr/local/php/etc/php.ini #编辑配置文件, add the following on the last line
extension= "Redis.so"
4.
Restart HTTP load View phpinfo information:
Redis
Redis supportenabled
Redis Version2.2.4
Success!
PHP Redis Extensions