下载Redis 4.0
wget http://download.redis.io/releases/redis-4.0.6.tar.gz
可以根据需要的版本修改
http://download.redis.io/releases/redis-'版本号'.tar.gz
#/bin/bash
# 本文使用 Docker Centos7 镜像 作为基础环境
docker pull centos:centos7.7.1908
编译安装 Redis4.0
yum -y install gcc gcc-c++ libstdc++-devel tcl make wget
wget http://download.redis.io/releases/redis-4.0.6.tar.gz
tar -xf redis-4.0.6.tar.gz && cd redis-4.0.6
make && make PREFIX=/usr/local/redis/ install
mkdir /usr/local/redis/conf
mv $PWD/redis.conf $PWD/sentinel.conf /usr/local/redis/conf
启动 Redis4.0
vi /root/redis.conf
daemonize no > daemonize yes
/usr/local/redis/bin/redis-server /usr/local/redis/conf/redis.conf
ps -axu | grep redis
[root@5960e31a5411 redis-4.0.6]
127.0.0.1:6379> ping
PONG