1 Zabbix Study 1.1 Zabbix安装部署 |
1.1.1 (Centos 7)Zabbix安装初始化 |
1.1.2 (docker)+Zabbix安装部署 |
1.2 Zabbix监控模式 |
1.2.1 主动模式 |
1.2.2 被动模式 |
1.3 Zabbix 使用邮件告警通知 |
1.4 zabbix对接grafana可视化页面 |
首先你得配置好MySQL5.7
安装MySQL5.7二进制包
安装顺序依次进行
rpm -e --nodeps mariadb-libs
rpm -ivh mysql-community-common... rpm -ivh mysql-community-libs... rpm -ivh mysql-community-client... rpm -ivh mysql-community-server... rpm -ivh mysql-community-libs-compat...
安装完成后,初始化MySQL数据库 仅供参考! vim /etc/my.cnf cat /var/log/mysqld.log | grep root
参考密码 ! mysql -uroot -p
alter user 'root'@'localhost' identified by 'Chenghao_123'; flush privileges;
注意后面配置需要一一对应 ! create database zabbix character set utf8 collate utf8_bin; grant all privileged on zabbix.* to 'zabbix'@'localhost' identified by 'Chenghao_123'; flush privileges;
2,Zabbix 安装初始化配置 以下链接已过期,请参考官网文档配置 https://www.zabbix.com/download rpm -Uvh https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-2.el7.noarch.rpm (已过期,4.0版本官方已停止维护)
yum -y install zabbix-server-mysql zabbix-proxy-mysql zabbix-web-mysql zabbix-agent
导入Zabbix数据表结构 zcat /usr/share/doc/zabbix-server-mysql-4.0.32/create.sql.gz | mysql -uzabbix -pChenghao_123 zabbix
修改zabbix配置文件 主要是修改以下配置文件 vim /etc/zabbix/zabbix_server.conf DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=Chenghao_123
修改前端时区 vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
注意一下防火墙 ! iptables -F setenforce 0
systemctl start zabbix-server.service systemctl start httpd
netstat -nlpt
若出现问题了,注意一下防火墙,或者重启一下服务! systemctl restart zabbix-server.service systemctl restart httpd
默认初始化账号 Admin 密码zabbix
|