准备环境
OS:Centos7机器
安装步骤
先关闭selinux跟iptables
systemctl stop firewalld.service
setenforce 0
安装zabbix rpm包仓库
路径: rpm -vhi http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm
yum安装zabbix
yum -y install mariadb mariadb-server zabbix-server-mysql zabbix-web-mysql zabbix-agent
启动maridb
systemctl start mariadb
进入到mariadb
mysql
创建数据库:
create database zabbix character set utf8 collate utf8_bin;
创建本地用户:
grant all on *.* to 'tom'@'localhost' identified by '123';
刷新数据库权限:
flush privileges;
退出 :
q
导入数据表(注:这里是要写的)
zcat /usr/share/doc/zabbix-server-mysql-4.4.5/create.sql.gz | mysql -uroot -p zabbix
修改zabbix_server.conf:
vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=tom
DBPassword=123
修改/etc/httpd/conf.d/zabbix.conf文件时间戳:
vim /etc/httpd/conf.d/zabbix.conf
# php_value date.timezone Europe/Riga(修改这一行)
php_value date.timezone Asia/Shanghai(修改后的)
重新启动服务
systemctl restart zabbix-server zabbix-agent httpd
进入页面
http://本机IP/zabbix