Compile & Deploy Redis Master/Slave

So lets jump right into it shall we:

wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make

In the “src” directory you will now find the various redis files:
redis-server
redis-cli
redis-benchmark
redis-check-aof

Copy Redis server and client (and other files if you like) to the following dir (which should be in your PATH):
sudo cp redis-server /usr/local/bin/
sudo cp redis-cli /usr/local/bin/

To start just run “redis-server”. To start multiple instances on the same server either specify different command line params (for datadirs, pids, ports, etc.) or create seperate config files.

Read the section “Installing Redis more properly” in the link http://redis.io/topics/quickstart for more information.

If you are working with multiple nodes, then in order to setup a slave just run the following command on the “to-be” slave node specifying the master node/port:

slaveof 192.168.1.1 6379

Bye

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s