# 设置后台启动daemonize yes# 开启保护模式protected-mode yes# 根目录文件件dir "/home/redis/redis-4.0.10/data"# pid文件存放位置pidfile "/home/redis/redis-4.0.10/run/redis.pid"# 绑定ipbind 0.0.0.0# 绑定端口port 6379# 当客户端空闲时自动关闭连接的时间,0:永远不关闭timeout 0# tcp-keepalive 0loglevel notice# 日志位置logfile "/home/redis/redis-4.0.10/logs/redis.log"databases 16# Snapshottingsave 900 1save 300 10save 60 10000# 停止写操作当bgsave错误stop-writes-on-bgsave-error yes# 开启rdb压缩rdbcompression yes# 开启rdb校验rdbchecksum yes# rdb的导出位置dbfilename "dump.rdb"# Limits 最大客户端maxclients 10000# allkeys volatile   allkeys randommaxmemory-policy noeviction# Security#当前redis密码#requirepass redis123456# Replicationslave-serve-stale-data yesslave-read-only yesrepl-disable-tcp-nodelay noslave-priority 98min-slaves-max-lag 10#masterauth redis123456# Append Only Modeappendonly yes# appendfsync alwaysappendfsync everysec# appendfsync nono-appendfsync-on-rewrite noauto-aof-rewrite-percentage 100auto-aof-rewrite-min-size 64mb# Lua 脚本时间限制lua-time-limit 5000# Slow Logslowlog-log-slower-than 10000slowlog-max-len 128# Event Notificationnotify-keyspace-events ""# Advancedhash-max-ziplist-entries 512hash-max-ziplist-value 64list-max-ziplist-entries 512list-max-ziplist-value 64set-max-intset-entries 512zset-max-ziplist-entries 128zset-max-ziplist-value 64activerehashing yesclient-output-buffer-limit normal 0 0 0client-output-buffer-limit slave 256mb 64mb 60client-output-buffer-limit pubsub 32mb 8mb 60hz 10aof-rewrite-incremental-fsync yes