找到网上资源:https://pecl.php.net/package/redis
wget https://pecl.php.net/get/redis-3.1.1.tgz
tar -zxvf redis-3.1.1.tgz
cd redis-3.1.1
我的php目录、/web/php
/web/php/bin/phpize
./configure --with-php-config=/web/php/bin/php-config
make
make test
make install
我的extension_dir /web/php/include/php/ext
cp /web/php/lib/extensions/no-debug-zts-20131226/redis.so /web/php/include/php/ext/
vi /web/php/lib/php.ini
增加extension=redis.so
重启服务
service httpd restart
查看phpinfo,扩展已经有了。