参考网址:
https://blog.csdn.net/sl1992/article/details/106017157/
https://blog.csdn.net/weixin_43260474/article/details/106003751?fps=1&locationNum=2
报错:
make[1]: *** [server.o] Error 1
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
#这句是临时的
scl enable devtoolset-9 bash
#修改环境变量
echo "source /opt/rh/devtoolset-9/enable" >> /etc/profile
gcc -v
make 和make install以后即可。注意安装完成以后redis-server在/usr/local/bin/目录下。