How to start redis-server on a different port than the default port 6379 in ubuntu
I have used the following steps to install the redis
- sudo add-apt-repository ppa:rwky/redis
- sudo apt-get update
- sudo apt-get -y install redis-server
I installed, but I don't know how to how to start redis-server on a different port than the default port 6379
So kindly tell me the steps to change the default port to different port ?
So if your instance is running under port 1985 just run
redis-server --port 6380
will start a Redis server listening to port 6380.redis-cli -p 6380
-- a suggestion made here as well -- does not start a Redis server listening to port 6380, but tries to connect the CLI to a (hopefully running) Redis server that listens to that port.redis.conf
file (it will probably be at/etc/redis/6379.conf
).port
directive to any free port.