[Bug0048] Redis安装成功后Warning: no config file specified, using the default config. In order to specify

2022/9/1 2:23:00

本文主要是介绍[Bug0048] Redis安装成功后Warning: no config file specified, using the default config. In order to specify,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

1、问题

redis启动错误: Warning: no config file specified, using the default config. In order to specify a config

2、场景

迁移环境,新windows环境下双击redis-server.exe报错,原环境已经将Redis设置为服务,新环境未设置

3、原因

没有使用默认的conf文件

4、解决方案

  • 方案一
    设置命令行启动Redis批处理脚本,双击启动即可
    在Redis目录下添加redis-start.bat(文件名.bat)批处理文件,文件内容如下,根据自身存放位置修改相对路径即可。

    之后点击文件即可运行。

    @echo off
    
    set location="D:\Environment\Redis-x64-5.0.14.1" 
    
    cd /d %location% 
    redis-server redis.windows.conf
    
  • 方案二(推荐)
    将Redis安装为服务

    进入redis文件夹,输入redis-server.exe --service-install redis.windows.conf --loglevel verbose

    详细见Windows 下将 redis 设置成服务并开机自启

成功后效果图



这篇关于[Bug0048] Redis安装成功后Warning: no config file specified, using the default config. In order to specify的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程