目前最新是Redis 6.0.5:https://redis.io/download
解压缩命令:
1 tar -vxf redis-6.0.5
yum install gcc -y
cd redis-6.0.5 make
此时编译报错
由于安装GCC不设置版本号,默认yum安装的gcc版本是4.8.5,由于版本过低,在编译时会报如下错误,所以要升级gcc(在编译redis6.0.1之前需要升级gcc的版本)
1、安装scl源
yum install centos-release-scl scl-utils-build
2、列出scl可用源
yum list all --enablerepo=‘centos-sclo-rh‘
3、安装8版本的gcc、gcc-c++、gdb工具链(toolchian)
yum install -y devtoolset-8-toolchain scl enable devtoolset-8 bash gcc --version
重新对Redis进行编译,编译成功
原文:https://www.cnblogs.com/echola/p/13267011.html