www.cnblogs.com/ruiyqinrui

开源、架构、Linux C/C++/python AI BI 运维开发自动化运维。 春风桃李花 秋雨梧桐叶。“力尽不知热 但惜夏日长”。夏不惜,秋不获。@ruiY--秦瑞

python爬虫,C编程,嵌入式开发.hadoop大数据,桉树,onenebula云计算架构.linux运维及驱动开发.

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
  2912 随笔 :: 9 文章 :: 51 评论 :: 185万 阅读

1问题

2 原因

3解决

3.1 如果需要临时启动Redis

3.2 如果需要将Redis注册为服务

4其他说明

redis有windows版和linux版的,本文讲的是windows版相关的一些问题。

1、问题
使用命令redis-server.exe --service-install redis.windows.conf命令将redis注册为服务,启动服务时报错:

 

本地计算机上的Redis服务启动后停止。某些服务在未由其他服务或程序使用时将自动停止。

 

使用命令redis-server.exe redis.windows.conf临时安装redis,结果报错:

 

The Windows version of Redis allocates a memory mapped heap forsharing with

the forked process used for persistenceoperations. In order to share this

memory, Windows allocates from the systempaging file a portion equal to the

size of the Redis heap. At this time thereis insufficient contiguous free

space available in the system paging filefor this operation (Windows error

0x5AF). To work around this you may eitherincrease the size of the system

paging file, or decrease the size of theRedis heap with the --maxheap flag.

Sometimes a reboot will defragment thesystem paging file sufficiently for

this operation to complete successfully.

 

Please see the documentation included withthe binary distributions for more

details on the --maxheap flag.

 

Redis can not continue. Exiting.

 

如图:

 

2、原因
由于没有指定maxheap导致的,当然了不指定该参数不一定报错,但是出现上述原因,通常是这个原因导致的。

3、解决
3.1、如果需要临时启动Redis
使用命令:redis-server.exe redis.windows.conf --maxheap 200m

说明:200m是指定最大堆内存是200m,当然你也可以修改得在大一些

3.2、如果需要将Redis注册为服务
如果已经注册为了服务,先卸载掉,卸载方法是,用cmd进入到你的redis文件的目录,然后执行命令:

redis-server --service-uninstall

卸载完成后,重新安装服务,执行命令:

redis-server.exe --service-install redis.windows.conf --maxheap 200m

说明:200m是指定最大堆内存是200m,当然你也可以修改得在大一些

4、其他说明
可以到github上下载最新版的redis

地址是:

https://github.com/MSOpenTech/redis/releases

 

windows系统的话,可以下载msi版直接安装,我这里下载的是zip版,自己执行命令来安装

 

posted on   秦瑞It行程实录  阅读(370)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 开源Multi-agent AI智能体框架aevatar.ai,欢迎大家贡献代码
· Manus重磅发布:全球首款通用AI代理技术深度解析与实战指南
· 被坑几百块钱后,我竟然真的恢复了删除的微信聊天记录!
· 没有Manus邀请码?试试免邀请码的MGX或者开源的OpenManus吧
· 园子的第一款AI主题卫衣上架——"HELLO! HOW CAN I ASSIST YOU TODAY
历史上的今天:
2021-11-09 QT code level layout base knowledges
2020-11-09 autoheader command not found
2020-11-09 apache 配置CGI编程环境
2016-11-09 linux设置ulimit值永久生效
2016-11-09 firefox chrome强制指定网址使用https
2015-11-09 centos平台openstack spice配置
2015-11-09 openstack 启用spice
www.cnblogs.com/ruiyqinrui
点击右上角即可分享
微信分享提示