1.准备环境: centos7 两台 192.168.232.135 zabbix-server端 192.168.232.136 zabbix-agent端 2.关闭防火墙:
[root@localhost ~]# systemctl stop firewalld [root@localhost ~]# setenforce 03.时间同步:
[root@localhost ~]# yum -y install ntpdate [root@localhost ~]# ntpdate pool.ntp.org4.上传zabbix.repo yum 源到/etc/yum.repos.d/ 5.安装zabbix 相关组件
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb mariadb-server6.开启数据库
systemctl start mariadb7.创建zabbix库
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;8.创建授权用户zabbix
MariaDB [(none)]> grant all on zabbix.* to zabbix@localhost identified by 'zabbix';9.刷新授权表
MariaDB [(none)]>flush privileges;10.导入zabbix 初始数据库
zcat /usr/share/doc/zabbix-server-mysql-4.4.10/create.sql.gz |mysql -uzabbix -pzabbix zabbix11.编辑zabbix-server 配置文件
[root@localhost ~]# vim /etc/zabbix/zabbix_server.conf12开启httpd zabbix-server zabbix-agent
systemctl start httpd zabbix-server zabbix-agent验证:
vim /etc/zabbix/zabbix_server.conf13. 修改时区:
vim /etc/php.ini13.1.重启httpd
[root@localhost ~]# systemctl restart httpd14.修改中文乱码问题 上传 simkai.ttf文件到/usr/share/zabbix/assets/fonts/
cd /usr/share/zabbix/assets/fonts/ rm -rf graphfont.ttf mv simkai.ttf graphfont.ttf15.浏览器访问: http://192.168.232.135/zabbix
16.默认登录账户密码: 账号:Admin 密码 :zabbix
17.安装zabbix-agent端
yum -y install zabbix-agent18.修改配置文件:
vim /etc/zabbix/zabbix_agentd.conf
19.开启zabbix-agent
systemctl start zabbix-agent验证:、
netstat -nltp | grep 10050