Redis在windows下安装过程
来源:互联网 发布:青岛十五中行知楼 编辑:程序博客网 时间:2024/06/01 09:14
一、下载windows版本的Redis
去官网找了很久,发现原来在官网上可以下载的windows版本的,现在官网以及没有下载地址,只能在github上下载,官网只提供linux版本的下载
官网下载地址:http://redis.io/download
github下载地址:https://github.com/MSOpenTech/redis/tags
二、安装Redis
1.这里下载的是Redis-x64-3.2.100版本,我的电脑是win7 64位,所以下载64位版本的,在运行中输入cmd,然后把目录指向解压的Redis目录。
2、启动命令
redis-server redis.windows.conf,出现下图显示表示启动成功了。
三、设置Redis服务
1、由于上面虽然启动了redis,但是只要一关闭cmd窗口,redis就会消失。所以要把redis设置成windows下的服务。
也就是设置到这里,首先发现是没用这个Redis服务的。
2、设置服务命令
redis-server –service-install redis.windows-service.conf –loglevel verbose
输入命令之后没有报错,表示成功了,刷新服务,会看到多了一个redis服务。
3、常用的redis服务命令。
卸载服务:redis-server –service-uninstall
开启服务:redis-server –service-start
停止服务:redis-server –service-stop
4、启动服务
5、测试Redis
安装测试成功。
这里只是做简单的安装,部署服务使用,更深入的使用可以去redis中文网看看 http://www.redis.net.cn/ 博客园也有很多深入使用方法,由于我的博客系统需要用到,做个抛砖引玉吧。
在下载的解压包里面有一份文档,有详细的说明,
设置Redis密码
打开redis.windows-service.conf文件,找到修改密码这一段
################################## SECURITY #################################### Require clients to issue AUTH <PASSWORD> before processing any other# commands. This might be useful in environments in which you do not trust# others with access to the host running redis-server.## This should stay commented out for backward compatibility and because most# people do not need auth (e.g. they run their own servers).## Warning: since Redis is pretty fast an outside user can try up to# 150k passwords per second against a good box. This means that you should# use a very strong password otherwise it will be very easy to break.## requirepass foobared
加上这么一行:
requirepass 这里是你的密码
重新启动Redis,密码生效
登录进入Redis命令
(无密码)redis-cli.exe -h 127.0.0.1(有密码)redis-cli.exe -h 127.0.0.1 -a 密码
Reidis启动命令为: 注意是切换进redis目录后
redis-server redis.windows.conf
将命令保存为文本文档 改为.bat文件 下次启动redis可以直接点击bat文件启动redis
我的startRedis.bat文件内容为:
d:cd Redis-x64-3.0.500redis-server redis.windows.conf#redis-cli.exe -h 127.0.0.1
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- Redis在windows下安装过程
- BufferedWriter的用法
- HDU 3613 Best Reward Manacher
- window下的virtualenv的使用和requests中socks使用
- sublime快捷键
- 文件夹的复制(文件的递归加IO流的文件读写 )
- Redis在windows下安装过程
- DateInputStream/DateOutputStream(数据输入/输出流)
- smarty foreach标签中的循环控制
- 使用Vim normal 命令 修改可视块区域
- ssh2无法连接目标机器
- 信息安全走向漫谈(2006年8月19日B105技术沙龙演讲稿)
- Spring
- [编程题] 双核处理
- Linux常用命令之系统管理