配置编译环境
yum install gcc tar zip openssl openssl-devel automake glibc-static autoconf libtool make build-essential
安装Redis
官网地址:https://redis.io/download
wget http://download.redis.io/releases/redis-5.0.5.tar.gz
tar xzf redis-5.0.5.tar.gz
mv redis-5.0.5 /usr/local/redis
cd /usr/local/redis
make
make install
*注意 在make时可能出现错误:"error: jemalloc/jemalloc.h: No such file or directory"

解决方法:
make MALLOC=libc
建立软连接
ln -s /usr/local/redis/src/redis-server /usr/bin/redis-server -f
ln -s /usr/local/redis/src/redis-cli /usr/bin/redis-cli -f
ln -s /usr/local/redis/src/redis-sentinel /usr/bin/redis-sentinel -f
ln -s /usr/local/redis/src/redis-check-rdb /usr/bin/redis-check-rdb -f
ln -s /usr/local/redis/src/redis-check-aof /usr/bin/redis-check-aof -f
安装完成
安装后可以通过
redis-server <配置文件>
启动