1.下载

wget https://download.redis.io/redis-stable.tar.gz

2.编译环境

yum install -y cmake make gcc gcc-c++

3.编译安装

tar -xzvf redis-stable.tar.gz
cd redis-stable
make
make install

4.验证

redis-server

5.redis test 错误修复

  • You need tcl 8.5 or newer in order to run the Redis test
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/tcl-8.5.13-8.el7.x86_64.rpm
rpm -ivh tcl-8.5.13-8.el7.x86_64.rpm