1.下载redis 安装包
//打开local cd /usr/local //下载 wget http://download.redis.io/releases/redis-4.0.6.tar.gz //解压压缩包 tar -zxvf redis-4.0.6.tar.gz
2.安装gcc依赖
yum -y install gcc
3.跳转到redis解压目录下
cd redis-4.0.6
4.编译安装
make MALLOC=libc make install PREFIX=/usr/local/redis
5.复制配置文件
//进入redis解压文件 cd /usr/local/redis-4.0.6 //复制配置文件到 安装目录中 cp redis.conf /usr/local/redis/redis.conf cp sentinel.conf /usr/local/redis/sentinel.conf
6.开启redis
cd /usr/local/redis/bin //开启redis ./redis-server redis.conf
7.关闭 防火墙
systemctl stop firewalld.service