windows 下 redis 安装配置

Redis官网下载:

http://redis.io/download

默认不支持 windows版本,windows版本:https://github.com/ServiceStack/redis-windows

解压:D:\redis


redis-benchmark.exe         #基准测试
redis-check-aof.exe         # aof
redis-check-dump.exe        # dump
redis-cli.exe               # 客户端
redis-server.exe            # 服务器
redis.windows.conf          # 配置文件

命令行管理员权限运行:redis-server  redis.windows.conf

如果出现错误:

D:\redis-2.8.12>redis-server.exe redis.windows.conf
[7736] 10 Aug 21:39:42.974 #
The Windows version of Redis allocates a large memory mapped file for sharing
the heap with the forked process used in persistence operations. This file
will be created in the current working directory or the directory specified by
the 'dir' directive in the .conf file. Windows is reporting that there is
insufficient disk space available for this file (Windows error 0x70).


You may fix this problem by either reducing the size of the Redis heap with
the --maxheap flag, or by starting redis from a working directory with
sufficient space available for the Redis heap.


Please see the documentation included with the binary distributions for more
details on the --maxheap flag.


Redis can not continue. Exiting.


打开配置文件 redis.windows.conf ,搜索 maxheap , 然后直接添加内容即可.

.......
#  
# maxheap <bytes>
maxheap 1024000000
.......

运行:


双击打开 redis-cli.exe , 如果不报错,则连接上了本地服务器,然后测试,比如 set命令,get命令。


bat 批处理脚本,请根据需要灵活配置:

service-install.bat:

redis-server.exe --service-install redis.windows.conf --loglevel verbose


uninstall-service.bat:

redis-server --service-uninstall  


startup.bat:

redis-server.exe redis.windows.conf 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值