zoukankan      html  css  js  c++  java
  • redis 部署

    wget http://download.redis.io/releases/redis-4.0.14.tar.gz

    tar -zxvf redis-4.0.14.tar.gz

     mv redis-4.0.14 /data/redis

    编译

    cd redis/
    make
    make install

    建立目录

    mkdir  /data/redis/{run,data,logs}

    修改启动  vim /data/redis/redis.conf

    bind 0.0.0.0
    protected-mode yes
    port 6379
    tcp-backlog 511
    timeout 0
    tcp-keepalive 300
    daemonize yes
    supervised no
    pidfile /data/redis/run/redis_6379.pid
    loglevel notice
    logfile "/data/redis/logs/access.log"
    databases 16
    always-show-logo yes
    save 900 1
    save 300 10
    save 60 10000
    stop-writes-on-bgsave-error yes
    rdbcompression yes
    rdbchecksum yes
    dbfilename dump.rdb
    dir /data/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
    requirepass abc123456789
    lazyfree-lazy-eviction no
    lazyfree-lazy-expire no
    lazyfree-lazy-server-del no
    slave-lazy-flush no
    appendonly yes
    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 no
    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
    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
    aof-rewrite-incremental-fsync yes
    requirepass abc123456789

    启动

    /usr/local/bin/redis-server  /data/redis/redis.conf
  • 相关阅读:
    实用函数,array_column。从二维数组中获取想要的一位数组。
    解决小程序swiper层级太高问题
    小程序模拟领红包
    小程序,红包弹出层布局
    小程序核销功能
    小程序 text标签中一定 不要换行,不要随便格式化!!!
    小程序动态修改json中的配置
    小程序支付
    docker常用命令
    ssh修改默认端口
  • 原文地址:https://www.cnblogs.com/fengjian2016/p/10948069.html
Copyright © 2011-2022 走看看