<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12
      代碼改變世界

      Redis哨兵部署

      2024-08-27 14:03  ndzj  閱讀(39)  評論(0)    收藏  舉報

      機器列表:

      主節(jié)點 192.168.232.8:7000/27000

      從節(jié)點 192.168.232.9:8000/28000, 9000/29000

       

      redis的程序編譯安裝見單實例安裝文檔

       

      主節(jié)點操作步驟:

      groupadd redis && useradd -r -g redis redis

      mkdir -p /data/redis-sentinel/7000

      配置文件 redis.conf、sentinel.conf

      cat /data/redis-sentinel/7000/redis.conf

      redis.conf  展開源碼
      bind 0.0.0.0 -::1
      protected-mode yes
      port 7000
      tcp-backlog 511
      timeout 0
      tcp-keepalive 300
      daemonize no
      pidfile /data/redis-sentinel/7000/redis_6379.pid
      loglevel notice
      logfile "/data/redis-sentinel/7000/redis.log"
      databases 16
      always-show-logo no
      set-proc-title yes
      proc-title-template "{title} {listen-addr} {server-mode}"
      stop-writes-on-bgsave-error yes
      rdbcompression yes
      rdbchecksum yes
      dbfilename dump.rdb
      rdb-del-sync-files no
      dir /data/redis-sentinel/7000/
      masterauth evoc
      replica-serve-stale-data yes
      repl-diskless-sync no
      repl-diskless-sync-delay 5
      repl-diskless-load disabled
      repl-disable-tcp-nodelay no
      replica-priority 100
      acllog-max-len 128
      requirepass evoc
      lazyfree-lazy-eviction no
      lazyfree-lazy-expire no
      lazyfree-lazy-server-del no
      replica-lazy-flush no
      lazyfree-lazy-user-del no
      lazyfree-lazy-user-flush no
      oom-score-adj no
      oom-score-adj-values 0 200 800
      disable-thp yes
      appendonly no
      appendfilename "appendonly.aof"
      appendfsync everysec
      no-appendfsync-on-rewrite no
      auto-aof-rewrite-percentage 100
      auto-aof-rewrite-min-size 64mb
      aof-load-truncated yes
      aof-use-rdb-preamble yes
      lua-time-limit 5000
      slowlog-log-slower-than 10000
      slowlog-max-len 128
      latency-monitor-threshold 0
      notify-keyspace-events ""
      hash-max-ziplist-entries 512
      hash-max-ziplist-value 64
      list-max-ziplist-size -2
      list-compress-depth 0
      set-max-intset-entries 512
      zset-max-ziplist-entries 128
      zset-max-ziplist-value 64
      hll-sparse-max-bytes 3000
      stream-node-max-bytes 4096
      stream-node-max-entries 100
      activerehashing yes
      client-output-buffer-limit normal 0 0 0
      client-output-buffer-limit replica 256mb 64mb 60
      client-output-buffer-limit pubsub 32mb 8mb 60
      hz 10
      dynamic-hz yes
      aof-rewrite-incremental-fsync yes
      rdb-save-incremental-fsync yes
      jemalloc-bg-thread yes
      

        

       

      cat /data/redis-sentinel/7000/sentinel.conf

      sentinel.conf  展開源碼
      bind 0.0.0.0
      port 27000
      daemonize yes
      pidfile "/data/redis-sentinel/7000/redis-sentinel.pid"
      logfile "/data/redis-sentinel/7000/redis-sentinel.log"
      dir "/data/redis-sentinel/7000"
      sentinel monitor mymaster 192.168.232.8 7000 2
      sentinel auth-pass mymaster evoc
      acllog-max-len 128
      requirepass "evoc"
      sentinel deny-scripts-reconfig yes
      sentinel resolve-hostnames no
      sentinel announce-hostnames no
      protected-mode no
      user default on #63f501f44249a5681b9b1c84e4a84a333401fdd3985d701824aa0ee06f68b22f ~* &* +@all
      sentinel myid c1ed6365cf13b444d519e110f56e995af61273b7
      sentinel config-epoch mymaster 0
      sentinel leader-epoch mymaster 0
      sentinel current-epoch 0
      sentinel known-replica mymaster 192.168.232.9 8000
      sentinel known-replica mymaster 192.168.232.9 9000
      sentinel known-sentinel mymaster 192.168.232.9 28000 5719a02f283307e66b804c8da510a5095d0bfc64
      sentinel known-sentinel mymaster 192.168.232.9 29000 8299c5979c6fefcbb8036fa25b83bb2c844af2e4
      

        

       

      從節(jié)點操作步驟:

      groupadd redis && useradd -r -g redis redis

      mkdir -p /data/redis-sentinel/{8000,9000}

      配置文件 redis.conf、sentinel.conf

      cat /data/redis-sentinel/8000/redis.conf

      redis.conf  展開源碼
      bind 0.0.0.0 -::1
      protected-mode yes
      port 8000
      tcp-backlog 511
      timeout 0
      tcp-keepalive 300
      daemonize no
      pidfile /usr/local/soft/redis-sentinel/8000/redis_8000.pid
      loglevel notice
      logfile "/usr/local/soft/redis-sentinel/8000/redis.log"
      databases 16
      always-show-logo no
      set-proc-title yes
      proc-title-template "{title} {listen-addr} {server-mode}"
      stop-writes-on-bgsave-error yes
      rdbcompression yes
      rdbchecksum yes
      dbfilename dump.rdb
      rdb-del-sync-files no
      dir /usr/local/soft/redis-sentinel/8000
      replica-serve-stale-data yes
      repl-diskless-sync no
      repl-diskless-sync-delay 5
      repl-diskless-load disabled
      repl-disable-tcp-nodelay no
      replica-priority 100
      acllog-max-len 128
      requirepass evoc
      replicaof 192.168.232.8 7000
      masterauth evoc
      replica-priority 100
      lazyfree-lazy-eviction no
      lazyfree-lazy-expire no
      lazyfree-lazy-server-del no
      replica-lazy-flush no
      lazyfree-lazy-user-del no
      lazyfree-lazy-user-flush no
      oom-score-adj no
      oom-score-adj-values 0 200 800
      disable-thp yes
      appendonly no
      appendfilename "appendonly.aof"
      appendfsync everysec
      no-appendfsync-on-rewrite no
      auto-aof-rewrite-percentage 100
      auto-aof-rewrite-min-size 64mb
      aof-load-truncated yes
      aof-use-rdb-preamble yes
      lua-time-limit 5000
      slowlog-log-slower-than 10000
      slowlog-max-len 128
      latency-monitor-threshold 0
      notify-keyspace-events ""
      hash-max-ziplist-entries 512
      hash-max-ziplist-value 64
      list-max-ziplist-size -2
      list-compress-depth 0
      set-max-intset-entries 512
      zset-max-ziplist-entries 128
      zset-max-ziplist-value 64
      hll-sparse-max-bytes 3000
      stream-node-max-bytes 4096
      stream-node-max-entries 100
      activerehashing yes
      client-output-buffer-limit normal 0 0 0
      client-output-buffer-limit replica 256mb 64mb 60
      client-output-buffer-limit pubsub 32mb 8mb 60
      hz 10
      dynamic-hz yes
      aof-rewrite-incremental-fsync yes
      rdb-save-incremental-fsync yes
      jemalloc-bg-thread yes

        

       

      cat /data/redis-sentinel/8000/sentinel.conf

      sentinel.conf  展開源碼
      bind 0.0.0.0
      port 28000
      daemonize yes
      pidfile "/usr/local/soft/redis-sentinel/8000/redis-sentinel.pid"
      logfile "/usr/local/soft/redis-sentinel/8000/redis-sentinel.log"
      dir "/usr/local/soft/redis-sentinel/8000"
      sentinel monitor mymaster 192.168.232.8 7000 2
      sentinel auth-pass mymaster evoc
      acllog-max-len 128
      requirepass "evoc"
      sentinel deny-scripts-reconfig yes
      sentinel resolve-hostnames no
      sentinel announce-hostnames no
      protected-mode no
      user default on #63f501f44249a5681b9b1c84e4a84a333401fdd3985d701824aa0ee06f68b22f ~* &* +@all
      sentinel myid 5719a02f283307e66b804c8da510a5095d0bfc64
      sentinel config-epoch mymaster 0
      sentinel leader-epoch mymaster 0
      sentinel current-epoch 0
      sentinel known-replica mymaster 192.168.232.9 8000
      sentinel known-replica mymaster 192.168.232.9 9000
      sentinel known-sentinel mymaster 192.168.232.8 27000 c1ed6365cf13b444d519e110f56e995af61273b7
      sentinel known-sentinel mymaster 192.168.232.9 29000 8299c5979c6fefcbb8036fa25b83bb2c844af2e4
      

        

       

      cat /data/redis-sentinel/9000/redis.conf

      redis.conf  展開源碼
      bind 0.0.0.0 -::1
      protected-mode yes
      port 9000
      tcp-backlog 511
      timeout 0
      tcp-keepalive 300
      daemonize no
      pidfile /usr/local/soft/redis-sentinel/9000/redis_9000.pid
      loglevel notice
      logfile "/usr/local/soft/redis-sentinel/9000/redis.log"
      databases 16
      always-show-logo no
      set-proc-title yes
      proc-title-template "{title} {listen-addr} {server-mode}"
      stop-writes-on-bgsave-error yes
      rdbcompression yes
      rdbchecksum yes
      dbfilename dump.rdb
      rdb-del-sync-files no
      dir /usr/local/soft/redis-sentinel/9000
      replica-serve-stale-data yes
      repl-diskless-sync no
      repl-diskless-sync-delay 5
      repl-diskless-load disabled
      repl-disable-tcp-nodelay no
      replica-priority 100
      acllog-max-len 128
      requirepass evoc
      replicaof 192.168.232.8 7000
      masterauth evoc
      replica-priority 100
      lazyfree-lazy-eviction no
      lazyfree-lazy-expire no
      lazyfree-lazy-server-del no
      replica-lazy-flush no
      lazyfree-lazy-user-del no
      lazyfree-lazy-user-flush no
      oom-score-adj no
      oom-score-adj-values 0 200 800
      disable-thp yes
      appendonly no
      appendfilename "appendonly.aof"
      appendfsync everysec
      no-appendfsync-on-rewrite no
      auto-aof-rewrite-percentage 100
      auto-aof-rewrite-min-size 64mb
      aof-load-truncated yes
      aof-use-rdb-preamble yes
      lua-time-limit 5000
      slowlog-log-slower-than 10000
      slowlog-max-len 128
      latency-monitor-threshold 0
      notify-keyspace-events ""
      hash-max-ziplist-entries 512
      hash-max-ziplist-value 64
      list-max-ziplist-size -2
      list-compress-depth 0
      set-max-intset-entries 512
      zset-max-ziplist-entries 128
      zset-max-ziplist-value 64
      hll-sparse-max-bytes 3000
      stream-node-max-bytes 4096
      stream-node-max-entries 100
      activerehashing yes
      client-output-buffer-limit normal 0 0 0
      client-output-buffer-limit replica 256mb 64mb 60
      client-output-buffer-limit pubsub 32mb 8mb 60
      hz 10
      dynamic-hz yes
      aof-rewrite-incremental-fsync yes
      rdb-save-incremental-fsync yes
      jemalloc-bg-thread yes
      

        

       

      cat /data/redis-sentinel/9000/

      sentinel.conf  展開源碼

       

      bind 0.0.0.0
      port 29000
      daemonize yes
      pidfile "/usr/local/soft/redis-sentinel/9000/redis-sentinel.pid"
      logfile "/usr/local/soft/redis-sentinel/9000/redis-sentinel.log"
      dir "/usr/local/soft/redis-sentinel/9000"
      sentinel monitor mymaster 192.168.232.8 7000 2
      sentinel auth-pass mymaster evoc
      acllog-max-len 128
      requirepass "evoc"
      sentinel deny-scripts-reconfig yes
      sentinel resolve-hostnames no
      sentinel announce-hostnames no
      protected-mode no
      user default on #63f501f44249a5681b9b1c84e4a84a333401fdd3985d701824aa0ee06f68b22f ~* &* +@all
      sentinel myid 8299c5979c6fefcbb8036fa25b83bb2c844af2e4
      sentinel config-epoch mymaster 0
      sentinel leader-epoch mymaster 0
      sentinel current-epoch 0
      sentinel known-replica mymaster 192.168.232.9 8000
      sentinel known-replica mymaster 192.168.232.9 9000
      sentinel known-sentinel mymaster 192.168.232.8 27000 c1ed6365cf13b444d519e110f56e995af61273b7
      sentinel known-sentinel mymaster 192.168.232.9 28000 5719a02f283307e66b804c8da510a5095d0bfc64
      

        

      redis相關(guān)的文件和目錄改權(quán)限

      chown -R redis.redis redis-sentinel/

      主節(jié)點和從節(jié)點啟動進程

      主節(jié)點redis啟動:

      su - redis -c "/usr/local/bin/redis-server /data/redis-sentinel/7000/redis.conf &"

       

      從節(jié)點redis啟動:

      su - redis -c "/usr/local/redis/bin/redis-server /usr/local/soft/redis-sentinel/8000/redis.conf &"

      su - redis -c "/usr/local/redis/bin/redis-server /usr/local/soft/redis-sentinel/9000/redis.conf &"

       

      主節(jié)點sentinel進程啟動:

      su - redis -c "/usr/local/bin/redis-sentinel /data/redis-sentinel/7000/sentinel.conf --sentinel &"

      從節(jié)點sentinel進程啟動:

      su - redis -c "/usr/local/redis/bin/redis-sentinel /usr/local/soft/redis-sentinel/8000/sentinel.conf --sentinel &"

      su - redis -c "/usr/local/redis/bin/redis-sentinel /usr/local/soft/redis-sentinel/9000/sentinel.conf --sentinel &"

       

      登陸:

      ./bin/redis-cli -h 192.168.232.8 -p 7000 -a xxx

      查看集群信息:

      192.168.232.8:7000> info replication

      # Replication

      role:master

      connected_slaves:2

      slave0:ip=192.168.232.9,port=9000,state=online,offset=465060,lag=1

      slave1:ip=192.168.232.9,port=8000,state=online,offset=465201,lag=0

      master_failover_state:no-failover

      master_replid:343e48473bd25170fbfe88eab881153b780657aa

      master_replid2:0000000000000000000000000000000000000000

      master_repl_offset:465215

      second_repl_offset:-1

      repl_backlog_active:1

      repl_backlog_size:1048576

      repl_backlog_first_byte_offset:1

      repl_backlog_histlen:465215

      查看哨兵:

      root@evoc-R322N6:/usr/local# ./bin/redis-cli -h 192.168.232.8 -p 27000 -a xxx
      Warning: Using a password with '-a' or '-u' option on the command line interface may not be safe.
      192.168.232.8:27000> Info Sentinel
      # Sentinel
      sentinel_masters:1
      sentinel_tilt:0
      sentinel_running_scripts:0
      sentinel_scripts_queue_length:0
      sentinel_simulate_failure_flags:0
      master0:name=mymaster,status=ok,address=192.168.232.8:7000,slaves=2,sentinels=3

       

      關(guān)閉redis命令
      ./bin/redis-cli -h 192.168.232.8 -p 7000 -a testdb shutdown

      ./bin/redis-cli -h 192.168.232.9 -p 8000 -a xxx shutdown

      ./bin/redis-cli -h 192.168.232.9 -p 9000 -a xxx shutdown

      關(guān)閉 sentinel 哨兵命令
      ./bin/redis-cli -h 192.168.232.8 -p 27000 -a xxx shutdown

      ./bin/redis-cli -h 192.168.232.9 -p 28000 -a xxx shutdown

      ./bin/redis-cli -h 192.168.232.9 -p 29000 -a xxx shutdown

      主站蜘蛛池模板: 久久亚洲人成网站| 无码熟妇人妻av在线电影| 毛片无遮挡高清免费| 狠狠综合久久av一区二| 无码人妻丰满熟妇区毛片18| 狠狠人妻久久久久久综合蜜桃| 高清性欧美暴力猛交| 亚洲跨种族黑人xxxxx| 亚洲国产一区二区三区久| 看免费真人视频网站| 欧美又黄又大又爽a片三年片| 中国女人熟毛茸茸A毛片| 太原市| 中文字幕一区二区精品区| 亚洲精品熟女一区二区| 伊人大杳焦在线| 国产免费播放一区二区三区| 久久精品亚洲中文无东京热| 国内精品久久久久影院薰衣草| 亚州av第二区国产精品| 色综合久久久久综合体桃花网| 欧美高清freexxxx性| 国产二区三区不卡免费| 青草内射中出高潮| 色综合天天综合网国产人| 又大又长粗又爽又黄少妇毛片| 免费 黄 色 人成 视频 在 线| av亚洲一区二区在线| 欧洲精品色在线观看| 国产成人精品无码播放| 精品无码国产一区二区三区av | 图片区 小说区 区 亚洲五月| 把腿张开ji巴cao死你h| 精品国产女同疯狂摩擦2| 国语对白做受xxxxx在线中国| 久久国产精品亚洲精品99| 国产精品大全中文字幕| 人妻少妇456在线视频| 我要看亚洲黄色太黄一级黄| 骚虎视频在线观看| 亚洲黄色片一区二区三区|