当前位置:Gxlcms > redis > redis配置文件在哪里

redis配置文件在哪里

时间:2021-07-01 10:21:17 帮助过:1415人阅读

Redis的配置文件位于Redis安装目录下,文件名为redis.conf(Windows 名为 redis.windows.conf)。

你可以通过 CONFIG 命令查看或设置配置项。


Redis CONFIG 命令格式如下:

redis 127.0.0.1:6379> CONFIG GET CONFIG_SETTING_NAME

实例:

  1. redis 127.0.0.1:6379> CONFIG GET loglevel
  2. 1) "loglevel"
  3. 2) "notice"

使用 * 号获取所有配置项:

  1. redis 127.0.0.1:6379> CONFIG GET *
  2. "dbfilename"
  3. "dump.rdb"
  4. "requirepass"
  5. ""
  6. "masterauth"
  7. ""
  8. "unixsocket"
  9. ""
  10. "logfile"
  11. ""
  12. "pidfile"
  13. "/var/run/redis.pid"
  14. "maxmemory"
  15. "0"
  16. "maxmemory-samples"
  17. "3"
  18. "timeout"
  19. "0"
  20. "tcp-keepalive"
  21. "0"
  22. "auto-aof-rewrite-percentage"
  23. "100"
  24. "auto-aof-rewrite-min-size"
  25. "67108864"
  26. "hash-max-ziplist-entries"
  27. "512"
  28. "hash-max-ziplist-value"
  29. "64"
  30. "list-max-ziplist-entries"
  31. "512"
  32. "list-max-ziplist-value"
  33. "64"
  34. "set-max-intset-entries"
  35. "512"
  36. "zset-max-ziplist-entries"
  37. "128"
  38. "zset-max-ziplist-value"
  39. "64"
  40. "hll-sparse-max-bytes"
  41. "3000"
  42. "lua-time-limit"
  43. "5000"
  44. "slowlog-log-slower-than"
  45. "10000"
  46. "latency-monitor-threshold"
  47. "0"
  48. "slowlog-max-len"
  49. "128"
  50. "port"
  51. "6379"
  52. "tcp-backlog"
  53. "511"
  54. "databases"
  55. "16"
  56. "repl-ping-slave-period"
  57. "10"
  58. "repl-timeout"
  59. "60"
  60. "repl-backlog-size"
  61. "1048576"
  62. "repl-backlog-ttl"
  63. "3600"
  64. "maxclients"
  65. "4064"
  66. "watchdog-period"
  67. "0"
  68. "slave-priority"
  69. "100"
  70. "min-slaves-to-write"
  71. "0"
  72. "min-slaves-max-lag"
  73. "10"
  74. "hz"
  75. "10"
  76. "no-appendfsync-on-rewrite"
  77. "no"
  78. "slave-serve-stale-data"
  79. "yes"
  80. "slave-read-only"
  81. "yes"
  82. "stop-writes-on-bgsave-error"
  83. "yes"
  84. "daemonize"
  85. "no"
  86. "rdbcompression"
  87. "yes"
  88. "rdbchecksum"
  89. "yes"
  90. "activerehashing"
  91. "yes"
  92. "repl-disable-tcp-nodelay"
  93. "no"
  94. "aof-rewrite-incremental-fsync"
  95. "yes"
  96. "appendonly"
  97. "no"
  98. "dir"
  99. "/home/deepak/Downloads/redis-2.8.13/src"
  100. "maxmemory-policy"
  101. "volatile-lru"
  102. "appendfsync"
  103. "everysec"
  104. "save"
  105. "3600 1 300 100 60 10000"
  106. "loglevel"
  107. "notice"
  108. "client-output-buffer-limit"
  109. "normal 0 0 0 slave 268435456 67108864 60 pubsub 33554432 8388608 60"
  110. "unixsocketperm"
  111. "0"
  112. "slaveof"
  113. ""
  114. "notify-keyspace-events"
  115. ""
  116. "bind"

更多Redis相关知识,请访问Redis使用教程栏目!

以上就是redis配置文件在哪里的详细内容,更多请关注Gxl网其它相关文章!

人气教程排行