Installing Redis on Amazon Linux (AWS)


More modern form of memcached. Said to be superior as of v3 due to clustering support. Also available via Amazon Elasticache.  Find the latest version at

Update the system, fix the timezone, and install the toolchain
yum -y update
ln -sf /usr/share/zoneinfo/Australia/Brisbane /etc/localtime
yum -y install gcc make
Download the latest redis (available from & untar
cd /usr/local/src
tar xzf redis-2.8.19.tar.gz
rm -f redis-2.8.19.tar.gz
Build redis
cd redis-2.8.19
make distclean
Make dirs & copy files over
mkdir -p /etc/redis /var/lib/redis /var/redis/6379
cp src/redis-server src/redis-cli /usr/local/bin
cp redis.conf /etc/redis/6379.conf
Configure redis
nano /etc/redis/6379.conf
daemonize yes
logfile "/var/log/redis_6379.log"
dir /var/redis/6379
Download and install the init script
mv redis-server /etc/init.d
chmod 755 /etc/init.d/redis-server
nano /etc/init.d/redis-server
Auto-enable & start redis
chkconfig --add redis-server
chkconfig --level 345 redis-server on
service redis-server start
Fix low-memory issue to prevent failing background saves
nano /etc/sysctl.conf
# prevent redis background save issue
vm.overcommit_memory = 1
sysctl vm.overcommit_memory=1
Test install
/usr/local/bin/redis-cli ping
cat /var/log/redis_6379.log