目录

在Window系统上安装redis服务-Invalid argument during startup: Failed to open the .conf

版本

当前redis版本

1
2
redis-cli -v
redis-cli 3.0.503

网上给的命令(在redis所在文件夹下执行):

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

问题1

Invalid argument during startup: Failed to open the .conf file: verbose CWD=C:\developer\redis

解决办法亲测

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

问题2

在服务中设置自动启动并启动,但提示失败 windows could not start the redis 7034

解决办法

关闭已启动的redis服务端CMD窗口,重新启动服务

问题3

HandleServiceCommands: system error caught. error code=1073, message = CreateService failed: unknow

解决办法

1)先卸载服务:

1
redis-server --service-uninstall

2)然后再安装:

1
redis-server--service-install redis.windows.conf

线上下载地址

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

https://github.com/ServiceStack/redis-windows/tree/master/downloads

启停:

启动服务:redis-server –service-start

停止服务:redis-server –service-stop