Setting dynamic path in the redis.conf using the Environment variable
问题 I have a environment variable MY_HOME which has a path to a directory /home/abc Now, I have a redis.conf file In which I need to set this path like this **redis.conf** pidfile $MY_HOME/local/var/pids/redis.pid logfile $MY_HOME/local/var/log/redis.log dir $MY_HOME/local/var/lib/redis/ like we do in command line, so that my config file picks the path based on the Environment variable. 回答1: Because Redis can read its config from stdin , I do something very similar to what @jolestar suggested. I