CentOS 7.2にZabbix3.0をインストールする手順

1.zabbixのインストール
# cat /etc/RedHat-release
CentOS Linux release 7.2.1511 (Core)

#sudo rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm

#sudo yum install zabbix-server-mysql zabbix-web-mysql
Package Arch Version Repository Size
================================================================================Installing:
zabbix-server-mysql x86_64 3.0.1-1.el7 zabbix 1.7 M
zabbix-web-mysql noarch 3.0.1-1.el7 zabbix 3.5 k
Installing for dependencies:
OpenIPMI-libs x86_64 2.0.19-11.el7 base 501 k
OpenIPMI-modalias x86_64 2.0.19-11.el7 base 15 k
dejavu-fonts-common noarch 2.33-6.el7 base 64 k
dejavu-sans-fonts noarch 2.33-6.el7 base 1.4 M
fping x86_64 3.10-4.el7 epel 46 k
httpd x86_64 2.4.6-40.el7.centos base 2.7 M
httpd-tools x86_64 2.4.6-40.el7.centos base 82 k
iksemel x86_64 1.4-6.el7 epel 50 k
libtool-ltdl x86_64 2.4.2-21.el7_2 updates 49 k
libzip x86_64 0.10.1-8.el7 base 48 k
mailcap noarch 2.1.41-2.el7 base 31 k
net-snmp-libs x86_64 1:5.7.2-24.el7 base 747 k
php x86_64 5.4.16-36.el7_1 base 1.4 M
php-bcmath x86_64 5.4.16-36.el7_1 base 56 k
php-cli x86_64 5.4.16-36.el7_1 base 2.7 M
php-common x86_64 5.4.16-36.el7_1 base 563 k
php-gd x86_64 5.4.16-36.el7_1 base 126 k
php-ldap x86_64 5.4.16-36.el7_1 base 51 k
php-mbstring x86_64 5.4.16-36.el7_1 base 503 k
php-mysql x86_64 5.4.16-36.el7_1 base 99 k
php-pdo x86_64 5.4.16-36.el7_1 base 97 k
php-xml x86_64 5.4.16-36.el7_1 base 124 k
t1lib x86_64 5.1.2-14.el7 base 166 k
unixODBC x86_64 2.3.1-11.el7 base 413 k
zabbix-web noarch 3.0.1-1.el7 zabbix 3.3 M

Transaction Summary
===============================================================================
Install 2 Packages (+25 Dependent packages)
2.クライアントのインストール
#sudo yum install zabbix-agent
3.MySQLのインストール
# rpm -ivh mysql-community-release-el7-5.noarch.rpm

#yum repolist enabled | grep “mysql.*-community.*"

# sudo yum install mysql-community-server

#sudo systemctl enable mysqld #自動起動

#systemctl start mysqld #起動

MySQLのパスワードを設定
#sudo mysql_secure_installation
mysql> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)

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

mysql> quit
Bye
4.zabbix server起動
# vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

#sudo systemctl start zabbix-server #起動

#sudo systemctl enable zabbix-server
Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-server.service to /usr/lib/systemd/system/zabbix-server.service.
5.phpの設定
sudo vim /etc/httpd/conf.d/zabbix.conf

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

apacheが起動
#sudo systemctl start httpd
#sudo systemctl enable httpd

6.zabbix確認
http://xxx/zabbix/

Linux

Posted by arkgame