完全に自分用のメモです。
SELinux
# getenforce # vi /etc/selinux/config
以下の通り編集
#SELINUX=enforcing SELINUX=disabled
初期設定
# hostnamectl set-hostname zbx.linode.example.com # yum -y update # reboot # yum -y install epel-release # yum -y install httpd-devel php php-devel php-pdo php-mysqlnd php-mbstring php-mcrypt php-gd php-pear php-pecl-apc-devel zlib-devel mariadb-devel mariadb-server
Install Zabbix(1)
# rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm # yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-web-japanese # yum -y install zabbix-agent
MariaDB
# systemctl start mariadb # systemctl enable mariadb # mysql -u root
MariaDBのコマンド
create database zabbix character set utf8 collate utf8_bin; grant all on zabbix.* to zabbix@localhost identified by 'new-password'; UPDATE mysql.user SET Password=PASSWORD('new-password') WHERE User='root'; FLUSH PRIVILEGES; quit;
Install Zabbix(2)
# cd /usr/share/doc/zabbix-server-mysql-3.4.15/ # zcat create.sql.gz | mysql -u zabbix -p new-password
# vi /etc/zabbix/zabbix_server.conf
以下の通り編集
# DBPassword= ↓ DBPassword=new-password
# vi /etc/httpd/conf.d/zabbix.conf
以下の通り編集
# php_value date.timezone Europe/Riga ↓ php_value date.timezone Asia/Tokyo
Start Zabbix
# systemctl start zabbix-server # systemctl enable zabbix-server # systemctl start httpd # systemctl enable httpd
起動確認
zabbix-serverが起動しているか確認
# systemctl status zabbix-server
Firewalld
# firewall-cmd --add-service=http --zone=public --permanent # firewall-cmd --reload