常见开发环境配置--Windows下redis2.8.12的安装

Windows下安装和配置低版本的redis,百度可得的资料比较少,最后还是通过google找到了一篇英文版的安装方法介绍,内容详见地址。我将上述过程进行记录,亦算是当一回翻译(辣鸡英语水平).

一、Windows下redis2.8.12资源准备

1、资源下载地址
点击下载
2、解压压缩包,在redis-win2.8.12\bin\release目录下有一个已经编译好的redis的可执行程序,将其拷贝至C盘并解压,内容如下:
在这里插入图片描述

二、安装过程

1、首次启动redis-server

redis-server  redis.windows.conf

此时会报错,内容如下:

C:\redis2.8>redis-server.exe redis.windows.conf
[5052] 05 Apr 08:46:51.118 #
The Windows version of Redis allocates a memory mapped heap for sharing with
the forked process used for persistence operations. In order to share this
memory, Windows allocates from the system paging file a portion equal to the
size of the Redis heap. At this time there is insufficient contiguous free
space available in the system paging file for this operation (Windows error
0x5AF). To work around this you may either increase the size of the system
paging file, or decrease the size of the Redis heap with the --maxheap flag.
Sometimes a reboot will defragment the system paging file sufficiently for
this operation to complete successfully.

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-server
在这里插入图片描述
redis-sever已正常启动,创建启动脚本
startup.bat

redis-server.exe redis.windows.conf

2、将redis-server添加为系统服务
service-install.bat

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

uninstall-service.bat

redis-server --service-uninstall

3、测试redis-server

C:\>redis-cli
127.0.0.1:6379> help
redis-cli 2.8.12
Type: "help @<group>" to get a list of commands in <group>
      "help <command>" for help on <command>
      "help <tab>" to get a list of possible help topics
      "quit" to exit
127.0.0.1:6379>
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值