zoukankan      html  css  js  c++  java
  • Redis多实例配置以及主从同步

    一、多实例配置

    1、准备俩配置文件,开两个就准备两个

    • redis-6380.conf
    • redis-6381.conf

    2、分别写入配置信息(这里简化了配置)

    # 运行在6380端口
    bind 172.18.107.180
    port 6380
    daemonize yes
    pidfile /var/run/redis_6380.pid
    
    # 运行在6381端口
    bind 172.18.107.180
    port 6381
    daemonize yes
    pidfile /var/run/redis_6381.pid

    3、分别指定不同配置文件启动redis服务端

    4、验证

    二、主从同步

    比如,以6380为master,以6081为slave,则在redis-6381.conf中加入:

    slaveof 172.18.107.180 6380

  • 相关阅读:
    淘宝网六个质量属性场景
    架构漫谈阅读笔记2
    poj 3304
    poj 2318
    bzoj 4008
    任意模数NTT
    CF623E
    CF712E
    bzoj 1925
    bzoj 4710
  • 原文地址:https://www.cnblogs.com/believepd/p/10609764.html
Copyright © 2011-2022 走看看