redis.conf詳細の基本構成
6941 ワード
# , 1k, 5GB, 4M , ( )
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
# 1gb => 1024*1024*1024 bytes
#
# . 1gb 1Gb 1GB 1gB, 1kb 1k
# daemonize no ,redis , , yes
daemonize yes
# redis pid ,[Redis](http://yijiebuyi.com/so.html?k=redis) pid /var/run/redis.pid, 。
# redis , pid
pidfile /var/run/redis.pid
# redis , 6379
port 6379
# redis IP , , ,
#
# bind 127.0.0.1
# Specify the path for the unix socket that will be used to listen for
# incoming connections. There is no default, so Redis will not listen
# on a unix socket when not specified.
#
# unixsocket /tmp/redis.sock
# unixsocketperm 755
# , 。 ,
# 0
timeout 0
# down ACK TCP ( ),
# 60。
tcp-keepalive 0
#
# Redis :debug、verbose、notice、warning, verbose
# debug ,
# varbose , debug
# notice verbose,
# warning
loglevel debug
# log
# stdout, , /dev/null, , logfile
#logfile stdout
logfile /var/log/redis/redis.log
# 'syslog-enabled' yes,
# and optionally update the other syslog parameters to suit your needs.
# syslog-enabled no
# syslog
# syslog-ident redis
# syslog , LOCAL0-LOCAL7
# syslog-facility local0
#
# 16, 0, 0-(database-1)
databases 16
################################ #################################
#
# , :
#
# save <seconds> <changes>
#
# , , rdb。
# ,
#
# ,
#
# save 900 1 900 1 key
# save 300 10 300 300 key
# save 60 10000 60 10000 key
save 900 1
save 300 10
save 60 10000
# ( rdb ) , yes
rdbcompression yes
# , dump.rdb
dbfilename dump.rdb
#
#
# 。
# redis , , ,
# , 。
#
# AOF
#
#
dir ./
################################# #################################
# . .
# slav , master IP , Redis , master
#
# slaveof <masterip> <masterport>
# master ( requirepass )
# slav master
#
# masterauth <master-password>
# , :
#
# 1) slave-serve-stale-data yes( ),
# 2) slave-serve-stale-data no, INFO SLAVOF
# "SYNC with master in progress"
slave-serve-stale-data yes
# PINGs. repl-ping-slave-period , 10
# repl-ping-slave-period 10
# repl-timeout ping , 60
# repl-timeout repl-ping-slave-period
# repl-timeout 60