redis配置相关

  1. 获取redis配置项
config get 配置项 [配置项1]

获取端口号

127.0.0.1:6379> config get port
1) "port"
2) "6379"

获取所有的配置项

127.0.0.1:6379> config get *
127.0.0.1:6379> config get *
  1) "cluster-allow-replica-migration"
  2) "yes"
  3) "cluster-announce-bus-port"
  4) "0"
  5) "client-query-buffer-limit"
  6) "1073741824"
  7) "replicaof"
  8) ""
  9) "repl-diskless-sync"
 10) "yes"
 11) "maxmemory-samples"
 12) "5"
 13) "io-threads"
 14) "1"
 15) "tls-ca-cert-dir"
 16) ""
 17) "cluster-enabled"
 18) "no"
 19) "lfu-decay-time"
 20) "1"
 21) "latency-tracking-info-percentiles"
 22) "50 99 99.9"
 23) "busy-reply-threshold"
 24) "5000"
 25) "active-defrag-cycle-min"
 26) "1"
 27) "daemonize"  #Redis默认不是以守护进程的方式运行,可以通过该配置项修改,使用yes启用守护进程
 28) "no"
 29) "syslog-facility"
 30) "local0"
 31) "min-replicas-to-write"
 32) "0"
 33) "shutdown-timeout"
 34) "10"
 35) "active-defrag-ignore-bytes"
 36) "104857600"
 37) "replica-announce-ip"
 38) ""
 39) "masteruser"
 40) ""
 41) "list-compress-depth"
 42) "0"
 43) "active-defrag-threshold-lower"
 44) "10"
 45) "tls-ciphersuites"
 46) ""
 47) "replica-read-only"
 48) "yes"
 49) "tls-client-key-file-pass"
 50) ""
 51) "pidfile" # 当Redis以守护进程方式运行时,Redis默认会把pid写入/var/run/redis.pid文件,可以通过pidfile指定
 52) "/var/run/redis_6379.pid"
 53) "tls-key-file"
 54) ""
 55) "cluster-allow-reads-when-down"
 56) "no"
 57) "maxmemory-eviction-tenacity"
 58) "10"
 59) "cluster-slave-no-failover"
 60) "no"
 61) "cluster-migration-barrier"
 62) "1"
 63) "replica-ignore-maxmemory"
 64) "yes"
 65) "maxmemory"
 66) "0"
 67) "syslog-ident"
 68) "redis"
 69) "tls-key-file-pass"
 70) ""
 71) "tcp-backlog"
 72) "511"
 73) "crash-log-enabled"
 74) "yes"
 75) "sanitize-dump-payload"
 76) "no"
 77) "zset-max-ziplist-value"
 78) "64"
 79) "latency-tracking"
 80) "yes"
 81) "appendfsync"
 82) "everysec"
 83) "lazyfree-lazy-user-del"
 84) "no"
 85) "slave-announce-port"
 86) "0"
 87) "rdbcompression"
 88) "yes"
 89) "cluster-config-file"
 90) "nodes.conf"
 91) "requirepass"
 92) ""
 93) "replica-announced"
 94) "yes"
 95) "replica-priority"
 96) "100"
 97) "list-max-ziplist-size"
 98) "-2"
 99) "slowlog-max-len"
100) "128"
101) "auto-aof-rewrite-min-size"
102) "67108864"
103) "set-proc-title"
104) "yes"
105) "cluster-replica-no-failover"
106) "no"
107) "shutdown-on-sigterm"
108) "default"
109) "active-defrag-max-scan-fields"
110) "1000"
111) "jemalloc-bg-thread"
112) "yes"
113) "aof-rewrite-incremental-fsync"
114) "yes"
115) "slowlog-log-slower-than"
116) "10000"
117) "unixsocket"
118) ""
119) "syslog-enabled"
120) "no"
121) "oom-score-adj-values"
122) "0 200 800"
123) "logfile"
124) "/var/log/redis/redis.log"
125) "set-max-intset-entries"
126) "512"
127) "aclfile"
128) ""
129) "active-expire-effort"
130) "1"
131) "repl-ping-slave-period"
132) "10"
133) "masterauth"
134) ""
135) "tls-dh-params-file"
136) ""
137) "aof_rewrite_cpulist"
138) ""
139) "tls-ciphers"
140) ""
141) "hash-max-listpack-value"
142) "64"
143) "maxmemory-clients"
144) "0"
145) "enable-debug-command"
146) "no"
147) "dbfilename"
148) "dump.rdb"
149) "dir"
150) "/var/lib/redis"
151) "supervised"
152) "systemd"
153) "bio_cpulist"
154) ""
155) "hash-max-listpack-entries"
156) "512"
157) "activedefrag"
158) "no"
159) "cluster-slave-validity-factor"
160) "10"
161) "bind-source-addr"
162) ""
163) "server_cpulist"
164) ""
165) "tracking-table-max-keys"
166) "1000000"
167) "appenddirname"
168) "appendonlydir"
169) "databases"
170) "16"
171) "slave-ignore-maxmemory"
172) "yes"
173) "rdb-del-sync-files"
174) "no"
175) "auto-aof-rewrite-percentage"
176) "100"
177) "replica-announce-port"
178) "0"
179) "ignore-warnings"
180) ""
181) "cluster-require-full-coverage"
182) "yes"
183) "repl-disable-tcp-nodelay"
184) "no"
185) "maxmemory-policy"
186) "noeviction"
187) "replica-lazy-flush"
188) "no"
189) "cluster-allow-pubsubshard-when-down"
190) "yes"
191) "cluster-announce-port"
192) "0"
193) "lfu-log-factor"
194) "10"
195) "slave-announce-ip"
196) ""
197) "stream-node-max-bytes"
198) "4096"
199) "rdbchecksum"
200) "yes"
201) "protected-mode"
202) "yes"
203) "stream-node-max-entries"
204) "100"
205) "repl-diskless-sync-delay"
206) "5"
207) "slave-serve-stale-data"
208) "yes"
209) "bind" #绑定的主机地址
210) "127.0.0.1 -::1"
211) "hash-max-ziplist-value"
212) "64"
213) "crash-memcheck-enabled"
214) "yes"
215) "lazyfree-lazy-server-del"
216) "no"
217) "repl-timeout"
218) "60"
219) "lazyfree-lazy-expire"
220) "no"
221) "tls-session-cache-timeout"
222) "300"
223) "dynamic-hz"
224) "yes"
225) "activerehashing"
226) "yes"
227) "propagation-error-behavior"
228) "ignore"
229) "acllog-max-len"
230) "128"
231) "tls-client-cert-file"
232) ""
233) "tls-cert-file"
234) ""
235) "min-replicas-max-lag"
236) "10"
237) "repl-ping-replica-period"
238) "10"
239) "cluster-announce-ip"
240) ""
241) "timeout" #当 客户端闲置多长时间后关闭连接,如果指定为0,表示关闭该功能
242) "0"
243) "slave-read-only"
244) "yes"
245) "slave-lazy-flush"
246) "no"
247) "slave-priority"
248) "100"
249) "rdb-save-incremental-fsync"
250) "yes"
251) "hll-sparse-max-bytes"
252) "3000"
253) "replica-serve-stale-data"
254) "yes"
255) "port"
256) "6379"
257) "stop-writes-on-bgsave-error"
258) "yes"
259) "cluster-link-sendbuf-limit"
260) "0"
261) "hash-max-ziplist-entries"
262) "512"
263) "hz"
264) "10"
265) "tls-cluster"
266) "no"
267) "socket-mark-id"
268) "0"
269) "lazyfree-lazy-user-flush"
270) "no"
271) "cluster-preferred-endpoint-type"
272) "ip"
273) "repl-backlog-size"
274) "1048576"
275) "lazyfree-lazy-eviction"
276) "no"
277) "save"
278) "3600 1 300 100 60 10000"
279) "loglevel" # 指定日志记录级别,Redis总共支持四个级别:debug、verbose、notice、warning,默认为verbose
280) "notice"
281) "slaveof"
282) ""
283) "tls-protocols"
284) ""
285) "replica-ignore-disk-write-errors"
286) "no"
287) "enable-protected-configs"
288) "no"
289) "cluster-announce-tls-port"
290) "0"
291) "enable-module-command"
292) "no"
293) "repl-diskless-load"
294) "disabled"
295) "zset-max-listpack-entries"
296) "128"
297) "latency-monitor-threshold"
298) "0"
299) "tls-session-cache-size"
300) "20480"
301) "active-defrag-cycle-max"
302) "25"
303) "tls-prefer-server-ciphers"
304) "no"
305) "notify-keyspace-events"
306) ""
307) "lua-time-limit"
308) "5000"
309) "cluster-announce-hostname"
310) ""
311) "tls-auth-clients"
312) "yes"
313) "min-slaves-to-write"
314) "0"
315) "aof-timestamp-enabled"
316) "no"
317) "tls-replication"
318) "no"
319) "always-show-logo"
320) "no"
321) "unixsocketperm"
322) "0"
323) "aof-use-rdb-preamble"
324) "yes"
325) "proto-max-bulk-len"
326) "536870912"
327) "zset-max-ziplist-entries"
328) "128"
329) "io-threads-do-reads"
330) "no"
331) "cluster-replica-validity-factor"
332) "10"
333) "list-max-listpack-size"
334) "-2"
335) "cluster-node-timeout"
336) "15000"
337) "proc-title-template"
338) "{title} {listen-addr} {server-mode}"
339) "acl-pubsub-default"
340) "resetchannels"
341) "disable-thp"
342) "yes"
343) "repl-backlog-ttl"
344) "3600"
345) "client-output-buffer-limit"
346) "normal 0 0 0 slave 268435456 67108864 60 pubsub 33554432 8388608 60"
347) "no-appendfsync-on-rewrite"
348) "no"
349) "repl-diskless-sync-max-replicas"
350) "0"
351) "cluster-port"
352) "0"
353) "tls-session-caching"
354) "yes"
355) "appendonly"
356) "no"
357) "oom-score-adj"
358) "no"
359) "tls-ca-cert-file"
360) ""
361) "aof-disable-auto-gc"
362) "no"
363) "shutdown-on-sigint"
364) "default"
365) "tcp-keepalive"
366) "300"
367) "tls-port"
368) "0"
369) "active-defrag-threshold-upper"
370) "100"
371) "maxclients"
372) "10000"
373) "tls-client-key-file"
374) ""
375) "aof-load-truncated"
376) "yes"
377) "appendfilename"
378) "appendonly.aof"
379) "min-slaves-max-lag"
380) "10"
381) "bgsave_cpulist"
382) ""
383) "zset-max-listpack-value"
384) "64"

  1. 设置小程序配置项
config set 配置项  配置项的值
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值