一、配置编译环境
安装gcc套装
yum install -y cpp
yum install -y binutils
yum install -y glibc
yum install -y glibc-kernheaders
yum install -y glibc-common
yum install -y glibc-devel
yum install -y gcc
yum install -y make
升级gcc
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
二、安装Redis
下载redis
wget https://download.redis.io/releases/redis-6.0.9.tar.gz
解压
tar xzf redis-6.0.9.tar.gz
切换目录
cd redis-6.0.9
编译
make
运行redis服务器
src/redis-server
运行redis客户端
src/redis-cli