sed -i ‘s#repo.zabbix.com#mirrors.tuna.tsinghua.edu.cn\/zabbix#g‘ /etc/yum.repos.d/zabbix.repo
yum install zabbix-server-mysql zabbix-web-mysql
yum install -y mariadb-server -y
systemctl enable mariadb.service
systemctl start mariadb.service
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by "zabbix";
导入数据
gzip -d /usr/share/doc/zabbix-server-mysql-4.0.20/create.sql.gz
mysql -uzabbix -p123456 zabbix < /usr/share/doc/zabbix-server-mysql-4.0.20/create.sql
vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=Zabbix
DBUser=Zabbix
DBPassword=123456
启动服务
systemctl enable zabbix-server.service
systemctl start zabbix-server.service
配置zabbix-web
修改时区 vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
systemctl start httpd
systemctl enable httpd
默认用户名Admin 密码:zabbix
安装客户端
sed -i ‘s#repo.zabbix.com#mirrors.tuna.tsinghua.edu.cn\/zabbix#g‘ /etc/yum.repos.d/zabbix.repo
yum install zabbix-agent -y
systemctl enable zabbix-agent.service
vim /etc/zabbix/zabbix_agentd.conf
Server=127.0.0.1 #服务端
ServerActive=127.0.0.1 #服务端 ,主动模式监控
systemctl start zabbix-agent.service
systemctl enable zabbix-agent.service
原文:https://www.cnblogs.com/wangyong-blog/p/13677788.html