环境:
- [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;
- grant all privileges on zabbix.* to zabbix@localhost identified by zabbix;
- 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
来源: http://www.bubuko.com/infodetail-2528757.html