开发者社区> 问答> 正文

redis sentinel如何跑守护进程以及日志记录位置的?

redis sentinel怎么跑守护进程的?
直接在前台显示了.
screenshot

redis-server可以通过修改配置文件来使用守护进程,以及指定日志目录,但
sentinel启动只能在前台跑。。。

怎样修改配置也让sentinel跑守护进程

[root@redis_01 redis]# redis-server /etc/redis/sentinel.conf --sentinel
7980:X 23 Nov 18:02:41.348 * Increased maximum number of open files to 10032 (it was originally set to 1024).

            _._                                                  
       _.-``__ ''-._                                             
  _.-``    `.  `_.  ''-._           Redis 3.0.5 (00000000/0) 64 bit

.- .-`. `/ ., ''-._
( ' , .- | , ) Running in sentinel mode
|-._-...- __...-.`-._|'` _.-'| Port: 26379
| -._ ._ / _.-' | PID: 7980
-._ -._ `-./ _.-' _.-'
|-._-._ `-.__.-' _.-'_.-'|
| -._-._ _.-'_.-' | http://redis.io
-._ -._`-.__.-'_.-' _.-'
|-._-._ `-.__.-' _.-'_.-'|
| -._-._ _.-'_.-' |
-._ -._`-.__.-'_.-' _.-'

  `-._    `-.__.-'    _.-'                                       
      `-._        _.-'                                           
          `-.__.-'                                               

7980:X 23 Nov 18:02:41.355 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
7980:X 23 Nov 18:02:41.355 # Sentinel runid is 43de323d55627d896b2caf1da2e305f0eb59dcee
7980:X 23 Nov 18:02:41.356 # +monitor master mymaster 127.0.0.1 6379 quorum 1
^C7980:signal-handler (1448273325) Received SIGINT scheduling shutdown...
https://segmentfault.com/img/bVq5IH/view

展开
收起
爵霸 2016-03-09 10:20:02 4442 0
2 条回答
写回答
取消 提交回答
  • sentinel实际上跟redis配置类似,看代码可以发现,它是redis以sentinel mode启动的,所有使用daemonize 参数可以配置它为守护进程

    2019-07-17 18:55:29
    赞同 展开评论 打赏
  • 我去, 链接里的方法虽然行, 但是没必要。
    你把daemonize yes这句加到sentinel.conf里面就行了。 再启动就是守护进程方式了。

    2019-07-17 18:55:29
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
ApsaraDB for Redis——与创客同行 立即下载
微博的Redis定制之路 立即下载
云数据库Redis版的开源之路 立即下载