Windows(WinServer)下安装Redis服务端

一、准备安装包

下载地址:

github地址
win下自然是巨硬在维护
Windows(WinServer)下安装Redis服务端_第1张图片
可以看到巨硬已经好久没更新了。= =
这里建议使用msi格式的,官方文档是这样说的

If you installed Redis using the MSI package, then Redis was already installed as a Windows service. Nothing further to do. If you would like to change its settings, you can update the redis.windows-service.conf file and then restart the Redis service (Run -> services.msc -> Redis -> Restart).
During installation of the MSI you can either use the installer’s user interface to update the port that Redis listens at and the firewall exception or run it silently without a UI.
翻译如下:
如果使用MSI包安装Redis,则Redis已作为Windows服务安装。没什么可做的了。如果要更改其设置,可以更新redis.windows-service.conf文件,然后重新启动redis服务(win+R -> services.msc -> Redis -> Restart)。
在安装MSI的过程中,您可以使用安装程序的用户界面更新Redis侦听的端口和防火墙例外,或者在没有UI的情况下静默运行它。

备用下载

考虑到github经常抽风,可能有时候下载很慢甚至下载中途断开,这里我也上传到了彩云网盘,版本就不用担心了,反正也不更新了

二、安装

傻瓜式安装,就没什么好讲了
Windows(WinServer)下安装Redis服务端_第2张图片

Windows(WinServer)下安装Redis服务端_第3张图片

Windows(WinServer)下安装Redis服务端_第4张图片
可以不用设置

三、运行

如果你用msi安装的话,其实Redis就已经安装好了,
在计算及服务里就可以看到
Windows(WinServer)下安装Redis服务端_第5张图片

四、连接

Redis的客户端连接工具有很多,RDM已经收费了,网上各路大神做的开源免费的也不少,这里放一个个人正在用的AnotherRedisDesktopManager,码云下载速度有时也不太行,这里也放到彩云网盘[v1.3.5],安装这里就不贴了,打开后新建连接信息如下就行了
Windows(WinServer)下安装Redis服务端_第6张图片
连接后,没有报错,看到以下界面就成功了。
Windows(WinServer)下安装Redis服务端_第7张图片

自定义配置(增加密码及远程连接)

打开安装目录,文件如下
Windows(WinServer)下安装Redis服务端_第8张图片

增加连接密码

打开服务端配置文件,Ctrl+F搜索foobared,定位如下
Windows(WinServer)下安装Redis服务端_第9张图片
这里修改为123456

# use a very strong password otherwise it will be very easy to break.
#
requirepass 123456

# Command renaming.
#
# It is possible to change the name of dangerous commands in a shared
# environment. For instance the CONFIG command may be renamed into something
# hard to guess so that it will still be available for internal-use tools

重启服务就行了,这时客户端会提示授权错误,需要重新登录
Windows(WinServer)下安装Redis服务端_第10张图片
同理如果要修改端口找到port就行了。

使用远程连接

打开上述配置文件找到bind修改为0.0.0.0 任意IP可访问,或者可以写死
Windows(WinServer)下安装Redis服务端_第11张图片
重启即可。

TAG:如果远程连接失败,请检查你的云服务器安全组配置信息,其中是否关闭了当前端口数据进出。

你可能感兴趣的:(Redis,redis)