Redis 配置
Redis 的配置文件位于 Redis 安装目录下,文件名为 redis.conf(Windows 名为 redis.windows.conf)。
你可以通过 CONFIG 命令查看或设置配置项。
语法
Redis CONFIG 命令格式如下:
redis 127.0.0.1:6379> CONFIG GET CONFIG_SETTING_NAME
实例
redis 127.0.0.1:6379> CONFIG GET loglevel1) "loglevel"
2) "notice"
使用 * 号获取所有配置项:
实例
redis 127.0.0.1:6379> CONFIG GET *1) "dbfilename"2) "dump.rdb"3) "requirepass"4) ""5) "masterauth"6) ""7) "unixsocket"8) ""9) "logfile"10) ""11) "pidfile"12) "/var/run/redis.pid"13) "maxmemory"14) "0"15) "maxmemory-samples"16) "3"17) "timeout"18) "0"19) "tcp-keepalive"20) "0"21) "auto-aof-rewrite-percentage"22) "100"23) "auto-aof-rewrite-min-size"24) "67108864"25) "hash-max-ziplist-entries"26) "512"27) "hash-max-ziplist-value"28) "64"29) "list-max-ziplist-entries"30) "512"31) "list-max-ziplist-value"32) "64"33) "set-max-intset-entries"34) "512"35) "zset-max-ziplist-entries"36) "128"37) "zset-max-ziplist-value"38) "64"39) "hll-sparse-max-bytes"40) "3000"41) "lua-time-limit"42) "5000"43) "slowlog-log-slower-than"44) "10000"45) "latency-monitor-threshold"46) "0"47) "slowlog-max-len"48) "128"49) "port"50) "6379"51) "tcp-backlog"52) "51