lost and found ( for me ? )

how to install zabbix server 1.6.9 on CentOS5.5

# cat /etc/redhat-release
CentOS release 5.5 (Final)

RHEL5 , CentOS5 用のレポジトリを追加。

http://www.zabbix.jp/modules/bwiki/index.php?ZABBIX-JP%A4%CEyum%A5%EA%A5%DD%A5%B8%A5%C8%A5%EA%CD%F8%CD%D1%CA%FD%CB%A1#content_1_3

[root@hat2 ~]# rpm -ivh http://www.zabbix.jp/binaries/relatedpkgs/rhel5/i386/zabbix-jp-release-5-3.noarch.rpm

同一マシンに server , agent をインストール。
通常、server , agent は別マシンだろうけどテスト用に。

[root@hat2 etc]# yum install zabbix zabbix-agent zabbix-server zabbix-server-mysql zabbix-web zabbix-web-mysql mysql-server net-snmp

# rpm -qa | grep zabbix
zabbix-1.6.9-3.el5.JP
zabbix-web-mysql-1.6.9-3.el5.JP
zabbix-jp-release-5-3
zabbix-server-1.6.9-3.el5.JP
zabbix-agent-1.6.9-3.el5.JP
zabbix-server-mysql-1.6.9-3.el5.JP
zabbix-web-1.6.9-3.el5.JP

ユーザの作成、、と思ったら、自動で作成してくれるみたい。

[root@hat2 ~]# egrep zabbix /etc/passwd
zabbix:x:102:106:Zabbix Monitoring System:/var/lib/zabbix:/sbin/nologin

[root@hat2 ~]# egrep zabbix /etc/group
zabbix:x:106:

データーベースの準備

[root@hat2 ~]# /etc/init.d/mysqld start

MySQLのルートパスワードの設定

[root@hat2 ~]# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> set password for root@localhost=password('hello');
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye
[root@hat2 ~]#

[root@hat2 ~]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 11
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> quit
Bye

データベースの作成

[root@hat2 ~]# mysql -uroot -phello
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 15
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database zabbix;
Query OK, 1 row affected (0.00 sec)

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'hello';
Query OK, 0 rows affected (0.00 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye

[root@hat2 ~]# mysql -u root -phello
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 16
Server version: 5.0.77 Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| test               |
| zabbix             |
+--------------------+
4 rows in set (0.00 sec)

mysql> quit

スキーマのインポート

[root@hat2 ~]# mysql -uroot -phello zabbix < /usr/share/doc/zabbix-server-1.6.9/schema/mysql.sql
[root@hat2 ~]# mysql -uroot -phello zabbix < /usr/share/doc/zabbix-server-1.6.9/data/data.sql
[root@hat2 ~]# mysql -uroot -phello zabbix < /usr/share/doc/zabbix-server-1.6.9/data/images_mysql.sql

[root@hat2 ~]# /etc/init.d/zabbix-server start
Starting zabbix server:                                    [  OK  ]
[root@hat2 ~]# /etc/init.d/zabbix-agent start
Starting zabbix agent:                                     [  OK  ]
[root@hat2 ~]# /etc/init.d/httpd start
httpd を起動中:                                            [  OK  ]

[root@hat2 ~]# rm /etc/zabbix/zabbix.conf.php

ブラウザで http://サーバのIP/zabbix にアクセス。

/var/www/html/zabbix ディレクトリは作成しないこと。




MySQLへの接続 OK



Apache からコンフィグを設定できるようにパーミッションを変更。
変更しないと、下記のように Fail となる。


# chmod 777 /etc/zabbix

パーミッションを変更し、 Retry をおしたあと。OK


user: admin , pass: zabbix でログイン


文字化けするなー


下記を変更したが、文字化け直らず。また今度。

# less /usr/share/zabbix/map.php

                               //imagestring($im, 2, $x_info, $y_info, $info_line,$color);
                               ImageTTFText($im, 8, 0, $x_info+5, $y_info+10, $color, "/usr/share/fonts/japanese/TrueType/sazanami-gothic.ttf", $info_line);

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.