Day5 Redis组态档设定-GENERAL 2

Redis.config

GENERAL

  • daemonize

是否要用daemon方式启动Redis Server.

https://ithelp.ithome.com.tw/upload/images/20210920/2011165886WzHBc4ES.png

# 预设
daemonize no

# yes 需要搭配pidfile将process写入并在背景方式启动Redis Server
# no 在前景终端机模式下启动Redis Server,当终端机结束时会一并关闭Redis Server
daemonize yes
  • pidfile

搭配上面daemon启动方式使用,会在启动时写入指定路径档案,关闭服务时则删除.

https://ithelp.ithome.com.tw/upload/images/20210920/20111658dDZB3Yaa9D.png

# 预设
pidfile /var/run/redis_6379.pid
  • supervised

启动Redis Server 可以透过upstart or systmed方式进行管理,需要特别注意此方式只会提供Process is Ready的讯号,不包含Ping.

https://ithelp.ithome.com.tw/upload/images/20210920/20111658MMLTNMJeni.png

# 预设
supervised no
  • loglevel

Redis Server记录日志资讯的等级.

https://ithelp.ithome.com.tw/upload/images/20210920/20111658DjcLNjKYFw.png

# 预设
loglevel notice

# debug (越详细)
# verbose
# notice
# warning (只记录错误或警告)
loglevel debug
  • logfile

当设定用daemon模式启动时,则需要提供路径存放日志,反之则会输出在启动的终端机上.

https://ithelp.ithome.com.tw/upload/images/20210920/20111658MR4XFZtA9S.png

# 预设
logfile ""

# 指定路径
logfile /home/redis/redis.log
  • syslog-ebabled no

是否需要把Redis Server日志写入到OS系统日志中.

https://ithelp.ithome.com.tw/upload/images/20210920/20111658CQPWEaMJxz.png

# 预设
syslog-enabled no
  • syslog-ident

写入Redis Server日志到OS系统日志的标记.

https://ithelp.ithome.com.tw/upload/images/20210920/20111658ATCza7DWMh.png

# 预设
syslog-ident redis
  • syslog-facility

写入Redis Server日志到OS系统日志的装置或使用者.

https://ithelp.ithome.com.tw/upload/images/20210920/20111658HJtxNU6xnE.png

# 
syslog-facility local0
  • crash-log-enabled

Redis Server崩溃日志,如果需要查询问题则需要额外开启.

https://ithelp.ithome.com.tw/upload/images/20210920/20111658wWHQKtsd6V.png

# 预设
crash-log-enabled no
  • crash-memcheck-enabled

当Redis Server崩溃时,快速检查memory,需要额外花费时间.

https://ithelp.ithome.com.tw/upload/images/20210920/20111658c3SBLMMSak.png

# 预设
crash-memcheck-enabled no
  • databases

设定资料库总数,实际使用上可以透过select来选取欲操作的资料库.

https://ithelp.ithome.com.tw/upload/images/20210920/20111658oJwPuorZGK.png

# 预设
databases 16

# 设定为1
databases 1
  • always-show-logo

是否都要显示Redis logo.

https://ithelp.ithome.com.tw/upload/images/20210920/20111658U64OoUs77S.png

# 预设
always-show-logo no

  • set-proc-title

预设在Process管理中可以看到相关Redis Server Process资讯.

https://ithelp.ithome.com.tw/upload/images/20210920/20111658KHVJERGOpY.png

# 预设
set-proc-title yes
  • proc-title-template

Redis Server process所显示的内容格式.

https://ithelp.ithome.com.tw/upload/images/20210920/20111658hvcC0E6XUn.png

# 预设
proc-title-template "{title} {listen-addr} {server-mode}"

<<:  [Day 8] 线性回归 (Linear Regression)

>>:  Day-05 Easy Regression Example

追求JS小姊姊系列 Day22 -- 工具人、姐妹不只身份的差别(中):从识别字开始讲起吧

前情提要 奇怪的事情,姐妹们疑似也有超能力。 方函式:表面上虽然看起来就是所谓的姐妹、工具人关系,但...

[Day 04] 眼前的黑不是黑,你说的白是什麽白?(直方图均衡化)

前言 「眼前的黑不是黑,你说的白是什麽白」-- 你是我的眼(萧煌奇) 没错,并非所有图片都是在理想的...

Day 14: 人工神经网路初探 激活函数(中)

激活函数 Activation Function 接下上篇,我们继续介绍较为常见的激活函数。 Tan...

自己在家接收来自飞机的ADS-B讯号!

想看飞机又不想透过 FlightRadar24 !? 那就自己架一个接收站吧 ! 一、认识 ADS-...

关闭核电厂的椅子

故事简述 核二厂2号机於2021/7/27清晨6时32分发生反应炉急停事件,初步调查为人为疏失 原能...