Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

redis.conf file not loading changes

Tags:

redis

ubuntu

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

like image 485
re1man Avatar asked Mar 13 '12 19:03

re1man


People also ask

How do I access redis config file?

The Redis configuration file is located at installdir/redis/etc/redis. conf.

Where is redis config file in Windows?

folder: C:\Program Files\Redis\conf - there is some template conf file.

How change redis port in Linux?

You can edit the Redis server configuration file and specify the startup port to make the changes permanent. Locate the entry as shown below and change the value to your desired port. Once you set your desired port, save and close the file. Next, restart the Redis service to apply the changes.


1 Answers

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.

like image 124
Didier Spezia Avatar answered Oct 10 '22 01:10

Didier Spezia