Zabbix安装
1、配置YUM源wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
2、wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
3、rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
Yum clean allYum makecache2、安装zabbix、初始化mysql、zabbix数据库yum install zabbix-server-mysql zabbix-web-mysql mariadb-server zabbix-agent -y
systemctl start mariadbsystemctl enable mariadb
mysql_secure_installation
create database zabbix character set utf8 collate utf8_bin;grant all privileges on zabbix.* to zabbix@localhost identified by '123456';
zcat /usr/share/doc/zabbix-server-mysql-4.0.4/create.sql.gz|mysql -uzabbix -p123456 zabbix3、配置zabbix
vim /etc/httpd/conf.d/zabbix.confphp_value date.timezone Asia/Shanghai
systemctl start httpdsystemctl enable httpd
vim /etc/zabbix/zabbix_server.conf
DBPassword=123456
systemctl start zabbix-serversystemctl enable zabbix-server
vim /etc/zabbix/zabbix_agentd.conf
Server=192.168.100.110ServerActive=192.168.100.110 #主动模式的server IP地址
systemctl start zabbix-agentsystemctl enable zabbix-agent
Zabbix监控mysql
Zabbix搭建完成后zabbix默认账号是Admin 密码是zabbix
###由于zabbix自带有mysql模块所以在一台机子做即可
点击
勾选mysql
Systemctl restart zabbix-agent