环境说明:
系统:centos7.6
软件: zabbix-server4.2
1.安装zabbix的yum源:
yum -y update
rpm -Uvh https://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-2.el7.noarch.rpm
yum clean all
2.软件安装:
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-get mariadb-*
3.启动mariadb并设置开机启动:
echo >/etc/my.cnf
systemctl start mariadb
systemctl enable mariadb
4.创建数据库并导入初始数据:
mysqladmin -uroot password 123
mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by ‘password’;
mysql> quit;
5.修改配置文件:
vim /etc/zabbix/zabbix_server.conf
DBPassword=password
vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Shanghai
6.启动服务并设置开机启动:
systemctl restart zabbix-server zabbix-agent httpd
systemctl enable zabbix-server zabbix-agent httpd
7.关闭防火墙:
setenforce 0
systemctl stop firewalld
systemctl disable firewalld
vim /etc/selinux/config
SELINUX=disable
8.浏览器访问:
ip/zabbix
9.进入zabbix:
只有以下两个图标识的地方需要注意配置,其他的地方一律点击下一步。
用户名:Admin 密码:zabbix