redis 启动失败:Can't open the log file: Permission denied

Reacties · 3600 Uitzichten

更改了 redis 配置文件 redis.conf 中的 logfile 路径为 /home 开头,启动失败,journalctl -xe 显示 Can't open the log file: Permission denied

解决办法:

vim /usr/lib/systemd/system/redis-server.service

注释掉以下代码:

#ProtectHome=yes

重新启动 redis

systemctl daemon-reload
service redis start

 

参数说明参考资料:

https://zhuanlan.zhihu.com/p/419150771

Reacties