Refactor Redis configuration settings
This commit is contained in:
+12
-15
@@ -1,30 +1,27 @@
|
||||
# Redis 服务端口号
|
||||
# 网络
|
||||
bind 0.0.0.0
|
||||
port 6379
|
||||
|
||||
# 绑定的 IP 地址,如果需要公开访问,请设置为 0.0.0.0
|
||||
bind 0.0.0.0
|
||||
|
||||
# 认证
|
||||
requirepass YourStrongPassword
|
||||
|
||||
|
||||
# 数据目录
|
||||
dir /data/
|
||||
dir /data
|
||||
|
||||
# 设置数据库数量,默认为 16 个数据库
|
||||
databases 16
|
||||
|
||||
# 持久化配置
|
||||
|
||||
# 是否开启持久化,默认为 no
|
||||
# RDB 快照
|
||||
save 900 1
|
||||
save 300 10
|
||||
save 60 10000
|
||||
|
||||
|
||||
# 是否开启 AOF 持久化,默认为 no
|
||||
# AOF 持久化
|
||||
appendonly yes
|
||||
|
||||
# AOF 文件名
|
||||
appendfilename "appendonly.aof"
|
||||
|
||||
# AOF 同步方式
|
||||
appendfsync everysec
|
||||
|
||||
|
||||
# 内存限制(按需修改)
|
||||
maxmemory 2gb
|
||||
maxmemory-policy allkeys-lru
|
||||
|
||||
Reference in New Issue
Block a user