主にLinuxサーバー設定記録をメモします

YUMのリポジトリをインストール

現在使用しているリポジトリのZABBIXバージョンの確認

# alternatives --display zabbix-jp-release
zabbix-jp-release -ステータスは自動です。
リンクは現在 /usr/share/zabbix-jp-release/zabbix-jp-1.6.repo を指しています。
/usr/share/zabbix-jp-release/zabbix-jp-1.1.repo - 優先項目 10
/usr/share/zabbix-jp-release/zabbix-jp-1.4.repo - 優先項目 20
/usr/share/zabbix-jp-release/zabbix-jp-1.6.repo - 優先項目 40
/usr/share/zabbix-jp-release/zabbix-jp-1.8.repo - 優先項目 30
現在の「最適」バージョンは /usr/share/zabbix-jp-release/zabbix-jp-1.6.repo です

優先順位を上げるバージョンを切り替える

# alternatives --config zabbix-jp-release
4 プログラムがあり 'zabbix-jp-release' を提供します。

  選択       コマンド
-----------------------------------------------
   1           /usr/share/zabbix-jp-release/zabbix-jp-1.1.repo
   2           /usr/share/zabbix-jp-release/zabbix-jp-1.4.repo
*+ 3           /usr/share/zabbix-jp-release/zabbix-jp-1.6.repo
   4           /usr/share/zabbix-jp-release/zabbix-jp-1.8.repo

Enter を押して現在の選択 [+] を保持するか、選択番号を入力します:4

zabbixのインストール

# yum -y install zabbix zabbix-agent zabbix-server zabbix-server-mysql zabbix-web zabbix-web-mysql

MySQLにzabbixデータベースを作成

# mysql -uroot -p
mysql> create database zabbix;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'xxxxxxx';
mysql> flush privileges;
mysql> quit

初期データベースをインポート

# mysql -uroot -p zabbix < /usr/share/doc/zabbix-server-1.8.5/create/schema/mysql.sql
# mysql -uroot -p zabbix < /usr/share/doc/zabbix-server-1.8.5/create/data/data.sql
# mysql -uroot -p zabbix < /usr/share/doc/zabbix-server-1.8.5/create/data/images_mysql.sql

PHP設定

# vi /etc/php.ini
; Defines the default timezone used by the date functions
; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
date.timezone = Asia/Tokyo

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

; Maximum execution time of each script, in seconds
; http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time
memory_limit = 128M
post_max_size = 16M
max_execution_time = 300
max_input_time = 300

インストーラ

初期設定

Zabbixサーバー側
# vi /etc/zabbix/zabbix_server.conf
### Option: DBHost
#       Database host name.
#       If set to localhost, socket is used for MySQL.
#

# DBHost=localhost

### Option: DBName
#       Database name.
#       For SQLite3 path to database file must be provided. DBUser and DBPassword are ignored.

DBName=zabbix

### Option: DBUser
#       Database user. Ignored for SQLite.

DBUser=zabbix <- データベースユーザ名を設定

### Option: DBPassword
#       Database password. Ignored for SQLite.
#       Comment this line if no password is used.

DBPassword=XXXXXXXX <- コメントアウトを外してデータベースパスワードを設定

### Option: DBSocket
#       Path to MySQL socket.

DBSocket=/var/lib/mysql/mysql.sock
Zabbixサーバー起動
#/etc/rc.d/init.d/zabbix-server start
Zabbixエージェント側
# vi /etc/zabbix/zabbix_agentd.conf
### Option: Server
#       List of comma delimited IP addresses (or hostnames) of Zabbix servers.
#       No spaces allowed. First entry is used for receiving list of and sending active checks.

Server=127.0.0.1

### Option: Hostname
#       Unique, case sensitive hostname.
#       Required for active checks and must match hostname as configured on the server.
#       System hostname is used if undefined.

Hostname=Zabbix server

### Option: ListenIP
#       List of comma delimited IP addresses that the agent should listen on.
#

ListenIP=127.0.0.1
Zabbixエージェント起動
# /etc/init.d/zabbix-agent start
自動起動設定
# chkconfig zabbix-server on
# chkconfig zabbix-agent on

Menu

メニュー

アプリケーション

アプリケーション

その他

【メニュー編集】

管理人/副管理人のみ編集できます