LoginSignup
36
37

More than 5 years have passed since last update.

Splunkのインストールが超簡単な件(CentOS編)

Last updated at Posted at 2013-11-21

Splunkって?

公式(日本語版)
http://ja.splunk.com/

詳しくはサイトの解説を読んでいただくとして、
データをぶっ込むと、いいあんばいにインデックスを作成してくれて、ビジュアライズしてくれるアプリケーションです。

商用プロダクトなのでどうせ有償なんでしょ?

と思われるかもしれません。
実は無料の範囲内でも結構使えます。

無償 有償
取り込めるデータ量 500MB/Day 無制限
通知機能 なし 自由
インフラの制限 なし なし
データエクスポート わかったら書く わかったら書く
Splunk Appの利用 不可

データをトリガーとして通知する機能が無いため、アプリケーションログの収集&システムの異常検知には使いにくいですが、ログをそこまで大きくないシステムのログを取り込んで可視化するには充分かなと思います。

ではインストールします。

Splunk on Linuxインストール

Splunkは、ドキュメントおよび、チュートリアル動画がとても充実しています。
* ドキュメント
http://docs.splunk.com/Documentation
* チュートリアルドキュメント
http://docs.splunk.com/Documentation/Splunk/latest/SearchTutorial/WelcometotheSearchTutorial
* チュートリアル動画
http://www.splunk.com/view/SP-CAAAGW9

インストールは下記動画を参考に実施しました。

Splunk Education: Installing Splunk Enterprise 6 on Linux
http://www.splunk.com/view/SP-CAAAGW9

環境

CentOS (Vagrant)

splunk-6.0-182037-Linux-x86_64.tgz
をインストールします。

インストール先は下記にしました。
/usr/local/splunk

下準備

ユーザ/グループの作成

- user
splunker (uid : 501)
- group
splunker (gid : 503)

を作ります。

$ su 
# groupadd -g 503 splunker
# useradd -u 501 -g 503 splunker
# passwd splunker
# id splunker
uid=501(splunker) gid=503(splunker) groups=503(splunker) 

環境変数

$ export SPLUNK_HOME=/usr/local/splunk
$ export | grep SPLUNK
declare -x SPLUNK_HOME="/usr/local/splunk"

インストール

# cd /usr/local/src
# pwd
# cp /vagrant/splunk-6.0-182037-Linux-x86_64.tgz .
# ls -al
# tar zxfv splunk-6.0-182037-Linux-x86_64.tgz
# mv splunk ../
# cd ../
# ls -al

設定

# cd $SPLUNK_HOME/etc
# pwd
# cp splunk-launch.conf.default splunk-launch.conf
# vi splunk-launch.conf
SPLUNK_HOMEを定義
今回はSPLUNK_HOME=/usr/local/splunk

起動

# cd $SPLUNK_HOME/bin
# ./splunk start --accept-license

起動メッセージの最後に
----
If you get stuck, we're here to help.
Look for answers here: http://docs.splunk.com

The Splunk web interface is at http://log.hogei:8000
----
というように web interface のURLが表示されますが、
名前解決をしていない場合は、Vagrantに割り振ったIP Addressでアクセスしましょう。


http://log.hoge:8000
⬇
http://192.168.33.10:8000/

起動確認

ブラウザで http://192.168.33.10:8000/ でアクセスしてみましょう。

Screen Shot 2013-11-21 at 4.54.04 PM.png

この画面が出ればインストールは終了です。

表示されているデフォルトのID/Passwordでログインしてみましょう。
必要に応じてパスワードは変更してみてね。

続きはまた次回。

36
37
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
36
37