1、redis下载
地址:http://download.redis.io/releases/
注:本文档以4.0.0为例
2、安装gcc
yum -y install gcc gcc-c++ tcl
3、编译安装
cd redis-4.0.0 make MALLOC=libc make test make install cd utils/ ./install_server.sh
4、修改配置
daemonize yes (以后端模式启动redis)
5、将/usr/local/redis/bin加入环境变量
echo ' export PATH=$PATH:/usr/local/redis/bin'>>/etc/profile
source /etc/profile
6、启动redis
mv /etc/init.d/redis_6379 /etc/init.d/redis systemctl daemon-reload systemctl start redis