I have redis installed on a Red Hat Enterprise Linux 8 server. Locally, redis-server
starts normally if using default config/ not config file provided. Redis can be used locally to create and query some keys.
redis working locally
Checking services running with systemctl
shows that the service has a failed
active status:
redis not running nor active
This seems to be because no config file was provided and it's using it's default config. I want to use a custom configuration for which I modified the redis.conf
file located in /etc/redis.config with my custom value/configs.
When trying to specify the config file for it using the command redis-server /etc/redis.conf
I don't receive any output, the terminal just stays in blank, like if it's trying to boot the service but it never does.
If I use redis-server etc/redis.conf
I get : Fatal error, can't open config file 'etc/redis.conf'
I've read online that recent versions of redis requires write permission on this file due to CONFIG REWRITE feature which was introduced in Redis 2.8.0 which rewrites the redis.conf file to match the currently configured process. It may be possible that redis does not have this permission to write/read this file on that path. I tried to fix this by modifying a security limitation under limit.conf
on etc/systemd/system/redis.service.d/
adding the following config:
ReadWriteDirectories=-/etc/
Do you how can I solve this issue or how to give redis write.read permission to this config file?