How to install Redis on ubuntu and Configuring Redis

Posted by

Step 1: Begin by updating your local apt package cache:

sudo apt update

Step 2: Go to Ubuntu server and type Sudo -S for root directy

Step 3: Install redis for this command

apt-get install redis-server

Step 4: After that get Y ans N for continuus install redis and user permisin y or not

After this operation, 4077 kB of additional disk space will be used.
Do you want to continue? [Y/n] 

Step 5: redis install successful after that now check redis cli run or not on this command

redis-cli

Step 6 : Open this file with your preferred text editor and check this command. path /etc/redis/redis.conf

sudo nano /etc/redis/redis.conf

Thatā€™s the only change you need to make to the Redis configuration file at this point, so save and close it when you are finished. If you used nano to edit the file, do so by pressing CTRL + XY, then ENTER.

Step 7 : Then, restart the Redis service to reflect the changes you made to the configuration file:

sudo systemctl restart redis.service

Step 8: Testing Redis

Start by checking that the Redis service is running:

sudo systemctl status redis

If it is running without any errors, this command will produce output similar to the following:

In the prompt that follows, test connectivity with the ping command:

ping

This output confirms that the server connection is still alive. Next, check that youā€™re able to set keys by running:

This output confirms that the server connection is still alive. Next, check that youā€™re able to set keys by running:

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x