10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

サーバー監視ツール Zabbix

Last updated at Posted at 2016-08-28

Zabbix

Zabbix は Alexei Vladishev によって1998年頃に開発を始めた監視ツール。

最新安定版は 2016/07/22 リリースの 3.0.4 で、最新評価版は 2016/08/05 リリースの 3.2.0alpha1 になる。

インストール

構成

  • CentOS 7.2.1511
  • Apache 2.4.6
  • PHP 5.6.24
  • MySQL Community Server 5.7.14
  • Zabbix 3.0.4

EPEL リポジトリーにも zabbix22 という Zabbix 2.2 のパッケージがあるが、如何せん古いので Zabbix 公式のリポジトリーを利用する。 PHP 7 にはまだ未対応とのこと。

MySQL

yum install https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
yum install mysql-community-server
cp -a /etc/my.cnf{,.org}
echo "character-set-server=utf8" >> /etc/my.cnf
systemctl enable mysqld
systemctl start mysqld
grep "temporary password" /var/log/mysqld.log | awk '{print $11}'
mysql_secure_installation
mysql -u root -p
mysql> CREATE DATABASE zabbix CHARACTER SET utf8 COLLATE utf8_bin;
mysql> GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY '<password>';
mysql> EXIT;

PHP

yum install http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
yum install yum-utils
yum-config-manager --enable remi-php56
yum install php php-gd php-bcmath php-xml php-mbstring php-php-gettext php-mysqlnd
sed -i 's|;date.timezone =|date.timezone = Asia/Tokyo|' /etc/php.ini
yum install OpenIPMI libssh2 fping libcurl iksemel libxml2 net-snmp

Zabbix

yum install http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql zabbix-web-japanese zabbix-agent
zcat `find /usr/share/doc/zabbix-* -name create.sql.gz` | mysql -u root -p zabbix
sed -i '/# DBPassword/a \\nDBPassword=<password>' /etc/zabbix/zabbix_server.conf
setsebool -P httpd_can_connect_zabbix on
setsebool -P zabbix_can_network on
systemctl start zabbix-server
systemctl start zabbix-agent
systemctl start httpd
systemctl enable zabbix-server
systemctl enable zabbix-agent
systemctl enable httpd

ブラウザから /zabbix にアクセスするとセットアップ画面が開く。
アカウントは Admin 、パスワードは zabbix でログイン。

モニタリング関連記事

10
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
10

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?