(based on Redis 2.6)
Base section Settings:
Daemonize No
#默认情况下redis is not running in the daemon mode.
Pidfile/var/run/redis.pid
#在守护进程模式下, the location where the PID process number file path is stored
Port 6379
#监听的端口号, set to 0, Redis will not listen to TCP connections;
Bind 127.0.0.1
#绑定本机单一网卡适配器, the default is all network adapters on this computer
Unixsocket/tmp/redis.sock
Unixsocketperm 755
#默认情况下 Redis is not established by UNIX socket connection;
Timeout 0
#客户端空闲n秒后断开连接; 0 means not active disconnect;
Tcp-keepalive 0
#在linux上, each time sends the empty packet of so_keepalive ack; The recommended value is 60s;
Two reasons to do this:
1. Prevent a command from being disconnected as long as it reaches the timeout timeout period;
2, improve the connection error detection
(For a long idle TCP connection, it is easy to close the NAT, firewall, etc. directly.) In this case, the client and server are not aware of the operation without IO. In addition, like the server program or network (hardware) suddenly crash off, the same situation. )
Using KeepAlive, the kernel will periodically help you send an empty ACK packet, if the connection is disconnected or the network unreachable, you will receive a RST.
LogLevel Notice
#记录日志的级别:
Debug: Contains all the information, mainly used in the development environment;
Verbose: Displays only useful information compared to debug;
Notice: Recommended configuration for production environment
Warning: Only important, error and critical information are recorded;
LogFile stdout
#日志文件记录位置, if the mode of the Daemonize daemon is adopted and the parameter value is stdout, then logs is redirected to/dev/null
Syslog-enabled No
#将日志信息记录到 the syslog file. default is not allowed;
Syslog-facility local0 (must be local 0--7)
Log Device as Syslog
Databases 16