1,redis官方下载地址:https://redis.io/download,redis 64位下载地址:https://github.com/ServiceStack/redis-windows,本人测试使用的是redis-64.3.0.503版本。
2,解压redis-64.3.0.503.zip,解压后的文件结构如下:
3,修改redis.windows.conf文件,设置maxmemory 大小
maxmemory 1024000000
设置redis密码
requirepass 123456
4,启动redis:
redis-server.exe redis.windows.conf
D:\redis>redis-server.exe redis.windows.conf
_._
_.-``__ ''-._
_.-`` `. `_. ''-._ Redis 3.0.503 (00000000/0) 64 bit
.-`` .-```. ```\/ _.,_ ''-._
( ' , .-` | `, ) Running in standalone mode
|`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
| `-._ `._ / _.-' | PID: 9744
`-._ `-._ `-./ _.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' | http://redis.io
`-._ `-._`-.__.-'_.-' _.-'
|`-._`-._ `-.__.-' _.-'_.-'|
| `-._`-._ _.-'_.-' |
`-._ `-._`-.__.-'_.-' _.-'
`-._ `-.__.-' _.-'
`-._ _.-'
`-.__.-'
[9744] 02 Aug 09:21:35.858 # Server started, Redis version 3.0.503
[9744] 02 Aug 09:21:35.858 * The server is now ready to accept connections on port 6379
测试,成功安装:
Microsoft Windows [版本 6.1.7600]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Windows\system32>d:
D:\>cd redis
D:\redis>redis-cli.exe
127.0.0.1:6379> 123456
(error) ERR unknown command '123456'
127.0.0.1:6379> set name lenmon
(error) NOAUTH Authentication required.
127.0.0.1:6379> set name lenmon
(error) NOAUTH Authentication required.
127.0.0.1:6379>
127.0.0.1:6379> auth 123456
OK
127.0.0.1:6379> set name lenmon
OK
127.0.0.1:6379> get name
"lenmon"
5,将redis加入到windows的服务中(service和loglevel前都是两个-)
redis-server.exe --service-install redis.windows.conf --loglevel verbose
原文转发自 : https://blog.csdn.net/u012343297/article/details/78839063 查看原文
在此感谢 原创的经验分享,若有侵权,请联系我(qq:2427243157),及时删除