Install Redis on Ubuntu Linux

Redis Server
Redis Server

Redis package is supported natively for Ubuntu distribution, so if you want to install Redis, just get straight to it.

$ sudo apt-get update

$ sudo apt-get install redis-server

After installation, you might want to change binding IP addresses or port number, which can be done by editing file /etc/redis/redis.conf

port 6379

Change to appropriate value that you want and restart redis server,

$ sudo systemctl restart redis-server.service

To test Redis connection, issue following command:

$ redis-cli -h IP_ADDRESS ping

If you get reply as PONG, that means Redis server is running properly.