redis sentinel怎麼跑守護程式的?
直接在前台顯示了.
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...
7980:X 23 Nov 18:08:45.618 # User requested shutdown...
7980:X 23 Nov 18:08:45.618 # Sentinel is now ready to exit, bye bye...
我去, 連結裡的方法雖然行, 但是沒必要。
你把daemonize yes這句加到sentinel.conf裡面就行了。 再啟動就是守護程式方式了。
已自行解決了
連結描述
1.如上所說,daemonize yes
2.在命令後面加上&
3.nohup