Install and Setup Redis

Download and Untar Redis Installer

# wget
# tar -xzvf redis-2.8.3.tar.gz

Install GCC & TCL (if not yet)

# yum install gcc tcl

Enter Directory and Make

# cd redis-2.8.3
# make
# make install

Enter Utils Directory and vi file
# cd utils

if you would like to install without _PORT on all files:

# cp
# vi
replace all "_$REDIS_PORT" with empty string ""
e.g. _REDIS_LOG_FILE="/var/log/redis_$REDIS_PORT.log" will change to -> /var/log/redis.log

# to change redis configuration file location after installation:

_REDIS_CONFIG_FILE="/etc/redis/$REDIS_PORT.conf" change to-> /etc/redis/redis.conf

#to change the redis data directory

_REDIS_DATA_DIR="/var/lib/redis/$REDIS_PORT" change to -> /data/redis

Install Redis Server

# ./

If you have changed the redis configuration file name, redis data directory before running, you will need to correct the file content for startup script:

# vi /etc/init.d/redis

Edit File (so that service stop won’t hang)
# vi /etc/init.d/redis_$REDIS_PORT or /etc/init.d/redis
Add HOST=”xx.x.x.xx” (internal IP) under REDISPORT
Add PW=”xxxxxxx” (password) under HOST
Edit and add HOST, PW directive to:
$CLIEXEC -h $HOST -p $REDISPORT -a $PW shutdown

Non Standard Directory Path:


Standard Installation Path:



# service redis start | stop

Be the first to comment

Leave a Reply

Your email address will not be published.