安装:
[root@localhost /]# cd /opt/
[root@localhost opt]# wget http://download.redis.io/releases/redis-6.0.5.tar.gz
[root@localhost opt]# tar -zxf redis-6.0.5.tar.gz
[root@localhost opt]# cd redis-6.0.5
[root@localhost redis-6.0.5]# make
如提示以下报错,需要安装新版gcc:server.c:2403:11: 错误:‘struct redisServer’没有名为‘assert_line’的成员
server.assert_line = 0;
[root@localhost redis-6.0.5]# yum -y install centos-release-scl
[root@localhost redis-6.0.5]# yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
[root@localhost redis-6.0.5]# scl enable devtoolset-9 bash
[root@localhost redis-6.0.5]# make test
[root@localhost redis-6.0.5]# yum -y install tcl #如未提示安装tcl可跳过此步