- 安装zabbix yum源
- yum 安装
- yum install zabbix-agent zabbix-get zabbix-server-mysql zabbix-web zabbix-web-mysql
- 创建zabbix用户
- 连接数据库为zabbix创建库
- create database zabbix;
- grant all on zabbix.* to 'zabbix'@'127.0.0.1' identified by 'zabbix-pa';
- 导入数据
- /usr/share/doc/zabbix-server-mysql-4.0.3/create.sql.gz
gzip -d /usr/share/doc/zabbix-server-mysql-4.0.3/create.sql.gz |mysql -uroot -paminglinux zabbix
- 编辑zabbix_server.conf
- vi /etc/zabbix/zabbix_server.conf # 定义数据库相关的参数
systemctl start zabbix-server
systemctl enable zabbix-server
- 编辑zabbix_agent.conf
vi /etc/zabbix/zabbix_agentd.conf #定义Server=127.0.0.1和 ServerActive=127.0.0.1
systemctl start zabbix-agent
systemctl enable zabbix-agent
- httpd
- systemctl start httpd # 如果已经启动了nginx,需要先把nginx关闭,然后启动httpd
- webui配置
- http://ip/zabbix 访问,解决php的问题 (date.timezone Asia/Shanghai) /etc/php.ini默认密码 admin zabbix