1.下载redis压缩包(自己选择想要的版本,1,2地址任意选一个)

下载window版本地址1:https://github.com/dmajkic/redis/downloads
下载window版本地址2:https://github.com/lennyhuanga/redis-windows/tree/master/downloads

php 扩展下载直接使用对应的版本(php版本有nts和ts版本 :怎么看,通过echo PHPinfo()

查看配置信息里面Zend Extension Build或者HP Extension Build对应值里面是否有ts或者nts自己选择)

http://windows.php.net/downloads/pecl/releases/igbinary/
http://windows.php.net/downloads/pecl/snaps/redis/

下载zip解压到指定目录通过

dos命令:cd /d e:/你们的redis解压的目录/

针对redist2.5以上版本dos命令
将redis默认实例加入windows服务:
redis-server.exe --service-install redis.windows.conf --loglevel verbose

默认实例服务启动:redis-server --service-start

默认实例服务关闭:redis-server --service-stop

默认实例卸载:redis-server --service-uninstall

安装多个实例

redis.windows1.conf文件是拷贝redis目录里面的redis.windows.conf文件改的名称

实例为redis1 (可以自己取名称):

prot 端口10001(自己给)

安装redis1 实例服务:redis-server --service-install redis.windows1.conf --service-name redis1 --port 10001

redis1 实例服务启动:redis-server --service-start --service-name redis1 redis.windows1.conf
redis1 实例服务停止:redis-server --service-stop --service-name redis1 redis.windows1.conf
redis1 服务卸载:redis-server --service-uninstall --service-name redis1 redis.windows1.conf

windows自带的处理命令
sc delete 服务名称来卸载服务
net start ServiceName(服务名称)
net stop ServiceName(服务名称)

php扩展安装

php_igbinary.dll

php_redis.dll

这两个文件放入你对应的PHP版本目录下的ext目录下:

在php.ini配置文件里面配置

extension=php_igbinary.dll
extension=php_redis.dll

输出php配置看一下有没有redis,有成功。

简单列子测试:必须先启动redis服务

$redis=new Redis();

 $redis->connect('127.0.0.1',6379);

 $redis->auth('123456');

 $redis->set('test','helloworld');

 echo $redis->get('test');

最新文章

  1. eclipse gradle插件(buildship)的安装和使用
  2. java.sql.SQLException: [Microsoft][ODBC 驱动程序管理器] 在指定的 DSN 中,驱动程序和应用程序之间的体系结构不匹配
  3. 转载:JavaSE之反射
  4. AngularJs定制样式插入到ueditor中的问题总结
  5. Robots.txt 协议详解及使用说明
  6. js事件小记
  7. Stimulsoft Reports报表工具
  8. 14.8.3 Physical Row Structure of InnoDB Tables InnoDB 表的物理行结构
  9. Qt之Windows开发移植问题汇总
  10. SpringMVC框架(一)
  11. 2.1synchronized同步方法
  12. Spring Cloud是怎么运行的?
  13. jQuery与JS中的map()方法使用
  14. react-router简介
  15. Maven中使用本地JAR包
  16. CPU温度问题
  17. IC 设计中DFT的Boundary Scan功能
  18. Django中连接redis
  19. VS Supercharger插件的破解
  20. Python3 OpenCV应用

热门文章

  1. CVPR2018资源汇总
  2. PyQT5-QCalendarWidget 日历显示
  3. oracle中动态SQL使用详细介绍
  4. MongoDB-3.4安装文档
  5. Apple Pay的实现
  6. Redis is loading the dataset in memory
  7. PHP之文件上传
  8. kubernetes实战(二十):k8s一键部署高可用Prometheus并实现邮件告警
  9. linux 安装mysql yum方式
  10. isScroll的滚动组件的用法