redis 由浅入深之 redis.conf配置文件

2023-10-31

#是否以后台进程运行,默认为no,如果需要以后台进程运行则改为yes

daemonize no

 

 

#如果以后台进程运行的话,就需要指定pid,你可以在此自定义redis.pid文件的位置。

pidfile /var/run/redis.pid

 

 

#接受连接的端口号,如果端口是0则redis将不会监听TCP socket连接

port 6379

 

# If you want you can bind a single interface, if the bind option is not

# specified all the interfaces will listen for incoming connections.

#

# 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 to disable)?

timeout 300000000

 

 

#日志级别,默认是verbose(详细),各种日志级别:

#debug:很详细的信息,适合开发和测试

#verbose:包含许多不太有用的信息,但比debug要清爽一些(many rarely useful info, but not a mess like #the debug level)

#notice:比较适合生产环境

#warning:警告信息

loglevel verbose

 

 

#指定log文件的名字,默认是stdout。stdout会让redis把日志输出到标准输出。但是如果使用stdout而又以后台进#程的方式运行redis,则日志会输出到/dev/null

logfile stdout

 

 

#'syslog-enabled'设置为yes会把日志输出到系统日志,默认是no

# syslog-enabled no

 

 

#指定syslog的标示符,如果'syslog-enabled'是no,则这个选项无效。

# syslog-ident redis

 

 

#指定syslog 设备(facility), 必须是USER或者LOCAL0到LOCAL7.

# syslog-facility local0

 

 

#设置数据库数目。默认的数据库是DB 0。可以通过SELECT <dbid>来选择一个数据库,dbid是[0,'databases'-1]的数字

databases 16

 

################## 快照#################################

#

# 硬盘上保存数据:

#

#   save <seconds> <changes>

#

#   <seconds>和<changes>都满足时就会触发数据保存动作。

#   

#

#   以下面的例子来说明:

#   过了900秒并且有1个key发生了改变 就会触发save动作

#   过了300秒并且有10个key发生了改变 就会触发save动作

#   过了60秒并且至少有10000个key发生了改变 也会触发save动作

#

#   注意:如果你不想让redis自动保存数据,那就把下面的配置注释掉!

 

save 900 1

save 300 10

save 60 10000

 

 

#存储数据时是否压缩数据。默认是yes。

rdbcompression yes

 

# 保存dump数据的文件名

dbfilename dump.rdb

 

# 工作目录.

#

# 数据会被持久化到这个目录下的‘dbfilename’指定的文件中。

# 注意,这里指定的必须是目录而不能是文件。

dir ./

 

######## REPLICATION(复制,冗余)#################################

 

# Master-Slave replication. 使用slaveof把一个 Redis 实例设置成为另一个Redis server的从库(热备). 注意: #配置只对当前slave有效。

# 因此可以把某个slave配置成使用不同的时间间隔来保存数据或者监听其他端口等等。

#命令格式:

# slaveof <masterip> <masterport>

 

 

#如果master有密码保护,则在slave与master进行数据同步之前需要进行密码校验,否则master会拒绝slave的请#求。

#

# masterauth <master-password>

 

#当slave丢失与master的连接时,或者slave仍然在于master进行数据同步时(还没有与master保持一致),#slave可以有两种方式来响应客户端请求:

#

# 1) 如果 slave-serve-stale-data 设置成 'yes' (the default) slave会仍然响应客户端请求,此时可能会有问题。

#

# 2) 如果 slave-serve-stale data设置成  'no'  slave会返回"SYNC with master in progress"这样的错误信息。 但 INFO 和SLAVEOF命令除外。

#

slave-serve-stale-data yes

 

############### 安全 ###################################

 

# 需要客户端在执行任何命令之前指定 AUTH <PASSWORD>

#

# requirepass foobared

 

# 命令重命名.

#

#

# 例如:

#

# rename-command CONFIG b840fc02d524045429941cc15f59e41cb7be6c52

#

# 同样可以通过把一个命令重命名为空串来彻底kill掉这个命令,比如:

#

# rename-command CONFIG ""

 

#################### 限制 ####################################

 

# 设置最大连接数. 默认没有限制,  '0' 意味着不限制.

#

# maxclients 128

 

 

#最大可使用内存。如果超过,Redis会试图删除EXPIRE集合中的keys,具体做法是:Redis会试图释放即将过期的#keys,而保护还有很长生命周期的keys。

#

#如果这样还不行,Redis就会报错,但像GET之类的查询请求还是会得到响应。

#

#警告:如果你想把Redis视为一个真正的DB的话,那不要设置<maxmemory>,只有你只想把Redis作为cache或者

#有状态的server('state' server)时才需要设置。

#

# maxmemory <bytes>

 

#内存清理策略:如果达到了maxmemory,你可以采取如下动作:

# volatile-lru -> 使用LRU算法来删除过期的set

# allkeys-lru -> 删除任何遵循LRU算法的key

# volatile-random ->随机地删除过期set中的key

# allkeys->random -> 随机地删除一个key

# volatile-ttl -> 删除最近即将过期的key(the nearest expire time (minor TTL))

# noeviction -> 根本不过期,写操作直接报错

#

# 默认策略:

#

# maxmemory-policy volatile-lru

 

# 对于处理redis内存来说,LRU和minor TTL算法不是精确的,而是近似的(估计的)算法。所以我们会检查某些样本#来达到内存检查的目的。默认的样本数是3,你可以修改它。

#

# maxmemory-samples 3

 

################# APPEND ONLY MODE ###############################

 

#默认情况下,Redis会异步的把数据保存到硬盘。如果你的应用场景允许因为系统崩溃等极端情况而导致最新数据丢失#的话,那这种做法已经很ok了。否则你应该打开‘append only’模式,开启这种模式后,Redis会在#appendonly.aof文件中添加每一个写操作,这个文件会在Redis启动时被读取来在内存中重新构建数据集。

#

#注意:如果你需要,你可以同时开启‘append only’模式和异步dumps模式(你需要注释掉上面的‘save’表达式来禁#止dumps),这种情况下,Redis重建数据集时会优先使用appendonly.aof而忽略dump.rdb

#

appendonly no

 

#  append only 文件名 (默认: "appendonly.aof")

# appendfilename appendonly.aof

 

# 调用fsync()函数通知操作系统立刻向硬盘写数据

#

# Redis支持3中模式:

#

# no:不fsync, 只是通知OS可以flush数据了,具体是否flush取决于OS.性能更好.

# always: 每次写入append only 日志文件后都会fsync . 性能差,但很安全.

# everysec: 没间隔1秒进行一次fsync. 折中.

#

# 默认是 "everysec"

# appendfsync always

appendfsync everysec

# appendfsync no

 

# 当AOF fsync策略被设置为always或者everysec并且后台保存进程(saving process)正在执行大量I/O操作时

# Redis可能会在fsync()调用上阻塞过长时间

#

no-appendfsync-on-rewrite no

 

# append only 文件的自动重写

# 当AOF 日志文件即将增长到指定百分比时,Redis可以通过调用BGREWRITEAOF 来自动重写append only文件。

# 它是这么干的:Redis会记住最近一次重写后的AOF 文件size。然后它会把这个size与当前size进行比较,如果当前# size比指定的百分比大,就会触发重写。同样,你需要指定AOF文件被重写的最小size,这对避免虽然百分比达到了# 但是实际上文件size还是很小(这种情况没有必要重写)却导致AOF文件重写的情况很有用。

#

#

# auto-aof-rewrite-percentage 设置为 0 可以关闭AOF重写功能

 

auto-aof-rewrite-percentage 100

auto-aof-rewrite-min-size 64mb

 

################## SLOW LOG ###################################

 

# Redis slow log用来记录超过指定执行时间的查询。

# 你可以指定两个参数:一个是慢查询的阀值,单位是毫秒;另外一个是slow log的长度,相当于一个队列。

 

# 负数则关闭slow log,0则会导致每个命令都被记录

slowlog-log-slower-than 10000

 

# 不设置会消耗过多内存,所以还是要设置一下。可以使用SLOWLOG RESET命令来回收slow log使用的内存

slowlog-max-len 1024

 

################ 虚拟内存 ###############################

#使用redis 就别用虚拟内存了,绝对不是一个好主意,这里不是翻译重点,我只会简单的翻译一下。


 警告,虚拟内存是基于Redis2.4版本

 建议不使用虚拟内存

### WARNING! Virtual Memory is deprecated in Redis 2.4

### The use of Virtual Memory is strongly discouraged.

 

虚拟内存可以处理超出服务器实际内存大小,进行数据存储。

类似,操作系统与内存交互。

# Virtual Memory allows Redis to work with datasets bigger than the actual

# amount of RAM needed to hold the whole dataset in memory.

# In order to do so very used keys are taken in memory while the other keys

# are swapped into a swap file, similarly to what operating systems do

# with memory pages.

#

# To enable VM just set 'vm-enabled' to yes, and set the following three

# VM parameters accordingly to your needs.

 

是否启动虚拟内存,默认是no

vm-enabled no

# vm-enabled yes

 

# This is the path of the Redis swap file. As you can guess, swap files

# can't be shared by different Redis instances, so make sure to use a swap

# file for every redis process you are running. Redis will complain if the

# swap file is already in use.

#

# The best kind of storage for the Redis swap file (that's accessed at random) 

# is a Solid State Disk (SSD).

#

# *** WARNING *** if you are using a shared hosting the default of putting

# the swap file under /tmp is not secure. Create a dir with access granted

# only to Redis user and configure Redis to create the swap file there.

如果的主机是共享主机,交换文件存放在/tmp目录是不安全,建议创建一个目录来存储交换文件,并指定访问权限(只针对Redis用户Redis配置)

vm-swap-file /tmp/redis.swap

 

# vm-max-memory configures the VM to use at max the specified amount of

# RAM. Everything that deos not fit will be swapped on disk *if* possible, that

# is, if there is still enough contiguous space in the swap file.

#

# With vm-max-memory 0 the system will swap everything it can. Not a good

# default, just specify the max amount of RAM you can in bytes, but it's

# better to leave some margin. For instance specify an amount of RAM

# that's more or less between 60 and 80% of your free RAM.

指定虚拟内存最大值,建议使用主机内存的大小的60%-80之间。

vm-max-memory 0

 

# Redis swap files is split into pages. An object can be saved using multiple

# contiguous pages, but pages can't be shared between different objects.

# So if your page is too big, small objects swapped out on disk will waste

# a lot of space. If you page is too small, there is less space in the swap

# file (assuming you configured the same number of total swap file pages).

#

# If you use a lot of small objects, use a page size of 64 or 32 bytes.

# If you use a lot of big objects, use a bigger page size.

# If unsure, use the default :)

指定虚拟内存分页大小,默认是32

vm-page-size 32

 

# Number of total memory pages in the swap file.

# Given that the page table (a bitmap of free/used pages) is taken in memory,

# every 8 pages on disk will consume 1 byte of RAM.

#

# The total swap size is vm-page-size * vm-pages

#

# With the default of 32-bytes memory pages and 134217728 pages Redis will

# use a 4 GB swap file, that will use 16 MB of RAM for the page table.

#

# It's better to use the smallest acceptable value for your application,

# but the default is large in order to work in most conditions.

vm-pages 134217728

 

# Max number of VM I/O threads running at the same time.

# This threads are used to read/write data from/to swap file, since they

# also encode and decode objects from disk to memory or the reverse, a bigger

# number of threads can help with big objects even if they can't help with

# I/O itself as the physical device may not be able to couple with many

# reads/writes operations at the same time.

#

# The special value of 0 turn off threaded I/O and enables the blocking

# Virtual Memory implementation.

//指定虚拟存储最大操作线程数

vm-max-threads 4

 

################高级配置###############################

 

# Hashes are encoded in a special way (much more memory efficient) when they

# have at max a given numer of elements, and the biggest element does not

# exceed a given threshold. You can configure this limits with the following

# configuration directives.

哈希一种比较特殊的编码格式(性能远超内存),但存储元素大小小于指定元素大小。你可以使用hash配置文件进行修改

hash-max-zipmap-entries 512

hash-max-zipmap-value 64

 

# Similarly to hashes, small lists are also encoded in a special way in order

# to save a lot of space. The special representation is only used when

# you are under the following limits:

//指令list 存储大小

list-max-ziplist-entries 512

list-max-ziplist-value 64

 

# Sets have a special encoding in just one case: when a set is composed

# of just strings that happens to be integers in radix 10 in the range

# of 64 bit signed integers.

# The following configuration setting sets the limit in the size of the

# set in order to use this special memory saving encoding.

//指定set存储大小

set-max-intset-entries 512

 

# Similarly to hashes and lists, sorted sets are also specially encoded in

# order to save a lot of space. This encoding is only used when the length and

# elements of a sorted set are below the following limits:

zset-max-ziplist-entries 128

zset-max-ziplist-value 64

 

# Active rehashing uses 1 millisecond every 100 milliseconds of CPU time in

# order to help rehashing the main Redis hash table (the one mapping top-level

# keys to values). The hash table implementation redis uses (see dict.c)

# performs a lazy rehashing: the more operation you run into an hash table

# that is rhashing, the more rehashing "steps" are performed, so if the

# server is idle the rehashing is never complete and some more memory is used

# by the hash table.

# The default is to use this millisecond 10 times every second in order to

# active rehashing the main dictionaries, freeing memory when possible.

#

# If unsure:

# use "activerehashing no" if you have hard latency requirements and it is

# not a good thing in your environment that Redis can reply form time to time

# to queries with 2 milliseconds delay.

#

# use "activerehashing yes" if you don't have such hard requirements but

# want to free memory asap when possible.

activerehashing yes

 

################## INCLUDES ###################################

 

# Include one or more other config files here.  This is useful if you

# have a standard template that goes to all redis server but also need

# to customize a few per-server settings.  Include files can include

# other files, so use this wisely.

#

//指定Redis 包含的其他配置文件


# include /path/to/local.conf

# include /path/to/other.conf

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

redis 由浅入深之 redis.conf配置文件 的相关文章

  • 网络流(最大流)基础入门

    好不容易大概搞懂了网络流 写个博客巩固一下 盗了点图 请图主原谅 定义 网络流与最大流 网络流是指给定一个有向图 和两个点 源点S和汇点T 点之间有连边 每条边有一个容量限制 可以看作水管 网络流就是指由S点流到T点的一个可行流 最大流就是
  • 金蝶生成凭证模板_【干货】金蝶云ERP教你凭证模版的引入引出

    概述 K 3Cloud凭证模版一直反馈比较多的就是希望可以增加模版引入引出的功能 因为在项目实施过程中 上线前的在测试环境配置过的凭证模板 希望通过凭证模版引入功能轻松移植到正式环境 这样可以快速满足客户要求 缩短实施周期 目前K 3Clo
  • 正则表达式匹配邮箱账号

    现在许多网站都采用了通过邮箱账号来注册用户名的方式 一来可以避免重复 而来安全性也得到保证 一举两得 很不错 而最近HCI的官网也要重构了 部门一女生在写注册信息的表单验证的时候遇到了许多问题 其中一个就是邮箱的验证 老实说 一开始俺就觉得
  • 迷宫游戏,测试你适合做的工作

    迷宫的道路是联通的 从起点出发的向各个方向均能到达不同的出口 按照箭头起始方向从起点开始进入迷宫 当遇到岔路口时 按照自己的直觉选择前进的方向 最终抵达迷宫出口 各出口相对应的字母将解释你的性格特点和适合从事的工作 注意了 这里的字母是按照
  • 线程及线程的同步互斥

    目录 1 线程的简单介绍 2 同步互斥的概念 3 为什么要进行线程的同步互斥 4 信号量 5 互斥量 6 条件变量 1 线程的简单介绍 1 进程 在讲到线程之前 我们应该先了解一下进程的概念 进程 Process 是指计算机中已运行的程序
  • FRP内网穿透(linux->windows)

    使用背景 由于内网环境所在的电脑无法通过公网暴露访问 而使用类似于向日葵等其他代理工具 又存在一定的延迟卡顿 因此 决定待用Frp的内网穿透的功能 来实现借由公网服务器代理访问内网所在的电脑 原理 frp 主要由 客户端 frpc 和 服务
  • u盘魔术师给服务器装系统,U盘魔术师怎么装系统 U盘魔术师USM制作PE启动盘方法...

    U盘魔术师是一个很好用的装系统的工具 并且可以利用USM制作PE启动盘 很多用户都不太了解具体的方法 其实也非常的简单 下面小编就来给大家介绍一下U盘魔术师怎么装系统 赶紧来看看吧 U盘魔术师怎么装系统 U盘魔术师体积较大1G多如果是小水管
  • MyBatis学习笔记

    MyBatis MyBatis Mapper代理开发 MyBatis是一款优秀的持久层框架 用于简化JDBC MyBatis 持久层 负责把数据保存到数据库的那一层 JavaEE三层架构 表现层 页面展示 业务层 逻辑处理 持久层 对数据持
  • 在外SSH远程连接macOS服务器【cpolar内网穿透】

    文章目录 前言 1 macOS打开远程登录 2 局域网内测试ssh远程 3 公网ssh远程连接macOS 3 1 macOS安装配置cpolar 3 2 获取ssh隧道公网地址 3 3 测试公网ssh远程连接macOS 4 配置公网固定TC
  • 状态机的置位与复位

    1 状态机的异步置位与复位 异步置位与复位是与时钟无关的 当异步置位与复位到来时它们立即分别置触发器的输出为1或0 不需要等到时钟沿到来才置位或复位 把它们列入always块的事件控制括号内就能触发always块的执行 因此 当它们到来时就
  • Linux设置所有用户环境变量

    Linux中每个用户都要指定各自的环境变量 这样会比较麻烦 那么如何配置一个环境变量 所有的用户都可以使用呢 比如说我想把Linux默认语言由en US UTF 8修改为zh CN UTF 8 那么我需要设置环境变量 LANG 百度很多方法
  • Conda 配置 Python 环境

    文章目录 前言 一 Conda 是什么 二 如何获取 三 使用 Conda 命令配置多环境 1 创建新环境 2 激活新环境 3 配置新环境 4 退出新环境 5 检查所有环境 6 检查所有安装的包 7 删除某环境 8 重命名某环境 四 使用
  • Crontab配置任务定时执行

    一 每奇数周的周一执行 16 0 1 date W 2 eq 1 gt dev null sh data1 test sh 具体地 1 分钟字段 Minute field 16 2 小时字段 Hour field 0 3 日期字段 Day

随机推荐

  • 亚马逊首席技术官Werner Vogels:2023年及未来五大技术趋势预测

    近年来 随着我们经历的数次全球危机 如何借助技术解决人类棘手问题至关重要 如今 我们获取数据的来源比以往任何时候都多 包括可穿戴设备 医疗设备 环境传感器 视频捕获和其他联网设备 当这些数据与计算机视觉 机器学习和模拟仿真等云技术相结合时
  • OpenWrt目录之target

    target目录下主要是和平台有关的代码 最主要的是linux文件夹 linux文件夹的ramips中 ramips应该指的是对应cpu的架构 ramips文件夹下的就是不同系列的cpu对应的芯片的型号 进行试验一下 首先在根目录下运行ma
  • IDEA工具实用开发快捷键

    选中new ArrayList lt gt 或者光标放在new前面 按ctrl alt v 选中new ArrayList lt gt 或者光标放在new后边面 按ctrl alt 空格 ideal 工具没识别maven项目的话 右键pom
  • uni-app开发微信小程序,button通过数组的length判断disabled无效(数组length === 0写法无效)

    错误写法
  • caffe特征提取/C++数据格式转换

    Caffe生成的数据分为2种格式 Lmdb 和 Leveldb 它们都是键 值对 Key Value Pair 嵌入式数据库管理系统编程库 虽然lmdb的内存消耗是leveldb的1 1倍 但是lmdb的速度比leveldb快10 至15
  • 国产操作系统进入被彻底抛弃的时代

    当倪光南正在不断呼喊支持国产操作系统的时候 国产操作系统却迎来了噩梦 国产操作系统接连倒闭 国产操作系统进入一个被国家彻底抛弃的时代 红旗linux梦断国产操作系统 今年2月中科红旗linux因为缺钱倒闭解散了 一直以来做得最好的国产操作系
  • 图形学数学基础之基本蒙特卡罗尔积分(Monte Carlo Integration)

    作者 i dovelemon 日期 2017 07 29 来源 CSDN 主题 Monte Carlo Integration 引言 好久没有写博客了 最近一直在忙于工作 同时GLB库中关于PBR的渲染算法 一直卡住 无法实现下去 不过在这
  • dd大牛的《背包九讲》

    P01 01背包问题 题目 有N件物品和一个容量为V的背包 第i件物品的费用是c i 价值是w i 求解将哪些物品装入背包可使这些物品的费用总和不超过背包容量 且价值总和最大 基本思路 这是最基础的背包问题 特点是 每种物品仅有一件 可以选
  • 【HCNP路由交换学习指南】学习笔记丨第07章 BGP

    07 BGP BGP 的基本概念 BGP 对等体关系类型 IBGP 水平分割原则 路由黑洞问题及 BGP 同步规则 路由通告 Router ID 报文类型及格式 Open 报文 Update 报文 Keepalive 报文 Notifica
  • PaddleOCR使用笔记之模型训练

    目录 简介 模型训练 步骤一 文本检测模型 detection 1 准备训练数据集 2 下载预训练模型 模型介绍 下载预训练模型 3 开始训练 断点训练 4 模型评估 5 模型测试 6 训练模型转inference模型 步骤二 文本识别模型
  • RabbitMQ保证消息的一致性解决方案

    RabbitMQ保证消息的一致性 一 采用confirm消息确认机制及return返回机制 确保消息发送成功 二 将队列以及消息设置持久化 保证rabbitmq突然宕机消息仍然存在 三 手动确认接收消息方式 消息处理失败拒收重回队列 1 y
  • 后端响应是否成功、信息、操作码响应前端及异常处理

    异常处理流程 1 自定义异常类型 2 自定义错误代码及错误信息 3 对于可预知的异常由程序员在代码中主动抛出 由SpringMVC统一捕获 可预知异常是程序员在代码中手动抛出本系统定义的特定异常类型 由于是程序员抛出的异常 通常异常信息比较
  • java反射(从认识到应用)-黑马笔记

    此文章是观看黑马雷哥关于Java反射的视频做的笔记 如有错请多指教 一 认识反射 反射在JavaAPI中的详解 说白了 反射就是 加载类 并允许以编程方式解剖类中的各种成分 成员变量 方法 构造器等 如图 二 反射还学什么 加载类 获取类的
  • 做题

    在一个文件中定义一个全局变量 n 主函数 main 在另一个文件中定义函数 fn1 在 main 中对 n 赋值 再调用 fn1 在 fn1 中也对 n 赋值 显示 n 最后的值 include using namespace std in
  • style对象和less/scss互相转换,驼峰转中横线,支持嵌套转换

    不知道有没有小伙伴在维护或重构前端项目时修改样式的时候遇到js style和less scss需要互相转换的问题 本人找网上没有比较完善的转换工具 要么嵌套不支持 要么兼容不好 于是自己写了一个 请大家参考 emotion style In
  • CSDN英雄大会之 SOA技术观感

    5号假装英雄去北京参加了CSDN技术英雄大会 见到了很多一直想见的同行高手还有编辑记者 这里就不一一列举了 只是从SOA中间件开发角度列一下相关的内容 1 IBM如下划分SOA与构件 SOA4类关键构件 基础构件WAS MQ 流程构件WPS
  • 设置一个FreemarkerExceptionHandler捕获freemarker页面上的异常

    在Freemarker页面中如果使用 userName 并且userName为空 那么Freemarker页面就会崩掉 需要设置默认值 userName 来避免对象为空的错误 同理 user userName 也应该写成这样 user us
  • WaveOut播放声音死锁问题原因

    1 首先我们复习下造成死锁的几个充要条件 1 互斥 互斥资源 只能被一个进程使用 2 不剥夺 非抢占式调度 不能强行抢用其他进程资源 3 请求和保持 占有着资源不释放 同时申请其他资源 4 环路等待 没什么可说的 在WaveOutReset
  • java.lang.IncompatibleClassChangeError: Found interface org.elasticsearch.common.bytes.BytesReferenc

    项目场景 再学谷粒商城时 练习elasticsearch时出现一下错误 问题描述 原因分析 提示 出现java lang IncompatibleClassChangeError Found interface org elasticsea
  • redis 由浅入深之 redis.conf配置文件

    是否以后台进程运行 默认为no 如果需要以后台进程运行则改为yes daemonize no 如果以后台进程运行的话 就需要指定pid 你可以在此自定义redis pid文件的位置 pidfile var run redis pid 接受连