更新时间:2022-12-16 16:57:54
您需要将以下内容添加到/etc/systemd/system/redis-server单元文件中:
You need to add the following to your /etc/systemd/system/redis-server unit file:
ReadWriteDirectories=-/var/lib/redis
请注意,默认值为/var/lib/redis
,但是如果在/etc/redis/redis.conf
中设置了不同的dir
配置选项,则需要为此设置ReadWriteDirectories
.
Note that /var/lib/redis
is the default, but if in your /etc/redis/redis.conf
you set a different dir
config option, you will need to set ReadWriteDirectories
to that.