1.安装好httpd和php
Zabbix 3需要PHP是至少5.4或更高版本
rpm -ivh http://repo.webtatic.com/yum/el6/latest.rpm yum -y install httpd php56w php56w-gd php56w-mysql php56w-bcmath php56w-mbstring php56w-xml php56w-ldap 修改php配置/etc/php.ini post_max_size = 16M max_execution_time = 300 max_input_time = 300 date.timezone = Asia/Shanghai always_populate_raw_post_data = -1
2.安装好MySQL数据库
可以使用默认的yum安装MySQL5.1,也可以使用下面的MySQL源安装MySQL5.6
rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpm
yum install -y mysql-server
2.1创建好zabbix库并授权
create database zabbix character set utf8 collate utf8_bin; grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
3.下载zabbix3.2.6 RPM包
地址:http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/deprecated/ yum install -y zabbix-server-mysql-3.2.6-1.el6.x86_64.rpm zabbix-web-mysql-3.2.6-1.el6.noarch.rpm zabbix-web-3.2.6-1.el6.noarch.rpm
3.1安装zabbix的yum源
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/zabbix-release-3.2-1.el6.noarch.rpm
4.导入数据到MySQL
cd /usr/share/doc/zabbix-server-mysql-3.2.6/ zcat create.sql.gz | mysql zabbix
5.修改/etc/zabbix/zabbix_server.conf
DBHost= DBName= DBUser= DBPassword=
6.启动zabbix-server服务
/etc/init.d/zabbix-server start
7.配置zabbix WEB
cd /var/www/html/ ln -s /usr/share/zabbix zabbix
chown apache.apache /etc/zabbix/web/ #登录 http://IP/zabbix