zabbix监控安装:

我的操作系统是centos 6.8 x86_64

zabbix软件版本:2.4


zabbix官网是www.zabbix.com,建议大家多看官方文档进行学习

zabbix的安装有源码安装和yum安装,建议大家的server端用源码的方式安装


今天主要说一下yum的安装方法:

  1. 打开官网www.zabbix.com,找到download然后zabbix packages里面找到对应你系统的版本

    找到: zabbix-release-2.4-1.el6.noarch.rpm 复制它的链接


2.安装rpm包yum源

    rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm


3.开始安装

 

yum install zabbix-server-mysql zabbix-web-mysql

yum install zabbix-agent


4.安装lamp环境:

其实在第三步的时候有的包已经安装好,我们只要安装一个mysql-server即可。

你也可以自行在安装一下:

yum install httpd mysql mysql-libs php php-mysql mysql-server php-bcmath php-gd php-mbstring

启动mysql.http服务

/etc/init.d/httpd start

/etc/init.d/mysqld start



5.创建数据库

shell > mysql

mysql > create database zabbix character set utf8 collate utf8_bin;

mysql > grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';

mysql > quit

倒入三个表:一定要按顺序

cd /usr/share/doc/zabbix-server-mysql-2.4.8/create/

ls

mysql -uroot zabbix < schema.sql 

mysql -uroot zabbix < p_w_picpaths.sql 

mysql -uroot zabbix < data.sql



6.修改zabbix-server 配置文件:


vim /etc/zabbix/zabbix_server.conf

DBHost=localhost

DBName=zabbix

DBUser=zabbix

DBPassword=zabbix


7.启动服务:

/etc/init.d/zabbix-server start

/etc/init.d/zabbix-agent start


8.更改配置文件:


vim /etc/httpd/conf.d/zabbix.conf


php_value max_execution_time 300

php_value memory_limit 128M

php_value post_max_size 16M

php_value upload_max_filesize 2M

php_value max_input_time 300

# php_value date.timezone Europe/Riga


/etc/init.d/httpd restart


9.web下安装


192.168.141.188/zabbix


wKiom1jc5T_gJ0D4AAHVGGL4Ce8537.png-wh_50

wKioL1jc5UDCg6ZtAAGZguz6vHk040.png-wh_50

wKiom1jc5UGD5xj1AAF_fLe0J58540.png-wh_50

wKioL1jc5ULTn3PNAAEsArh02pA056.png-wh_50

wKioL1jc5USRyFHYAAEDACB0rYw453.png-wh_50

wKiom1jc5UaRAQIMAAFdcidSGXM505.png-wh_50

wKiom1jc5UfSh2JdAAFbmABTtbY317.png-wh_50