1、下载安装包
wget http://download.redis.io/releases/redis-5.0.0.tar.gz
2、解压
tar -zxvf redis-5.0.0.tar.gz
3、编译
cd redis-5.0.0/
make PREFIX=/usr/local/redis install
4、拷贝修改配置文件
cp redis.conf /usr/local/redis/bin
vim /usr/local/redis/bin/redis.conf
修改
daemonize yes
bind 0.0.0.0
5、添加环境变量
export REDIS_HOME=/usr/local/redis
export PATH=$PATH:$REDIS_HOME/bin
6、启动
redis-server /usr/local/redis/bin/redis.conf #启动
7、验证
cd /usr/local/redis
./bin/redis-cli #验证