Redis centos 6.4 x86_64 default configuration. If you have any misunderstanding, please correct it :))
# Generated by install_server.sh ### Redis configuration file example # Note on units: when memory size is needed, it is possible to specify #1 k => 1000 bytes 1 m 1g # 1kb => 1024 bytes 1 mb 1 gb # units are case insensitive so 1 GB 1 Gb 1 gB are all the same. daemonize yes # whether to run pidfile/var/run/redis_62.16.pid # port 6379 in daemon mode # If the listening port is set to 0, TCP is not monitored socket # bind 127.0.0.1 # bind an interface to listen for connections, if this parameter is not set, all connections are monitored. # unixsocket/tmp/redis. sock # unix socket used to listen for connection # unixsocketperm 755 # socket File Permission timeout 0 # automatically disconnect after the client is idle for N seconds, 0 is not limited # request timeout time tcp-keepalive 0 # TCP connection survival time, 0 is not limited, 60 (seconds) loglevel notice # Log Level debug (debugging, A large amount of log information) verbose (detailed) notice (moderately detailed) warning (only recording serious information) logfile/var/log/redis_62.16.log # log file, using stdout, logs will be sent to/dev/null # syslog-enabled no # enable system logs # syslog-ident redis # system log ID # syslog-facility local0 # system log USER or LOCAL0 -LOCAL7databases 16 # Number of enabled databases, the default value is 0. SELECT <dbid> is used for switching (starting from 0) save 900 1 # Number of key changes followed up, and snapshots are created during the specified period, save data to disk 300 10 # more than 10 key operations, 300 seconds save 60 10000 # more than 10000 times 60 seconds; if it is set to save ", the real-time storage is stopped-writes-on-bgsave-error yes # rdbcompression yes is prohibited when the storage is incorrect # Use LZF to compress the storage disk rdbchecksum yes # save verification CRC64 verify dbfilename dump. rdb # storage database file name dir/var/lib/redis/6379 # working directory (Data Storage path) # slaveof <masterip> <masterport> # master server information on the slave server # masterauth <master-password> # master server password slave-serve-stale-data yes # slave server access to slave-read-only yes # slave server read-only # repl-ping-slave-period 10 # interval of sending ping information from Server 10 seconds # repl-timeout 60 # timeout time repl-disable-tcp-nodelay no # enable small TCP packets (system processing will consume some time) slave-priority 100 # the smaller the slave server priority, the higher the priority. # requirepass foobared # Use the password, AUTH <PASSWORD> Verification # rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52 # command rename # rename-command CONFIG "" ## command removal # problems may occur from the server # maxclients 10000 # maximum number of connections default 10000 # maxmemory <bytes> # Memory limit # maxmemory-policy volatile-lru # (based on the latest algorithm) the cleaning rules are as follows # volatile-lru-> remove the key with an expire set using an LRU algorithm # allkeys-lru-> remove any key accordingly to the LRU algorithm # volatile -random-> remove a random key with an expire set # allkeys-random-> remove a random key, any key # volatile-ttl-> remove the key with the nearest expire time (minor TTL) # noeviction-> don't expire at all, just return an error on write operations # maxmemory-samples 3 # number of keys checked by the LRU algorithm appendonly no # enable AOF log mode # appendfilename appendonly. aof # AOF mode file name # appendfsync always # record all operations appendfsync everysec # record once per second # appendfsync no # no-appendfsync-on-rewrite no # whether to allow overwrite the AOF File auto-aof-rewrite-percentage 100 # The AOF file will automatically overwrite the auto-aof-rewrite-min-size 64 mb after the size limit is exceeded 100% # the size limit of the AOF file lua- time-limit 5000 # maximum Lua code execution time, 0 indicates no restriction on slowlog-log-slower-than 10000 # slow execution record slowlog-max-len 128 ## Maximum length of slow execution record ########## ##################### Advanced Configuration ################# ############# hash-max-ziplist-entries 512hash-max-ziplist-value between 512list-max-ziplist-value between 128zset-max-ziplist-value 64 activerehashing yes # client category restrictions: # normal-> normal clients # slave-> slave clients and MONITOR clients # pubsub-> clients subcribed to at least one pubsub channel or pattern # client-output-buffer- limit <class>
This article from the "micro life for-micro life" blog, please be sure to keep this source http://vsfor.blog.51cto.com/4165449/1300185