環境
- CentOS7.2 64bit
- zabbix_server (Zabbix) 3.0.3
手順概要
- Zabbixサーバのインストール
- Webインターフェースのインストール
手順詳細
Zabbixサーバのインストール
yumリポジトリの登録
# rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
RPMを利用してインストール
# yum install zabbix-server-mysql mariadb-server
MariaDBの起動
# systemctl start mariadb
データベースの作成
# mysql -u root
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 2
Server version: 5.5.47-MariaDB MariaDB Server
Copyright (c) 2000, 2015, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'Password';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit;
Bye
初期データベースのインポート
# cd /usr/share/doc/zabbix-server-mysql-x.x.x
# zcat create.sql.gz | mysql -u zabbix -p zabbix
Zabbixサーバ設定ファイル修正
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword={PASSWORD}
Zabbixサーバの起動
# systemctl start zabbix-server
Webインターフェースのインストール
RPMを利用したバイナリのインストール
# yum install zabbix-web-mysql zabbix-web-japanese
PHP設定の確認とタイムゾーン設定
# vi /etc/httpd/conf.d/zabbix.conf
<IfModule mod_php5.c>
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
php_value date.timezone Asia/Tokyo
</IfModule>
Apacheの起動
# systemctl start httpd
ブラウザからWebインターフェースにアクセス
- http://{Zabbix-Server-IP}/zabbix
必要なライブラリやPHPパラメータの確認
- 全てOKとなっていることを確認
Counfigure DB connection
- DB接続設定を入力
Zabbix server details
パラメータ | 設定値 |
---|---|
Host | Zabbixサーバが起動しているIPアドレス |
Port | ZabbixサーバのTrapperポートを設定 (デフォルト10051) |
Name | Webインターフェースの右上に設定した文字列が表示される (複数のZabbixを利用する場合に有用) |
ログイン
- ID:Admin/PW:zabbix でログイン実施
以上!