美文网首页中间件
redis配置,启动

redis配置,启动

作者: lockdreamer | 来源:发表于2019-01-15 08:58 被阅读12次

    1、软件配置

    vim ~/redis/config/redis-xx.conf

    配置端口时注意:集群总线端口总是比命令端口高10000

    daemonize yes

    pidfile /home/wltx/redis/log/redis-27100.pid

    port 27100

    bind 192.168.27.94

    cluster-enabled yes

    cluster-config-file nodes-27100.conf

    dir /home/wltx/redis/data

    cluster-node-timeout 2000

    cluster-require-full-coverage no

    aof-rewrite-incremental-fsync yes

    tcp-backlog 511

    timeout 300

    tcp-keepalive 5

    loglevel verbose

    logfile "/home/wltx/redis/log/redis-27100.log"

    databases 16

    save 900 1

    save 300 10

    save 60 10000

    stop-writes-on-bgsave-error no

    rdbcompression yes

    rdbchecksum yes

    dbfilename dump-27100.rdb

    dir /home/yangsw/redis/data

    slave-serve-stale-data yes

    slave-read-only yes

    repl-diskless-sync no

    repl-diskless-sync-delay 5

    repl-disable-tcp-nodelay no

    slave-priority 100

    appendonly yes

    appendfilename "appendonly-27100.aof"

    dir /home/wltx/redis/data

    appendfsync everysec

    no-appendfsync-on-rewrite no

    auto-aof-rewrite-percentage 100

    auto-aof-rewrite-min-size 64mb

    aof-load-truncated 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-entries 512

    list-max-ziplist-value 64

    set-max-intset-entries 512

    zset-max-ziplist-entries 128

    zset-max-ziplist-value 64

    hll-sparse-max-bytes 3000

    activerehashing yes

    client-output-buffer-limit normal 0 0 0

    client-output-buffer-limit slave 256mb 64mb 60

    client-output-buffer-limit pubsub 32mb 8mb 60

    hz 10

    maxclients 15000

    2、redis启动和添加集群

    redis-allstartup.sh

    lockdreamer

    redis-allstop.sh

    lockdreamer

    redis的6个节点都启动后,添加集群

    lockdreamer

    3、查看集群状态

    先登录redis客户端,然后执行 cluster nodes

    lockdreamer

    相关文章

      网友评论

        本文标题:redis配置,启动

        本文链接:https://www.haomeiwen.com/subject/rqyjdqtx.html