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數(shù)據(jù)庫(kù)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 #主動(dòng)模式的server IP地址
systemctl start zabbix-agentsystemctl enable zabbix-agent
Zabbix監(jiān)控mysql
Zabbix搭建完成后zabbix默認(rèn)賬號(hào)是Admin 密碼是zabbix
###由于zabbix自帶有mysql模塊所以在一臺(tái)機(jī)子做即可
點(diǎn)擊
勾選mysql
Systemctl restart zabbix-agent