1.安装gcc
yum install -y gcc-c++
2.下载安装包
https://download.redis.io/releases/redis-6.2.0.tar.gz
3.解压
tar -zxvf redis-6.2.0.tar.gz
4.编译安装
cd redis-6.2.0
make
##/home/redis为安装目录##
make install PREFIX=/home/redis
5.拷贝配置文件并授权
mkdir -p /home/redis/conf
cd redis-6.2.0
cp redis.conf /home/redis/conf
cp sentinel.conf /home/redis/conf
chmod 777 redis.conf
chmod 777 sentinel.conf
6.启动redis
cd /home/redis
./bin/redis-server ./conf/redis.conf
7.使用连接工具连接redis