Build a Zabbix 3.0.3 Monitoring System in CentOS 6.8

Source: Internet
Author: User

Build a Zabbix 3.0.3 Monitoring System in CentOS 6.8

System Environment: CentOS 6.8, LNMP, zabbix 3.0.3
I. Preface
Zabbix is an enterprise-class, open-source, distributed monitoring suite that monitors Linux, Windows, and exchange routing devices. It has become the most popular monitoring system. This Zabbix deployment is based on the LNMP environment of the previous article, and some preliminary preparations are related to the original LNMP.

For the LNMP environment, see :.

Ii. Preparations
1. Install dependency packages
Yum install net-snmp-devel

2. mysql. sock soft connection (zabbix is/tmp/mysql. sock by default)
Ln-s/data/mysqldb/mysql. sock/tmp/mysql. sock

3. PHP parameter configuration
Vim/etc/php. ini
Max_execution_time= 300
Max_input_time= 300
Post_max_size = 16 M
Upload_max_filesize = 2 M
Date. timezone = PRC
Always_populate_raw_post_data =-1

4. added the gettext module in PHP (gettext check is one of the items during zabbix installation, which is omitted during php installation in the early stage. You can add -- with-gettext when installing php)
Cd/usr/local/src/php-5.6.17/ext/gettext/
/Usr/local/php/bin/phpize
./Configure -- with-php-config =/usr/local/php/bin/php-config
Make & make install

Vim/etc/php. ini
Extension =/usr/local/php/lib/php/extensions/no-debug-zts-20131226/gettext. so

3. Compile and install zabbix
1. Add zabbix users
Groupadd zabbix
Useradd-g zabbix

2. Compile and install zabbix

Tar xf zabbix-3.0.3.tar.gz
Cd zabbix-3.0.3
./Configure -- prefix =/usr/local/zabbix/-- sysconfdir =/etc/zabbix/-- enable-server
-- Enable-agent -- with-mysql -- enable-ipv6 -- with-net-snmp
-- With-libcurl -- with-libxml2
Make & makeinstall

3. initialize database files
Mysql-uroot-p
Create databasezabbix;
Mysql-uroot-p '******* 'zabbix <database/mysql/schema. SQL
Mysql-uroot-p '******** 'zabbix <database/mysql/images. SQL
Mysql-uroot-p '******* 'zabbix <database/mysql/data. SQL

4. Configure the zabbix_server configuration file
Vim/etc/zabbix/zabbix_server.conf
DBName = zabbix
DBUser = root
DBPassword = password
DBPort = 3306

5. Add the zabbix command to bash
Vim/etc/profile. d/zabbix. sh
PATH =/usr/local/zabbix/sbin/: $ PATH
Export PATH
Source/etc/profile. d/zabbix. sh

6. Start the zabbix service.
Zabbix_server-c/etc/zabbix/zabbix_server.conf
Zabbix_agentd-c/etc/zabbix/zabbix_agentd.conf

7. Check that the zaibbix service is started normally. (If any problem occurs, go to/tmp/zabbix_server.log,/tmp/zabbix_agentd.log to find the cause .)

Iv. zabbix website Configuration Management
1. Copy front-end files
Mkdir/data/zabbix
Cp-rp/usr/local/src/zabbix-3.0.3/frontends/php/*/data/zabbix/

2. Configure the nginx configuration file (you only need to change the web file path)
Location /{
Root/data/zabbix;
Index index.html index. php index.htm;
}
Location ~ \. Php $ {
Root/data/zabbix;
Fastcgi_pass 127.0.0.1: 9000;
Fastcgi_index index. php;
Fastcgi_param SCRIPT_FILENAME $ document_root $ fastcgi_script_name;
Include fastcgi_params;
}

3. Access url path http: // ip


4. When prompted, manually create and change the zabbix configuration file
Cd/data/zabbix/conf
Cp-rp zabbix. conf. php. example zabbix. conf. php
Vim zabbix. conf. php
$ DB ['type'] = 'mysql ';
$ DB ['server'] = 'localhost ';
$ DB ['Port'] = '123 ';
$ DB ['database'] = 'zabbix ';
$ DB ['user'] = 'root ';
$ DB ['Password'] = 'passwd ';

5. log on to the zabbix system and change it to Chinese (Default User name: Admin, password: zabbix)

V. Postscript
Zabbix is actually very easy to build, but this is just the beginning. There are a lot of monitoring options to be configured later. Don't look like monitoring items that come with scripts when building nagios, nginx in the future, memcache, mysql, and so on will be added to the monitoring.

Some Zabbix Tutorials:

Compile and install Zabbix2.4.5 source code in Ubuntu 14.04

Install and deploy the distributed monitoring system Zabbix 2.06

Install and deploy the distributed monitoring system Zabbix 2.06

Install and deploy Zabbix in CentOS 6.3

Zabbix distributed monitoring system practice

Under CentOS 6.3, Zabbix monitors apache server-status

Monitoring MySQL database Parameters Using Zabbix in CentOS 6.3

Install Zabbix 2.0.6 in 64-bit CentOS 6.2

ZABBIX details: click here
ZABBIX: click here

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.