ログを見るのにZABBIXというのが便利らしいのでインストールしてみる。
参考:[ThinkIT] 第7回:RPM/debパッケージを用いたZABBIXのインストール (2/3)
その前に、先日停止したapache2を起動させる。
Webminの「システム > 起動及びシャットダウン」でapache2の前にチェックを付け、「Start Now and On Boot」ボタンを押す。
アクションの開始中
コマンド /etc/init.d/apache2 start を実行中..* Starting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
...done.Enabling action apache2 at boot time.
これでapache2が起動した。
続いてMySQLの設定。既にMySQLはインストール済みなので、zabbixデータベースを作る。これもWebminにて。「サーバ > MySQL データベース サーバ」を選んで、
MySQLデータベースにある「新規データベースを作成」を選択。
新規のデータベース オプション
データベース名 zabbix
おそらくその他の設定は要らないと判断し^^;;、これだけで「作成」ボタンを押す。
~$ sudo apt-get install zabbix-server-mysql パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています Reading state information... 完了 The following packages were automatically installed and are no longer required: libdb4.3 Use 'apt-get autoremove' to remove them. 以下の特別パッケージがインストールされます: dbconfig-common fping libcurl3 libsensors3 libsnmp-base libsnmp10 提案パッケージ: lm-sensors zabbix-frontend-php 推奨パッケージ: snmpd 以下のパッケージが新たにインストールされます: dbconfig-common fping libcurl3 libsensors3 libsnmp-base libsnmp10 zabbix-server-mysql アップグレード: 0 個、新規インストール: 7 個、削除: 0 個、保留: 0 個。 2658kB のアーカイブを取得する必要があります。 展開後に追加で 9966kB のディスク容量が消費されます。 続行しますか [Y/n]? y 取得:1 http://jp.archive.ubuntu.com gutsy/universe dbconfig-common 1.8.35 [466kB] 取得:2 http://jp.archive.ubuntu.com gutsy/main fping 2.4b2-to-ipv6-14 [29.8kB] 取得:3 http://jp.archive.ubuntu.com gutsy/main libcurl3 7.16.4-2ubuntu1 [182kB] 取得:4 http://jp.archive.ubuntu.com gutsy/main libsensors3 1:2.10.4-1ubuntu1 [88.8kB] 取得:5 http://jp.archive.ubuntu.com gutsy/main libsnmp-base 5.3.1-6ubuntu2 [483kB] 取得:6 http://jp.archive.ubuntu.com gutsy/main libsnmp10 5.3.1-6ubuntu2 [1123kB] 取得:7 http://jp.archive.ubuntu.com gutsy-updates/universe zabbix-server-mysql 1:1.4.1-2ubuntu0.1 [285kB] 2658kB を 2s で取得しました (1128kB/s) パッケージを事前設定しています ... 未選択パッケージ dbconfig-common を選択しています。 (データベースを読み込んでいます ... 現在 35078 個のファイルとディレクトリがインストールされています。) (.../dbconfig-common_1.8.35_all.deb から) dbconfig-common を展開しています... 未選択パッケージ fping を選択しています。 (.../fping_2.4b2-to-ipv6-14_i386.deb から) fping を展開しています... 未選択パッケージ libcurl3 を選択しています。 (.../libcurl3_7.16.4-2ubuntu1_i386.deb から) libcurl3 を展開しています... 未選択パッケージ libsensors3 を選択しています。 (.../libsensors3_1%3a2.10.4-1ubuntu1_i386.deb から) libsensors3 を展開しています... 未選択パッケージ libsnmp-base を選択しています。 (.../libsnmp-base_5.3.1-6ubuntu2_all.deb から) libsnmp-base を展開しています... 未選択パッケージ libsnmp10 を選択しています。 (.../libsnmp10_5.3.1-6ubuntu2_i386.deb から) libsnmp10 を展開しています... 未選択パッケージ zabbix-server-mysql を選択しています。 (.../zabbix-server-mysql_1%3a1.4.1-2ubuntu0.1_i386.deb から) zabbix-server-mysql を展開しています... dbconfig-common (1.8.35) を設定しています ... fping (2.4b2-to-ipv6-14) を設定しています ... libcurl3 (7.16.4-2ubuntu1) を設定しています ... libsensors3 (1:2.10.4-1ubuntu1) を設定しています ... udev active, devices will be created in /dev/.static/dev/ libsnmp-base (5.3.1-6ubuntu2) を設定しています ... libsnmp10 (5.3.1-6ubuntu2) を設定しています ... zabbix-server-mysql (1:1.4.1-2ubuntu0.1) を設定しています ...
ここで設定画面が出てくる。
パッケージの設定 ┌─────────────────┤ zabbix-server-mysql を設定しています │ │ │ zabbix-server-mysql must have a database installed and configured before │ │ it can be used. If you like, this can be handled with dbconfig-common. │ │ │ │ If you are an advanced database administrator and know that you want to │ │ perform this configuration manually, or if your database has already │ │ been installed and configured, you should refuse this option. Details │ │ on what needs to be done should most likely be provided in │ │ /usr/share/doc/zabbix-server-mysql. │ │ │ │ Otherwise, you should probably choose this option. │ │ │ │ Configure database for zabbix-server-mysql with dbconfig-common? │ │ │ │ <Yes> <No> │ │ │ └────────────────────────────────────┘
参考記事に従い
パッケージの設定 ┌───────────────┤ zabbix-server-mysql を設定しています ├ │ What is the password for the administrative account with which this │ │ package should create its MySQL database and user? │ │ │ │ Password of your database's administrative user: │ │ │ │ _____________________________________________________________________ │ │ │ │ <Ok> <Cancel> │ │ │ └──────────────────────────────────┘
Ubuntu serverインストール時に設定したMySQLのrootパスワードを入力。
パッケージの設定 ┌─────────────────┤ zabbix-server-mysql を設定しています │ Please provide a password for zabbix-server-mysql to register with the │ │ database server. If left blank, a random password will be generated for │ │ you. │ │ │ │ MySQL application password for zabbix-server-mysql: │ │ │ │ _________________________________________________________________________ │ │ │ │ <Ok> <Cancel> │ │ │ ───────────────────────────────────┘
zabbixデータベースのパスワードを作るのだが、空白にしてパスワードを自動生成させる。
dbconfig-common: writing config to /etc/dbconfig-common/zabbix-server-mysql.conf Creating config file /etc/dbconfig-common/zabbix-server-mysql.conf with new version Creating config file /etc/zabbix/zabbix_server.conf with new version chown: `zabbix': invalid user granting access to database zabbix for zabbix@localhost: success. verifying access for zabbix@localhost: success. creating database zabbix: already exists. populating database via sql... done. dbconfig-common: flushing administrative password Starting Zabbix server: zabbix_server Processing triggers for libc6 ... ldconfig deferred processing now taking place
ということでZABBIX本体の設定完了。