1.下载安装包:wget http://download.redis.io/releases/redis-5.0.7.tar.gz
2.解压:tar -zvxf redis-5.0.7.tar.gz
3.将解压完的文件移动到/usr/local/下,并将文件夹名称修改为redis: mv redis-5.0.7 /usr/local/redis
4.编译:cd到/usr/local/redis目录,输入命令make执行编译命令。
5.安装:make PREFIX=/usr/local/redis install
6.启动redis:在目录/usr/local/redis 输入下面命令启动redis:./bin/redis-server& ./redis.conf
7.更改配置:vim /usr/local/redis/redis.conf
将daemonize设置为yes,将bind注释,将protected-mode设置为no,port设置端口,requirepass设置密码
8.重启redis:./bin/redis-server ./redis.conf
9.安装完成!