Download and install Zabbix
https://www.zabbix.com/download
安装
安装 mariadb
- yum install mariadb-server mariadb -y
- systemctl enable mariadb
- systemctl restart mariadb
安装 Zabbix3.4
- rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-1.el7.centos.noarch.rpm
- yum install zabbix-server-mysql zabbix-web-mysql -y
配置
创建数据库
- mysql
- MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
- Query OK, 1 row affected (0.00 sec)
- MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
- Query OK, 0 rows affected (0.08 sec)
- MariaDB [(none)]> exit
- Bye
导入数据库
zcat /usr/share/doc/zabbix-server-mysql-3.4.8/create.sql.gz |mysql -uzabbix -pzabbix zabb
注意:/usr/share/doc/zabbix-server-mysql-xxx 以实际安装的版本为准
配置数据库用户及密码
- vim /etc/zabbix/zabbix_server.conf
- 124 # Default:
- 125 DBPassword=zabbix
启动 zabbix server 并设置开机启动
- systemctl enable zabbix-server
- systemctl start zabbix-server
编辑 Zabbix 前端 PHP 配置, 更改时区
- vim /etc/httpd/conf.d/zabbix.conf
- php_value date.timezone Asia/Shanghai
启动 httpd 并设置开机启动
- systemctl enable httpd
- systemctl start httpd
安装 Zabbix Web
浏览器访问, 并进行安装
http://10.10.10.16/zabbix/
默认用户 Admin 默认密码 zabbix
zabbxi-agent 安装及配置
安装 zabbxi-agent
yum install zabbix-agent -y
配置 zabbxi-agent
vim /etc/zabbix/zabbix_agentd.conf
修改 IP 地址 server IP 地址
- 97 Server=10.10.10.16
- 138 ServerActive=10.10.10.16
启动 zabbxi-agent 并设置开机启动
systemctl enable zabbix-agent.service
systemctl restart zabbix-agent.service
来源: http://www.bubuko.com/infodetail-2589748.html