安装Redis遇到的各种坑(二)

继上次费了九牛二虎之力安装了redis之后,今天接着折腾,主要是做了两个内容的设置:
1、开机启用redis服务
2、配置redis集群(主从和集群不能共存)
首先是开机自动启用redis服务
设置开机自动启用redis服务涉及到的配置文件有两个,一个是install_server.sh,位置是在redis解压包的utils目录下,一般都是xxx/xxx/xx/redis-x.x/utils/,当然可以把文件放置在你习惯的位置;另外一个是redis.conf,如果是按默认启动服务的话,只要知道redis.conf文件的位置即可,因为配置的时候需要确认。

[root@redis_cluster utils]# ./install_server.sh 
Welcome to the redis service installer
This script will help you easily set up a running redis server
Please select the redis port for this instance: [6379] 6380  #默认端口直接回车或输入端口
Selecting default: 6380
Please select the redis config file name [/etc/redis/6379.conf] 
#redis.conf文件的路径,不能输错,不然会配置失败,回车则默认是这个路径。
Selected default - /etc/redis/6379.conf
Please select the redis log file name [/var/log/redis_6379.log] #默认,直接回车
Selected default - /var/log/redis_6379.log
Please select the data directory for this instance [/var/lib/redis/6379] #默认,直接回车
Selected default - /var/lib/redis/6379
Please select the redis executable path [/usr/local/bin/
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值