なんだかうまくいかない。ちゃんとログを取ってくれない。AvailabilityがAvailableにならないのが問題なのだが、よく分からない。
ということで一度アンインストールしてみる。
その前にそれぞれのプロセスを停止させる。
アクションの停止中
コマンド /etc/init.d/zabbix-agent stop を実行中..Stopping Zabbix agent: zabbix_agentd
No /usr/sbin/zabbix_agentd found running; none killed.コマンド /etc/init.d/zabbix-server stop を実行中..
Stopping Zabbix server: zabbix_server
No /usr/sbin/zabbix_server found running; none killed.
…やはり動いてなかった。
次に一旦削除する。
~$ sudo apt-get remove zabbix-server-mysql zabbix-agent zabbix-frontend-php パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています Reading state information... 完了 The following packages were automatically installed and are no longer required: ttf-dejavu-core libsensors3 libsnmp10 ttf-dejavu-extra libx11-data php5 libfontconfig1 fontconfig-config php5-gd libxau6 libt1-5 libcurl3 libxdmcp6 libxpm4 fping libgd2-xpm libpng12-0 ttf-dejavu libjpeg62 libfreetype6 x11-common libdb4.3 libsnmp-base libx11-6 dbconfig-common defoma Use 'apt-get autoremove' to remove them. 以下のパッケージは「削除」されます: zabbix-agent zabbix-frontend-php zabbix-server-mysql アップグレード: 0 個、新規インストール: 0 個、削除: 3 個、保留: 0 個。 0B のアーカイブを取得する必要があります。 展開後に 5730kB のディスク容量が解放されます。 続行しますか [Y/n]? y (データベースを読み込んでいます ... 現在 36377 個のファイルとディレクトリがインストールされています。) zabbix-agent を削除しています ... Stopping Zabbix agent: zabbix_agentd No /usr/sbin/zabbix_agentd found running; none killed. zabbix-frontend-php を削除しています ... * Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName ...done. zabbix-server-mysql を削除しています ...
また設定画面が出てきた。
パッケージの設定 ┌────────────────┤ zabbix-server-mysql を設定しています ├│ │ │ Since you are removing zabbix-server-mysql, it's possible that you no │ │ longer want the underlying database. │ │ │ │ If you like, database removal can be handled with dbconfig-common. │ │ │ │ If you know that you do want to keep this database, or if you want to │ │ handle the removal of this database manually, you should refuse this │ │ option. │ │ │ │ Otherwise, you should choose this option. │ │ │ │ Deconfigure database for zabbix-server-mysql with dbconfig-common? │ │ │ │ <Yes> <No> │ │ │ └───────────────────────────────────┘
元に戻すために
パッケージの設定 ┌─────────────────┤ zabbix-server-mysql を設定しています │ │ │ If you no longer need the database for zabbix-server-mysql, this is your │ │ chance to remove them. │ │ │ │ If you no longer have need of the data being stored by │ │ zabbix-server-mysql, you should choose this option. If you want to hold │ │ this data for another time, or if you would rather handle this process │ │ manually, you should refuse this option. │ │ │ │ Do you want to purge the database for zabbix-server-mysql? │ │ │ │ <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> │ │ │ └─────────────────────────────────┘
MySQLのパスワードを入力。
Stopping Zabbix server: zabbix_server No /usr/sbin/zabbix_server found running; none killed. dbconfig-common: dumping mysql database zabbix to /var/tmp/zabbix-server-mysql.zabbix.2008-01-08-17.00.mysql.ur4726. dbconfig-common: dropping mysql database zabbix. dropping database zabbix: success. verifying database zabbix was dropped: success. dbconfig-common: revoking privileges for user zabbix on zabbix. revoking access to database zabbix from zabbix@localhost: success.
ということで削除された。
MySQLのzabbixデータベースはすでに削除された。
ということで、再度仕切り直し。
ZABBIXインストール - 別館 子子子子子子(ねこのここねこ)
ZABBIXフロントエンドのインストール - 別館 子子子子子子(ねこのここねこ)
を再度行う。
ただしzabbixデータベースのパスワードだが、今回は設定しておこう。
…と思ったのだが、ZABBIXインストール - 別館 子子子子子子(ねこのここねこ)を実行したときに、前に出てきた設定画面が出てこなかった。一度設定済みだからだろうか…。
ああ、もうわからん。
仕切り直し。
ググったら、dpkg --purgeというので設定ファイルも削除できるとの記載を見つけた。
~$ sudo dpkg --purge zabbix-server-mysql (データベースを読み込んでいます ... 現在 36137 個のファイルとディレクトリがインストールされています。) zabbix-server-mysql を削除しています ... Stopping Zabbix server: zabbix_server No /usr/sbin/zabbix_server found running; none killed. dbconfig-common: dumping mysql database zabbix to /var/tmp/zabbix-server-mysql.zabbix.2008-01-08-17.22.mysql.Xm5273. dbconfig-common: dropping mysql database zabbix. dropping database zabbix: success. verifying database zabbix was dropped: success. dbconfig-common: revoking privileges for user zabbix on zabbix. revoking access to database zabbix from zabbix@localhost: access does not exist. zabbix-server-mysql の設定ファイルを削除しています ...
再度apt-get zabbix-server-mysqlを行う。
あ、今回はちゃんと設定画面が出てくるし、zabbixデータベースも構築された。良かった^_^。
パッケージの設定 ┌─────────────────┤ zabbix-frontend-php を設定しています │ 設定ファイル /etc/zabbix/dbconfig.php の新しいバージョンが利用可能ですが │ 、現在のあなたのバージョンは、ローカルで変更されています。 │ │ │ dbconfig.php について何を行いたいですか? │ │ │ パッケージメンテナのバージョンをインストール │ 現在インストールされているバージョンを保持 │ バージョン間の差異を表示 │ │ バージョン間の差異を並行表示 │ │ 状況を検討するための新しいシェルを起動 │ │ │ │ │ <Ok> │ │ │ └────────────────────────────────────┘
新しくするために「パッケージメンテナのバージョンをインストール」を選択。
おそらくインストールできたかな。
続いてZABBIXエージェントインストール - 別館 子子子子子子(ねこのここねこ)を行う。
そして、ZABBIXにログインして、Configuration > Hostsで不要なことをせずにZABBIX Serverにチェックを入れてActivate Selectedする。
あれ、またAvailabilityがunknownだ…orz。
いや、ちゃんとAvailabilityがAvailableになった!よし!