ice local ise bare config 停止 databases end
运维 Redis 集群的核心任务就是配置文件 Redis.conf
命令行将现使用的 Redis 配置参数导出到 redis.conf.bak 文件
- grep' ^ [ ^ #]' / etc / redis / redis - 7000.conf > redis.conf.bak
查看文件内容
- #关闭保护模式,让其他主机连接protected - mode no#设置端口为7000 port 7000#tcp连接等待队列长度tcp - backlog 511 timeout 0 tcp - keepalive 300#开始后台模式daemonize yes supervised no#进程文件pidfile /
- var / run / redis_7000.pid loglevel notice#日志文件保存位置logfile "/usr/local/redis/log/redis-7000.log"databases 16#设置多少微秒内发生几次写入内存keys到哈希槽时,执行copy - on - write save 900 1 save 300 10 save 60 10000#后台备份出错时,是否停止写入keys到哈希槽stop - writes - on - bgsave - error yes#数据文件是否压缩rdbcompression yes#数据文件执行校验rdbchecksum yes#数据文件保存位置dbfilename dump - 7000.rdb#数据文件保存的目录dir / usr / local / redis#主机授权密码masterauth foobared 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 foobared#最大客户端连接数maxclients 4096#是否执行边写入keys边吧备份keys到磁盘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 lua - time - limit 5000#启用集群cluster - enabled yes#集群配置文件cluster - config - file / usr / local / redis / nodes / nodes - 7000.conf 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
Redis 集群之配置文件详解(待完善)
来源: http://www.bubuko.com/infodetail-2162818.html