yum install -y gcc epel-release; yum install -y jemalloc-devel

make  如果出错,运行如下命令:

(cd deps; make hiredis lua jemalloc linenoise; cd ..; make)

cd src

make install PREFIX=/usr/local/redis

mkdir /usr/local/redis/etc

useradd -s /sbin/nologin redis

mkdir /usr/local/redis/var

chmod 755 /usr/local/redis/var

chmod 755 /etc/init.d/redis

chkconfig --add redis

chkconfig redis on

service redis start

daemonize yes 
pidfile /usr/local/redis/var/redis.pid
port 6379
timeout 300
loglevel debug
logfile /usr/local/redis/var/redis.log
databases 16
save 900 1
save 300 10
save 60 10000
rdbcompression yes
dbfilename dump.rdb 
dir /usr/local/redis/var/
appendonly no
appendfsync always
requirepass xxxxx
bind 0.0.0.0