1.Redis配置文件解读
-
Redis守护进程的方式配置 : daemonize no/yes
-
pid文件 :*pidfile redis.pid
-
端口:port 6379;默认为6379
-
绑定的主机地址 :bind 127.0.0.1
-
日志记录级别,Redis总共支持四个级别:debug、verbose、notice、warning ;设置参数:loglevel verbose
-
指定在多长时间内,有多少次更新操作,就将数据同步到数据文件。使用默认的就可以了。save ;默认设置为:
save 900 1 ;save 300 10;save 60 10000;分别表示900秒(15分钟)内有1个更改,300秒(5分钟)内有10个更改以及60秒内有10000个更改,就会将内容写入rdb文件中。 -
存储至本地数据库时是否压缩数据 :rdbcompression yes/no
-
本地数据库文件名 : dbfilename dump.rdb
-
本地数据库存放目录 : dir ./
-
自动从master进行数据同步 :slaveof
-
设置同一时间最大客户端连接数 :maxclients 128
-
指定是否在每次更新操作后进行日志记录 :appendonly no/yes
-
指定更新日志文件名 : appendfilename appendonly.aof
-
更新日志条件:appendfsync everysec/no/always