| パッケージ | 必要 | インストール済み | インストール | 
| curl | 7.13.1 | 7.15.5 | 
| mysql |  | 5.0.22-2.2.el5_1.1 | 
| mysql-server |  | 5.0.22-2.2.el5_1.1 | 
| mysql-devel |  | 5.0.22-2.2.el5_1.1 | 
| net-snmp |  | 5.3.1-19.el5_1.4 | 
| net-snmp-lib |  | 5.3.1-19.el5_1.4 | 
| net-snmp-devel |  |  | 5.3.1-19.el5_1.4 | 
| php |  | 5.16-15.el5 | 
| php-pear |  |  | 追加 | 
| php-gd |  | 5.16-15.el5 | 
| php-mysql |  | 5.16-15.el5 | 
| fping |  |  | 追加 | 
| 項目 | 内容 | 
| DB type | MySQL | 
| DB connection | socket | 
| DB name | zabbix | 
| DB user | zabbix | 
| DB pass | ************ | 
yum install net-snmp-devel php-pear
- 依存関係でインストールされたパッケージ: beecrypt-devel elfutils-devel elfutis-devel-static elfutils-libelf-devel elfutils-libelf-devel-static elfutils-libs rpm-devel sqlite-devel
mysqladmin create zabbix
- 標準「root」
- zabbix の管理者 root のパスワードを変更
# mysql -p
mysql> set password=password('???????');
- mysql のユーザー zabbix の作成とパスワードの変更
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '????????';
# /usr/sbin/groupadd zabbix
# /usr/sbin/useradd -g zabbix -s /sbin/nologin zabbix -d /home/zabbix
# id zabbix
uid=501(zabbix) gid=501(zabbix) groups=501(zabbix)
$ cd ~zabbix
$ tar xzvf zabbix-1.4.2.tar.gz
$ cd zabbix-1.4.5
$ ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-net-snmp --with-mysql --with-libcurl=/usr/bin/curl-config
$ make
# make install
# cp -r frontends/php /usr/local/zabbix
# cp misc/init.d/redhat/8.0/zabbix_agentd /etc/init.d
# cp misc/init.d/redhat/8.0/zabbix_server /etc/init.d
# chmod +x /etc/init.d/zabbix_server /etc/init.d/zabbix_agentd
- 調整: /usr/local/bin/ となっているのを /usr/local/sbin/ に変更
- ログディレクトリ作成、設定
mkdir /var/log/zabbix /var/run/zabbix
chown zabbix:zabbix /var/log/zabbix /var/run/zabbix
Hostname=server01
LogFile=/var/log/zabbix/zabbix_agentd.log
PidFile=/var/run/zabbix/zabbix_agentd.pid
Server=127.0.0.1
LogFileSize=10
DebugLevel=4
StartAgents=5
PidFile=/var/run/zabbix/zabbix_server.pid
LogFile=/var/log/zabbix/zabbix_server.log
DBName=zabbix
DBUser=zabbix
DBPassword=????????
DBSocket=/var/lib/mysql/mysql.sock
FpingLocation=/usr/local/zabbix/sbin/fping
LogFileSize=10
DebugLevel=3
cat create/schema/mysql.sql | mysql -u zabbix -p zabbix
cat create/data/data.sql | mysql -u zabbix -p zabbix
cat create/data/images_mysql.sql | mysql -u zabbix -p zabbix
zabbix webインターフェース設定
Include conf/zabbix.conf
Alias /zabbix/ /usr/local/zabbix/php
<Directory /usr/local/zabbix/php>
  Options IncludesNoExec
  order deny,allow
  deny from all
  allow from 192.168.
  allow from 127.0.0.1
</Directory>
# chown apache /usr/local/zabbix/php/conf /usr/local/zabbix/php/config.php
# rpm --test -i -v fping-2.4-1.b2.2.el5.rf.i386.rpm 
# rpm -i -v fping-2.4-1.b2.2.el5.rf.i386.rpm 
cp /usr/sbin/fping /usr/local/zabbix/sbin/fping
chmod u+s /usr/local/zabbix/sbin/fping
chown root:zabbix /usr/local/zabbix/sbin/fping
# ls -l /usr/local/zabbix/sbin/fping
-rwsr-x--- 1 root zabbix 29497 Mar  8 2007 /usr/local/zabbix/sbin/fping
- zabbix ユーザが fping を利用するのに権限調整が必要
- (参考) fping をソースから構築したが、うまくいかなかった。
Name or service not known
Address family for hostname not supported
- ネットワーク利用のライブラリが使えない?
- ライブラリの混乱?
/sbin/chkconfig --add zabbix_server
/sbin/chkconfig --add zabbix_agentd 
/sbin/chkconfig zabbix_server on
/sbin/chkconfig zabbix_agentd on
/sbin/service zabbix_server on
/sbin/service zabbix_agentd on
- max_execution_time を 30 から 300 に増加
- memory_limit = 16M (16M 以上を確認)
- httpd 再起動
chown apache: /opt/zabbix/php/config
- --- を管理者として作成
- 言語環境をja_jp に
JavaSript系文字化け修正
php/include/classes/ctags.inc
- 文字列を水平に描画する
- bool imagestring ( resource image, int font, int x, int y, string sring, int color )
- TrueType フォントを使用してテキストを画像に書き込む
- array imagettftext ( resource image, float size, float angle, int x, int y, int color, string fontfile, string text )
- TypeType フォントを使用したテキストの bounding box を生成する
- サイズを測定し、中央表示や右寄せ表示時の左位置指定計算
- array imagettfbbox ( float size, float angle, string fontfile, string text )