Redis.conf

单位配置文件对大小写不敏感# 1k => 1000 bytes# 1kb => 1024 bytes# 1m => 1000000 bytes# 1mb => 1024*1024 bytes# 1g => 1000000000 bytes# 1gb => 1024*1024*1024 bytes…………蕴含# include /path/to/local.conf# include /path/to/other.conf…………bind 127.0.0.1        绑定的ipprotected-mode yes        保护模式port 6379        端口################################# GENERAL #####################################daemonize yes        守护过程形式运行,默认nopidfile /www/server/redis/redis.pid        如果当前台形式运行,要指定pid# Specify the server verbosity level.# This can be one of:# debug (a lot of information, useful for development/testing)# verbose (many rarely useful info, but not a mess like the debug level)# notice (moderately verbose, what you want in production probably)默认,生产环境# warning (only very important / critical messages are logged)loglevel noticelogfile "/www/server/redis/redis.log"        地位# dbid is a number between 0 and 'databases'-1databases 16        默认16个数据库长久化,redis是内存数据库,断电即失save 900 1        如果900s内至多有一个key批改,进行长久化操作save 300 10save 60 10000        stop-writes-on-bgsave-error yes        长久化出错,是否持续工作        rdbcompression yes        是否压缩 rdb 文件,要耗费肯定的cpu资源    rdbchecksum yes        保留 rdb 文件 是否要校验    dbfilename dump.rdb        rdb 文件保留目录        ################################# REPLICATION #################################     ################################# SECURITY ################################## requirepass foobared        设置明码        ################################### CLIENTS ##################################### maxclients 10000        最大的连接数############################## MEMORY MANAGEMENT################################# maxmemory <bytes>        最大的容量    # maxmemory-policy noeviction        内存满了怎么解决      ############################## APPEND ONLY MODE ###############################aof的配置    appendonly no        默认不开启,默认rdb够用了appendfilename "appendonly.aof"            长久化的文件的名字# appendfsync always        每次都要  syncappendfsync everysec        每秒执行一次  sync  可能会失落一秒的数据# appendfsync no            不执行,操作系统本人同步数据