10029---Redis--配置文件-redis.conf

来源:互联网 发布:mysql是否锁表 编辑:程序博客网 时间:2024/05/21 22:55

1.它在哪

redis.conf,先copy再修改,不要在原有文件上直接修改

2.Units单位

# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
# 1gb => 1024*1024*1024 bytes
#
# units are case insensitive so 1GB 1Gb 1gB are all the same.

3.Includes包含哪些

# include /path/to/local.conf
# include /path/to/other.conf

和struts2配置文件类似,可以通过include包含,redis.conf可以作为总闸,包含其他。

4.General通用

daemonize yes #守护进程运行

port 6379 #

tcp-backlog 511 #


timeout  0 #客户端闲置多少秒后,断开连接。0标示一直连着

tcp-keepalive 300 #

loglvevel notice

#server日志级别,合法值:debug,verbose,notice,warning 默认为notice
#debug适合开发环境,客户端操作信息都会输出日志
#verbose输出一些相对有用的信息,目前效果不明
#notice适合生产环境
#warning异常信息

logfile "" #

databases 10 #

5.Snapshotting快照

6.Replication复制

7.Security安全

>config get requirepass #密码

>config set requirepass "pass123"#密码

>config get dir #返回路径

8.Limits限制

maxclients

maxmemory

maxmemory-policy

maxmemory-samples


----


9.Append only mode追加

10.常见redis.conf配置介绍



0 0
原创粉丝点击