logstash 生成 init 指令碼後台啟動

2022-05-15 14:02:44 字數 1310 閱讀 5699

我的系統是centos6,這裡說一下6的使用方法,7類似,具體方法如下:

# cd /usr/share/logstash/bin/system-install --help

usage: system-install [optionsfile] [startuptype] [version]

note: these arguments are ordered, and co-dependent

optionsfile: full path to a startup.options file

optionsfile is required if startuptype is specified, but otherwise looks first

in /usr/share/logstash/config/startup.options and then /etc/logstash/startup.options

last match wins

startuptype: e.g. sysv, upstart, systemd, etc.

optionsfile is required to specify a startuptype.

version: the specified version of startuptype to use. the default is usually preferred here, so it can safely be omitted.

both optionsfile & startuptype are required to specify a version.

a、要跟startup.options檔案的絕對路徑,如果是rpm安裝的在/etc/logstash/startup.options,如果是二進位製包解壓安裝的則在解壓目錄下的config目錄下面。

b、必須要跟啟動型別,比如centos6是sysv,centos7是systemd

2、執行指令碼生成啟動檔案

# /usr/share/logstash/bin/system-install /etc/logstash/startup.options sysv

successfully created system startup script for logstash

3、執行完就可以使用init指令碼啟動logstash了

# /etc/init.d/logstash start

# netstat -tnlp

ELK中的logstash啟動後無輸出

在 elasticsearch技術解析與實戰 第370頁第10章elk應用,書中以收集nginx日誌為例來說明 我這裡用的版本分別是elasticsearch 2.3.0 logstash 2.3.0 kibana 4.5.0 和書中的版本不同,在373頁我按照書上的例子取一條典型的nxlog日誌,...

生成sql指令碼

生成資料庫指令碼 sql2000企業管理器 右鍵要匯出的資料庫 所有任務 生成sql指令碼 常規 裡選擇 生成全部物件指令碼 在指令碼檔案中包含說明性標題 選上 設定格式 裡,將 包含擴充套件屬性 選上 選項 中,將 表指令碼選項 中的內容全部選擇上 選項 中,安全性選項 是決定是否要包含建立資料庫...

後滲透指令碼知識

許可權維持 許可權提公升 內網滲透等 內網滲透 資訊蒐集 讀取使用者hash 瀏覽器密碼 域滲透 獲取域控的控制權 meterpreter是metasploit框架中的乙個擴充套件模組,在攻擊成 功以後給我們返回乙個控制通道,是metsploit後滲透必不可少的 它具有強大的功能,包括socks 埠...