一、下载 https://redis.io/
二、上传到服务器
三、解压到你希望的文件夹中
四、配置
# 配置为所有IP均可访问
# 可能会出现不同
# 一般情况
bind 0.0.0.0
# 特殊:上面那种方法导致Redis Desktop Manager无法访问
# 解决:直接注释 bind 127.0.0.1 不添加 bind 0.0.0.0
# 允许后台运行
daemonize yes
# 设置密码
# 使用密码后:在访问过程中会出现Redis (error) NOAUTH Authentication required报错
# 解决:输入命令 > auth [密码]
requirepass 123456
五、注册为系统服务
1、进入redis目录下的utils目录中
2、找到 install_server.sh 然后按照步骤一步一步填写配置
3、成功:
六、查看服务是否存在
chkconfig --list | grep redis
# 如果报错 chkconfig: command not found
# 解决:Ubuntu 中 chkconfig 已经被 sysv-rc-conf 所替代
# chkconfig 命令如下:
# chkconfig --list | grep redis
#
# 修改后命令如下:
# apt-get update
# apt-get install sysv-rc-conf
# sysv-rc-conf --list | grep redis