下载: https://pecl.php.net/package/redis 步骤参考 https://blog.51cto.com/13293070/2414489 cd /usr/local sudo sh -c 'yum -y install autoconf' wget http://pecl.php.net/get/redis-4.2.0.tgz tar -zxvf redis-4.2.0.tgz cd redis-4.2.0 /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php5.6.40/bin/php-config make make install ll /usr/local/php5.6.40/lib/php/extensions/no-debug-non-zts-20131226/ 修改配置文件 参考: https://blog.csdn.net/haiqiao_2010/article/details/46005841 在php.ini中找到extension_dir字段,把值修改成: /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212/ 再在php.ini的Dynamic Extensions节位置下添加 extension = "imap.so"
相关位置
redis-PHP 测试页面
redis测试页面 [root@instance-1 qifa]# sudo cat redistest.php <?php $redis = new Redis(); $redis->connect('127.0.0.1',6389); $redis->auth('gsmcredis'); $redis->set('name','redisok'); echo $redis->get('name'); ?>