• 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
  • 相关阅读:
    python 标准库和第3方库的介绍
    delphi延时函数
    delphi控件的安装
    Hadoop 第一课:linux常用命令
    复习 struts1 开发步骤
    struts学习:传统方法完成struts注册表单校验与回显数据
    struts入门第一个案例
    Java Ant build.xml详解
    HTTP 方法:GET 对比 POST
    HTTP 返回的状态消息
  • 原文地址:https://www.cnblogs.com/fengjian2016/p/10948069.html
Copyright © 2020-2023  润新知