1、关闭防火墙,安装zabbix的官方源 (可在repo.zabbix.com里自行选择)
systemctl stop firewalld
setenforce 0
rpm -ivh http://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm (这里是用centos7)
2、安装相关组件并设置开机自启 启动数据库
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb mariadb-server
systemctl start mariadb
3、给zabbix创建数据库并授权用户
create database zabbix charset utf8;
grant all on zabbix.* to 'tom'@'localhost' identified by '123';
flush privileges;
4、导入数据
zcat create.sql.gz | mysql -utom -p123 zabbix
5、修改时区和zabbix-server配置文件
vim /etc/httpd/conf.d/zabbix.conf
vim /etc/zabbix/zabbix_server.conf
6、启动所有服务
systemctl start httpd zabbix-server zabbix-agent
7、浏览器访问 localhost/zabbix