5/17/2016 - 2:57 PM

Install Redis on EC2

Install Redis on EC2

1. Install Linux updates, set time zones, followed by GCC and Make

sudo yum -y update
sudo ln -sf /usr/share/zoneinfo/America/Indianapolis \
sudo yum -y install gcc make

2. Download, Untar and Make Redis 2.8 (check here

cd /tmp
tar xzf redis-2.8.12.tar.gz
cd redis-2.8.12

3. Create Directories and Copy Redis Files

sudo mkdir /etc/redis 
sudo mkdir /var/lib/redis
sudo cp src/redis-server src/redis-cli /usr/local/bin/
sudo cp redis.conf /etc/redis/

4. Configure Redis.Conf

sudo vim /etc/redis/redis.conf
  daemonize yes
  dir /var/lib/redis

5. Download init Script

cd /tmp

6. Move and Configure Redis-Server

Note: The redis-server to be moved below is the one downloaded in 5 above.

sudo mv redis-server /etc/init.d
sudo chmod 755 /etc/init.d/redis-server
sudo vim /etc/init.d/redis-server

7. Auto-Enable Redis-Server

sudo chkconfig --add redis-server
sudo chkconfig --level 345 redis-server on

8. Start Redis Server

sudo service redis-server start

// Taken from and updated.