1、下载redis
2、解压缩、安装
安装完之后,可以执行以下make test,执行make test之前需要先安装tcl
3、配置 redis服务后台启动
找到:
修改为:
4、启动redis服务器
5、进入命令行界面
6、关闭redis
7、配置从redis
redis.conf 配置文件添加 主redis的ip和端口
8、设置开机启动redis
1)启动脚本 redis_init_script 位于 /usr/local/redis-3.0.1/utils/ 目录下
可以看到redis使用监听的端口作为配置文件的命名: CONF=”/etc/redis/${REDISPORT}.conf”
2)以端口号为名称将修改好的配置文件复制一份到指定目录
3)将启动脚本复制到/etc/init.d目录下,同时命名为redisd
4)设置为开机启动
报错,解决方法,在启动脚本开头添加如下红色的两行注释以修改其运行级别:
[En]
Error, workaround, add the following two red comments at the beginning of the startup script to modify its run level:
然后再设置开机启动
5)启动redis
Original: https://www.cnblogs.com/luxh/p/4648171.html
Author: CN.programmer.Luxh
Title: 安装Redis
原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/77438/
转载文章受原作者版权保护。转载请注明原作者出处!