zabbix服务端安装
安装完毕mysql-5.6、php5.6
mysql-5.6安装:https://www.cnblogs.com/xzlive/p/9771642.html
创建zabbix 用户
# groupadd zabbix# useradd -g zabbix zabbix
1.1 下载安装zabbix所有版本下载地址:http://www.zabbix.com/download.php
# yum install net-snmp-devel libxml2-devel libcurl-devel // 一定先安装依赖# cd /usr/local/src# rpm -i https://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm# wget http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-server-mysql-3.0.9-1.el7.x86_64.rpm# wget http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-agent-3.0.9-1.el7.x86_64.rpm# wget http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-web-mysql-3.0.9-1.el7.noarch.rpm# wget http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-web-3.0.9-1.el7.noarch.rpm
1.2 安装Zabbix server, frontend, agent
#yum install zabbix-web-mysql-3.0.9-1.el7.noarch.rpm zabbix-web-3.0.9-1.el7.noarch.rpm#yum install zabbix-server-mysql-3.0.9-1.el7.x86_64.rpm zabbix-agent-3.0.9-1.el7.x86_64.rpm
1.3 创建数据库
# mysql -uroot -ppasswordmysql> create database zabbix character set utf8 collate utf8_bin;mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';mysql> quit;
1.4 导入数据库数据
# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
1.5 配置zabbix server的配置文件
#vi /etc/zabbix/zabbix_server.confDBPassword=password
1.6 配置php和zabbix frontend
#vi /etc/httpd/conf.d/zabbix.conf#php_value timezone Asia/Shanghai#vi /etc/php.ini#date.timezone = Asia/Shanghai
1.7 启动服务并设置开机自动启动
# systemctl restart zabbix-server zabbix-agent httpd# systemctl enable zabbix-server zabbix-agent httpd