1.下载phpredis,解压并进入目录,在目录下运行phpize
/usr/local/php/bin/phpize |
./configure --enable-redis-igbinary --with-php-config=/usr/local/php/bin/php-config |
make && make install |
如果提示:cannot find igbinary.h,需安装先安装igbinary
/usr/local/php/bin/phpize |
./configure --with-php-config=/usr/local/php/bin/php-config |
make && make install |
再执行第一步
Installing shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20151012/
2.在php.ini下添加extension="redis.so"