17
Cacti running with Cherokee 監視ツール勉強会 Cacti編 2012年6月6日 @yut148

配布用Cacti running with cherokee

Embed Size (px)

DESCRIPTION

2012年6月6日に行われた、監視ツール勉強会 Cacti編での発表資料です。

Citation preview

Page 1: 配布用Cacti running with cherokee

Cacti running with Cherokee

監視ツール勉強会 Cacti編2012年6月6日

@yut148

Page 2: 配布用Cacti running with cherokee

自己紹介

@yut148 ←読みはワイユーティーでお願いします。

         他特にこだわりはありません。 鍵ユーザーですがフォロー歓迎です。

職業 ゲーム会社 (sap とか CPとかです。)

orエンターテイメント会社に勤めています。

現在は仕事でコードを書いてません。今の仕事はどちらかと言えば運用系多分インフラエンジニアに属します。

前職含め、ゲーム会社にてサーバ管理の仕事が多い。

Page 3: 配布用Cacti running with cherokee

お題

1) Cherokeeとは2)インストールと起動3)cactiを使う上での設定変更

Page 4: 配布用Cacti running with cherokee

1)Cherokeeとは

Page 5: 配布用Cacti running with cherokee

1)Cherokeeとは

※User friendly All the configuration is done through Cherokee-Admin, a beautiful and powerful Web interface.※Web Apps repository Cherokee allows to deploy Web Apps optimally, in seconds, with just a few mouse clicks.※Modern Technologies Cherokee supports the most widespread Web technologies: FastCGI, SCGI, PHP, uWSGI, SSI, CGI, LDAP, TLS/SSL, HTTP proxying, Video streaming, Content caching, Traffic Shaping, etc.※Cross Platform Cherokee runs on Linux, MacOS X, Solaris, and BSD. A native Windows port is on the works.

Page 6: 配布用Cacti running with cherokee

1)Cherokeeとは

※User friendly All the configuration is done through Cherokee-Admin, a beautiful and powerful Web interface. ユーザフレンドリーについて見て行きます。

Page 7: 配布用Cacti running with cherokee

2)インストールと起動

ソースからインストール出来るけどCentOS6ならepelでインストールした方が手軽。 rpm -ivh "http://pkgrepo.linuxtech.net/el6/release/x86_64/GeoIP-1.4.8-3.el6.x86_64.rpm"rpm -ivh "http://dl.fedoraproject.org/pub/epel/6/x86_64/spawn-fcgi-1.6.3-1.el6.x86_64.rpm"rpm -ivh "http://dl.fedoraproject.org/pub/epel/6/x86_64/cherokee-1.2.101-3.el6.x86_64.rpm"

GeoIPとspawn-fcgiが必要

ソースの起動スクリプトはstart-stop-daemonを必要としubuntu用start)echo -n "Starting cherokee web server: $NAME"start-stop-daemon --start -b --exec $DAEMON

Page 8: 配布用Cacti running with cherokee

2)インストールと起動

cherokee-adminを起動[root@localhost ~]# /usr/sbin/cherokee-admin -t -bCherokee Web Server 1.2.101 (Feb 21 2012): Listening on port ALL:9090, TLSdisabled, IPv6 enabled, using epoll, 4096 fds system limit, max. 2041connections, caching I/O, single thread Login:User: adminOne-time Password: ckxIrrOchWjoSVcKWeb Interface: URL: http://localhost:9090/

※-t -bを付けないと他のクライアントから見られない

Page 9: 配布用Cacti running with cherokee

3)cactiを使う上での設定変更

Apacheで言うところのAddHandler

ドキュメントルートの設定

Page 10: 配布用Cacti running with cherokee

3)cactiを使う上での設定変更

ドキュメントルートの設定

Page 11: 配布用Cacti running with cherokee

3)cactiを使う上での設定変更

Page 12: 配布用Cacti running with cherokee

3)cactiを使う上での設定変更

Page 13: 配布用Cacti running with cherokee

3)cactiを使う上での設定変更

Page 14: 配布用Cacti running with cherokee

3)cactiを使う上での設定変更

[root@localhost ~]# ls -la /etc/cherokee/cherokee.conf*-rw-r--r-- 1 cherokee cherokee 13480 5月 31 08:01 2012 /etc/cherokee/cherokee.conf

-rw-r--r-- 1 root root 13155 5月 31 08:01 2012 /etc/cherokee/cherokee.conf.backup

設定ファイルのバックアップは自動で作られます。 ちなみに、cherokkeのwebサーバ側のプロセスが起動していて、かつ挙動に影響があるもの(ディレクトリ変更等)がある場合は即反映するか問い合わせがある。 gracefuもしくはstopの後、start

Page 15: 配布用Cacti running with cherokee

使った感想

設定が簡単に済むのはcherokee-adminを起動した場合だけ。GUIは設定ファイルを俯瞰しにくい。

(目視では管理しにくくなる。)wc /etc/cherokee/cherokee.conf 313 945 13459 /etc/cherokee/cherokee.conf慣れれば簡単。最小限の操作にとどめる。 cherokee-adminを起動したままだと第三者に設定を書き換えられる恐れがあるので注意。

Page 16: 配布用Cacti running with cherokee

余談

最初にapacheをインストールしていると/var/lib/php/sessionが出来てしまいパーミションで問題が起こる。 →適切なパーミッション設定を。 /etc/php.iniの時刻情報を確認

 以前から使い回している環境だと以外に 忘れがち 

Page 17: 配布用Cacti running with cherokee