简体   繁体   中英

redis.conf file not loading changes

I've recently changed the redis.conf to requirepass and disable saving to disk. But it seems that it doesn't load the config. Would I need to kill the process (does it even run when I haven't issued "src/redis-server")? Im using Ubuntu 10.01

It actually depends on the version of Redis, rather than the version of Ubuntu. Redis 2.0 (or more) includes a config set command in order to alter the configuration of the server without having to restart it.

To alter the configuration, you are supposed to change the requirepass line and comment out the save lines in the configuration file, and then, you may want to connect with redis-cli to enter the following commands:

redis 127.0.0.1:6379> config set requirepass XXX
OK
redis 127.0.0.1:6379> auth XXX
OK
redis 127.0.0.1:6379> config set save ""
OK

There is no need to restart the server.

If you use an older Redis version, you will have to restart the instance.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM