3934:C 10 Aug 2022 00:14:04.239 # Fatal error, can‘t open config file ‘/usr/local/redis/./redis-conf
报错:3934:C 10 Aug 2022 00:14:04.239 # Fatal error, can't open config file '/usr/local/redis/./redis-conf': No such file or directory。3934:C 2022 年 8 月 10 日 00:14:04.239 # 致命错误,无法打开配置文件 '/usr/local/redi
·
报错:3934:C 10 Aug 2022 00:14:04.239 # Fatal error, can't open config file '/usr/local/redis/./redis-conf': No such file or directory
在设置redis配置的时候,在安装目录下找到解压文件中的redis.conf
Redis
的配置文件位于
Redis
安装目录下,文件名为
redis.conf
命令:解压目录下的
redis.conf
配置文件复制 到安装文件的目录下
cp /opt/redis-5.0.0/redis.conf /usr/local/redis/
修改redis.conf,将
daemonize修改为yes
Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程
daemonize no
保存退出
进入bin目录 使用操作 redis.server config/redis.conf 看是否能启动服务
结果报错:3934:C 10 Aug 2022 00:14:04.239 # Fatal error, can't open config file '/usr/local/redis/./redis-conf
谷歌翻译是:
3934:C 2022 年 8 月 10 日 00:14:04.239 # 致命错误,无法打开配置文件 '/usr/local/redis/./redis-conf': 没有这样的文件或目录
但事实路径是对的,尝试了几遍还是不行,网上也有说是配置文件损坏了,重新cp还是不行
最后尝试手动书写路径就可以了
redis-cli -p 6379
进入 输入 ping 回应–>pong
这样就OK了
这样就OK了
更多推荐
所有评论(0)