确认服务器防火墙关闭或者放行。

1.firewall-cmd –state
2,systemctl stop firewalld

配置redis.conf

  1. bind 修改为0.0.0.0或者是允许ip
  2. slaveof ip port
  3. 修改为后台运行方式 yes
  4. 配置logfile目录,记得创建目录,写权限.

启动redis-server

cd到redis/src目录下
./redis-server ../redis.conf 启动

查看状态

执行info replication查看状态
Redis配置主从
master_link_status:up配置成功

备注

  1. ps -ef|grep redis 查看进程
  2. kill -9 pid 杀死
    用于重新启动redis服务

相关文章:

  • 2019-06-12
  • 2021-11-14
  • 2022-01-05
  • 2018-03-16
  • 2021-06-23
  • 2021-10-10
  • 2018-03-25
  • 2021-01-15
猜你喜欢
  • 2020-05-25
  • 2018-08-24
  • 2018-06-12
  • 2021-04-30
  • 2021-12-26
  • 2021-11-04
  • 2021-08-20
  • 2020-04-11
相关资源
相似解决方案