CentOS7安裝Zabbix3
[root@fitme ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[root@fitme ~]# uname -r
3.10.0-514.21.1.el7.x86_64
[root@fitme ~]# hostname -I
10.0.0.61 172.16.1.61
[root@fitme ~]# getenforce
Disabled
[root@fitme ~]# systemctl status firewalld.service
● firewalld.service - firewalld - dynamic firewall daemon
安裝Zabbix官方源
rpm -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
安裝zabbix,httpd,php
yum install zabbix-server-mysql zabbix-web-mysql
安裝數據庫 mariadb
yum -y install mariadb-server
systemctl start mariadb.service
進入數據庫創建表,創建用戶及授權
mysql
create database zabbix character set utf8 collate utf8_bin;
exit
導入表到zabbix數據庫
zcat /usr/share/doc/zabbix-server-mysql-3.0.13/create.sql.gz|mysql -uzabbix -pzabbix zabbix
更改數據庫密碼為zabbix,及添加php配置文件時區為亞洲上海
sed -i.bak ‘115a DBPassword=zabbix‘ /etc/zabbix/zabbix_server.conf
sed -i.bak ‘18a php_value date.timezone Asia/Shanghai‘ /etc/httpd/conf.d/zabbix.conf
啟動zabbix httpd,並設置開機自啟
systemctl start zabbix-server
systemctl start httpd
systemctl enable zabbix-server.service httpd.service mariadb.service
訪問如下地址,進入web界面配置zabbix
http://10.0.0.61/zabbix/
zabbix官方地址:https://www.zabbix.com/documentation/3.0/manual
zabbix官方中文3.4地址:https://www.zabbix.com/documentation/3.4/zh/manual
CentOS7安裝Zabbix3