偶然的你
1、php redis2、解压安装并进入redis目录[raykaeso@web ~]$ tar xzf redis-2.2.5.tgz[raykaeso@web ~]$ cd redis-2.2.53、在redis文件夹下,生成configure配置文件[raykaeso@web redis-2.2.5]$ /usr/local/php/bin/phpizeConfiguring for:PHP Api Version: 20090626Zend Module Api No: 20090626Zend Extension Api No: 220090626[raykaeso@web redis-2.2.5]$ ./configure –with-php-config=/usr/local/php/bin/php-config[raykaeso@web redis-2.2.5]$ make[raykaeso@web redis-2.2.5]$ make installInstalling shared extensions: /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/cp: cannot create regular file `/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/#INST@6338#': Permission deniedmake: *** [install-modules] Error 1注意:一定要用root用户。[raykaeso@web redis-2.2.5]$ suPassword:[root@web redis-2.2.5]# make install4、在php配置文件php.ini里面加载redis扩展extension=redis.so5、查看phpinfo,redis扩展是否加载redisRedis Support enabledRedis Version 2.2.5至此,redis扩展已经安装成功并加载,可以用php操作redis了。