1、首先安装php环境

2、使用phpinfo()函数查看PHP的版本信息,这会决定扩展文件版本


3、根据PHP版本号,编译器版本号和CPU架构,
选择php_redis-2.2.5-5.5-ts-vc11-x86.zip和php_igbinary-1.2.1-5.5-ts-vc11-x86.zip
下载地址:
http://windows.php.net/downloads/pecl/snaps/redis/2.2.5/

4、解压缩后,将php_redis.dll拷贝至php的ext目录下

5、修改php.ini,在该文件中加入:
; php_redis
extension=php_redis.dll

6、重启Apache后,使用phpinfo查看扩展是否成功安装

7、新建一个test.php页面
<?php
$redis=new Redis();
$redis->connect('192.168.1.11',6379);
$redis->auth('123456');
$redis->set('test','helloworld');
echo $redis->get('test');
?>
