redis sentinel怎么跑守護(hù)進(jìn)程以及日志記錄位置的?
問題描述
redis sentinel怎么跑守護(hù)進(jìn)程的?直接在前臺(tái)顯示了.redis-server可以通過修改配置文件來使用守護(hù)進(jìn)程,以及指定日志目錄,但sentinel啟動(dòng)只能在前臺(tái)跑。。。
怎樣修改配置也讓sentinel跑守護(hù)進(jìn)程
[root@redis_01 redis]# redis-server /etc/redis/sentinel.conf --sentinel7980: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 43de323d55627d896b2caf1da2e305f0eb59dcee7980: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...
問題解答
回答1:我去, 鏈接里的方法雖然行, 但是沒必要。你把daemonize yes這句加到sentinel.conf里面就行了。 再啟動(dòng)就是守護(hù)進(jìn)程方式了。
回答2:已自行解決了鏈接描述
回答3:1.如上所說,daemonize yes2.在命令后面加上&3.nohup
相關(guān)文章:
1. java - 阿里的開發(fā)手冊(cè)中為什么禁用map來作為查詢的接受類?2. apache - 想把之前寫的單機(jī)版 windows 軟件改成網(wǎng)絡(luò)版,讓每個(gè)用戶可以注冊(cè)并登錄。類似 qq 的登陸,怎么架設(shè)服務(wù)器呢?3. 創(chuàng)建mysqli對(duì)象與數(shù)據(jù)庫(kù)連接 - 出錯(cuò)4. 用Html5怎么實(shí)現(xiàn)簡(jiǎn)單選擇排序?5. node.js - win7下,npm 無法下載依賴包,淘寶鏡像也裝不上,求幫忙???6. mysql 的datadir設(shè)置的文件夾不存在,啟動(dòng)了mysql服務(wù)后創(chuàng)建的數(shù)據(jù)庫(kù)存在哪里?7. mysql 使用group_concat后 順序改變是怎么回事?8. python - uwsgi+django的搭建問題9. php多任務(wù)倒計(jì)時(shí)求助10. 如何合并兩張具有相同結(jié)構(gòu)的mysql表
