
The above results show that you are able to create key now as the New Redis server is promoted as master. Step 6- Verify the new Master ServerĬonnect your New master and check if you are able to create key. Here you can see in replication section that the role is changed to MASTER. Now run info command to check if SLAVE promoted as Master. Step 5– Promote the SLAVE as Master.Ĭonnect to the SLAVE SERVER and run the following command. The above result shows that Key value is replicated to SLAVE.

Now check the key created on Master is replicated to SLAVE or not by running command ‘get test’

Master_last_io_seconds_ago should greater than or equal to 1 Here some points that we need to notice are as follows: Scroll down to Replication portion o f Info and you can see the role as slave. Now to check the key value on master run ‘get test’Ĭonnect the SLAVE Redis using following command and run command info Now Create a test key value on MASTER to check if data is Replicating to SLAVE. Scroll down to Replication portion of Info and you can see the role as master. On Master RedisĬonnect the redis using following command and run command info Connect and run following command on Master and Slave Redis one by one. To check if master and slave setup is working properly. $/etc/init.d/redis_6399 restart Step 4- Verify the Master-Slave setup Open the newly installed redis config file.Īdd the following line in the nf file and save the file.Īfter saving restart the Slave Redis Server. Look for the string ‘bind’ and make sure it should be as :Īlso look for the sting ‘appendonly’ and ‘appendfilename’ and change the setting as : Open the Redis config file of existing Redis Server that we have to make as Master $ /etc/init.d/redis_6399 status Step 3 – Create Master-Slave Setup Master Configuration

Is this ok? Then press ENTER to go on or Ctrl-C to abort.Ĭopied /tmp/nf => /etc/init.d/redis_6399 Please select the redis executable path -> Press EnterĬli Executable : /usr/local/bin/redis-cli Selected default – /var/lib/redis/6399 -> Press Enter Please select the data directory for this instance -> Press Enter Selected default – /var/log/redis_6399.log -> Press Enter Please select the redis log file name - > Press Enter Selected default – /etc/redis/nf -> Press Enter Please select the redis config file name -> Press Enter Please select the redis port for this instance: 6399 -–> Enter port as 6399 This script will help you easily set up a running redis server

Step 2- Configure a different Redis Port 6399 on the newly Redis Server.Īs soon as you run the script the following prompts will appear. Step 1.4 – Run make Install with a different location. $ sudo yum groupinstall ‘Development Tools’ Step 1.3– If you get any error in running make command ,run the following command.
#YUM INSTALL REDIS CLI DOWNLOAD#
Step 1.2– Download the latest Redis version copied in previous step on your Linux Box using wget command. Right click on the Download 5.0.8 under Stable(5.0) version or whatever the latest stable version and click on “ copy link location” Step 1.1– Open the following Redis download link on the browser. Step 1-Install the latest version(5.0.8) of Redis from source Let us perform the above steps in detail: We will follow the following steps upgrading Redis Server without downtime.ġ) Install the latest version(5.0.8) of Redis from source on the Same Server with a different installation location(/opt/local) without doing any changes on existing Redis Server.Ģ) Configure a different Redis Port 6399 on the newly Installed latest-Version Redis Server.ģ) Make the existing old version- 4.0.9 Redis-Server as Master and newly installed Latest-Version-5.0.8 Redis Server as a slave.ħ) Change the Redis Port on your Application.
#YUM INSTALL REDIS CLI HOW TO#
& How to install Jenkins on AWS EC2 Workaround Let Suppose a Scenario where we have a Redis Server (Version: Redis-4.0.9) running on a Server with Redis Port 6388 and we want upgrading Redis to the latest version( 5.0.8) without any downtime.Current location of existing installed Redis is /usr/local/bin/redis-serverĪlso Read : Install Redis on Linux from source This tutorial explains, upgrading Redis With Zero Downtime Scenario
