新聞中心
Splunk 是機(jī)器數(shù)據(jù)的引擎。使用 Splunk 可收集、索引和利用所有應(yīng)用程序、服務(wù)器和設(shè)備生成的快速移動型計(jì)算機(jī)數(shù)據(jù) 。 使用 Splunking 處理計(jì)算機(jī)數(shù)據(jù),可讓您在幾分鐘內(nèi)解決問題和調(diào)查安全事件,下面為大家講解一下CentOS 7安裝Splunk具體步驟。

1.創(chuàng)建一個Splunk用戶
Splunk總是建議使用專用用戶為此應(yīng)用程序運(yùn)行,而不是根用戶。我創(chuàng)建了一個用戶運(yùn)行該應(yīng)用程序,并創(chuàng)建了一個文件夾安裝應(yīng)用程序。
[root@server1 tmp]# groupadd splunk
[root@server1 tmp]# useradd -d /opt/splunk -m -g splunk splunk
[root@server1 tmp]# su - splunk
[splunk@server1 ~]$ id
uid=1001(splunk) gid=1001(splunk) groups=1001(splunk)
Confirm the server architecture
[splunk@server1 ~]$ getconf LONG_BIT
64
2.下載解壓Splunk企業(yè)版
從Splunk官方網(wǎng)站下載Splunk軟件,創(chuàng)建一個賬戶。 現(xiàn)在解壓tar文件,將文件復(fù)制到/opt/splunk下已經(jīng)創(chuàng)建splunk的應(yīng)用程序文件夾下面。
root@server1 tmp]# tar -xvf splunk-6.4.0-f2c836328108-Linux-x86_64.tgz
[root@server1 tmp]# cp -rp splunk/* /opt/splunk/
[root@server1 tmp]# chown -R splunk: /opt/splunk/
3.安裝Splunk
Splunk軟件下載之后,您可以用您的Splunk用戶登錄運(yùn)行安裝腳本。我選擇試用許可證,所以它會默認(rèn)。
root@server1 tmp]# su - splunk
Last login: Fri Apr 29 08:14:12 UTC 2016 on pts/0
[splunk@server1 ~]$ cd bin/
[splunk@server1 bin]$ ./splunk start --accept-license
This appears to be your first time running this version of Splunk.
Copying '/opt/splunk/etc/openldap/ldap.conf.default' to '/opt/splunk/etc/openldap/ldap.conf'.
Generating RSA private key, 1024 bit long modulus
.++++++
..................++++++
e is 65537 (0x10001)
writing RSA key
Generating RSA private key, 1024 bit long modulus
................++++++
..++++++
e is 65537 (0x10001)
writing RSA key
Moving '/opt/splunk/share/splunk/search_mrsparkle/modules.new' to '/opt/splunk/share/splunk/search_mrsparkle/modules'.
Splunk> Australian for grep.
Checking prerequisites...
Checking http port [8000]: open
Checking mgmt port [8089]: open
Checking appserver port [127.0.0.1:8065]: open
Checking kvstore port [8191]: open
Checking configuration... Done.
Creating: /opt/splunk/var/lib/splunk
Creating: /opt/splunk/var/run/splunk
Creating: /opt/splunk/var/run/splunk/appserver/i18n
Creating: /opt/splunk/var/run/splunk/appserver/modules/static/css
Creating: /opt/splunk/var/run/splunk/upload
Creating: /opt/splunk/var/spool/splunk
Creating: /opt/splunk/var/spool/dirmoncache
Creating: /opt/splunk/var/lib/splunk/authDb
Creating: /opt/splunk/var/lib/splunk/hashDb
Checking critical directories... Done
Checking indexes...
Validated: _audit _internal _introspection _thefishbucket history main summary
Done
New certs have been generated in '/opt/splunk/etc/auth'.
Checking filesystem compatibility... Done
Checking conf files for problems...
Done
Checking default conf files for edits...
Validating installed files against hashes from '/opt/splunk/splunk-6.4.0-f2c836328108-linux-2.6-x86_64-manifest'
All installed files intact.
Done
All preliminary checks passed.
Starting splunk server daemon (splunkd)...
Generating a 1024 bit RSA private key
.....................++++++
...........................++++++
writing new private key to 'privKeySecure.pem'
-----
Signature ok
subject=/CN=server1.centos7-test.com/O=SplunkUser
Getting CA Private Key
writing RSA key
Done
[ OK ]
Waiting for web server at http://127.0.0.1:8000 to be available.... Done
If you get stuck, we're here to help. Look for answers here: http://docs.splunk.com The Splunk web interface is at http://server1.centos7-test.com:8000
現(xiàn)在您可以訪問您的Splunk Web界面http://IP:8000 /或http://hostname:8000,您需要確保這個端口8000在您服務(wù)器防火墻上面開放。
4.配置Splunk Web界面
我已經(jīng)完成Splunk的安裝,Splunk服務(wù)在我的服務(wù)器中正常運(yùn)行?,F(xiàn)在我需要設(shè)置我Splunk Web界面,使用我設(shè)置的管理員密碼訪問Splunk web界面。 第一次當(dāng)您訪問Splunk的界面,你在頁面中使用的是管理員用戶和密碼。一旦登錄,就在下一頁,它會要求更改和確認(rèn)您的新密碼。 現(xiàn)在,您已經(jīng)設(shè)置新的管理員密碼。一旦您使用新密碼登錄,您將有準(zhǔn)備使用的Splunk儀表板。 在主頁上列出了不同的類別,您可以選擇所需的一個開始splunking。
5.添加任務(wù)
我要加入一個例子為一個簡單的任務(wù),它被添加到 Splunk 系統(tǒng)。只是看到我的快照,以了解我將如何添加它。我的任務(wù)是將 /var/log文件夾添加到Splunk系統(tǒng)的監(jiān)測。
1.打開Splunk Web界面,并在設(shè)置選項(xiàng)卡上單擊 > > 選擇添加數(shù)據(jù)選項(xiàng)
CentOS 7安裝SplunkCentOS 7安裝Splunk
2.在這里我們的任務(wù)是監(jiān)視文件夾,所以我們繼續(xù)監(jiān)視。
在監(jiān)視器選項(xiàng),有下圖所示的四個類別:
文件與目錄:監(jiān)視文件/文件夾
HTTP事件收集器:監(jiān)視通過HTTP的數(shù)據(jù)流
TCP/UDP:監(jiān)視服務(wù)端口
腳本:監(jiān)控腳本
3.根據(jù)我們的目的,我選擇文件及目錄選項(xiàng)。
CentOS 7安裝SplunkCentOS 7安裝Splunk
4.從需要監(jiān)視的服務(wù)器選擇確切的文件夾路徑。
5.現(xiàn)在你可以開始搜索和監(jiān)測作為所需的日志文件。
在服務(wù)器上你可以看到我的日志被縮小到一個應(yīng)用程序。 這只是Splunking一個簡單的例子,您可以將盡可能多的任務(wù)添加到這,瀏覽您的服務(wù)器數(shù)據(jù)。我希望這篇文章是豐富的頩對你有用的。感謝您閱讀到這里,請您提出寶貴的建議和意見?,F(xiàn)在試著使用Splunk吧??!
標(biāo)題名稱:CentOS7安裝Splunk具體步驟
URL分享:http://m.fisionsoft.com.cn/article/dhhphei.html


咨詢
建站咨詢
