#!/bin/bash

RedisVersion=5.0.5

wget http://download.redis.io/releases/redis-$RedisVersion.tar.gz
tar -zvxf redis-$RedisVersion.tar.gz

cd ./redis-$RedisVersion
yum install gcc -y
./configure
make
make install


mkdir -p /etc/redis/
cp ./redis.conf /etc/redis/6379.conf

cp ./utils/redis_init_script /etc/init.d/redisd
cd /etc/init.d/
chkconfig redisd on

service redisd start