Tuesday, November 12, 2024

How to install and start Redis server for Ubuntu system

If the Redis server is not installed on the system install it. For the Ubuntu system use the following command

sudo apt-get update
sudo apt-get install redis-server

Once the Redis server is installed, open the terminal and start it using the following command

redis-server

This will start the Redis server. Note: with this redis server will start on default port 6379.

To customize the configuration create a custom file redis.conf add the proper configuration and start the server

redis-server /etc/redis/redis.conf

The above command to run the server will require the terminal to open so to run in the background use the following command

redis-server --daemonize yes

To test whether the Redis is running successfully ping using the Redis cli command

redis-cli ping

This will return the response PONG if it's running successfully

Share:

0 comments: