按照官网一步一步来:https://redis.io/download
中间有点小插曲,在启动的时候报错:
原先是因为本机的gcc 的版本的问题
可以查看使用命令gcc -v 查看版本,应该是4.8版本
解决方法
1 # 升级到5.3版本 2 yum -y install centos-release-scl 3 yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils 4 5 scl enable devtoolset-9 bash
再查看版本 启动redis
src/redis-server