Compile and install Zabbix 3.0 and separate deployment configuration detailed

Source: Internet
Author: User
Tags ibm db2 snmp iweb

Experimental system: CentOS 6.6_x86_64

Lab Prerequisites: Prepare the build environment in advance, firewall and SELinux are off

Experiment Description: There are 4 hosts in this experiment, IP and role assignment such as topology

: mariadb software used in the test, http://pan.baidu.com/s/1bnnYiMr

Experimental topology:

    

First, the preparatory work

1. Modify the hostname and HOSTS file to the following table:

        

Description: MySQL is Zabbix data storage host, server is Zabbix Master Service host, the Web is Zabbix front-end display host, agent is monitored host. Typically these four roles can be built on the same host, which is deployed separately in this experiment.

2. Sync Time:

192.168. 70.21         // address Write your own time server

Second, install the MySQL server

1. Install MySQL on the mysql.jason.com host:

TarXF mariadb-10.0. --linux-x86_64.Tar. gz-c/usr/local/CD/usr/local/LN-SV mariadb-10.0. --linux-x86_64 Mysqluseradd-R MySQLmkdir-pv/mydata/DataChown-R mysql.mysql/mydata/data/CD MySQL/Chown-R root.mysql. Scripts/mysql_install_db--user=mysql--datadir=/mydata/data/CPsupport-files/my-large.cnf/etc/my.cnfCPsupport-files/mysql.server/etc/init.d/Mysqldchkconfig--add Mysqldchkconfig mysqld on

2. Edit the configuration file and start:

vim/etc/my.cnf----------------------------------------------->=/mydata/data            //  Add this line <-----------------------------------------------service mysqld start

3. Create a Zabbix database and an authorized user:

/usr/local/mysql/bin/MySQL------------------------------------>CREATE DATABASE Zabbix; GRANT all on Zabbix.* To'Zabbix'@'192.168.19.%'Identified by'123456'; GRANT all on Zabbix.* To'Zabbix'@'localhost'Identified by'123456'; GRANT all on Zabbix.* To'Zabbix'@'mysql.jason.com'Identified by'123456'; FLUSH privileges;

4. Import the database file:

wget http://iweb.dl.sourceforge.net/project/zabbix/zabbix%20latest%20development/ 3.0.0alpha2/zabbix-3.0.0alpha2.tar.gztar XF zabbix-3.0. 0alpha2. Tar . GZCD Zabbix-3.0. 0alpha2/database/mysql//usr/local/mysql/bin/mysql-uzabbix-p123456 Zabbix < Schema.sql           // Import order cannot be wrong   /usr/local/mysql/bin/mysql-uzabbix-p123456 Zabbix < images.sql/usr/local/mysql/bin/mysql-uzabbix- p123456 Zabbix < Data.sql

Third, install Zabbix-server server

1. Compile the installation Zabbix on the server.jason.com host:

Yum-YInstallMysql-devel Libxml2-devel Net-snmp-devel libcurl-develwgethttp//iweb.dl.sourceforge.net/project/zabbix/zabbix%20latest%20development/3.0.0alpha2/zabbix-3.0.0alpha2.tar.gz TarXF zabbix-3.0.0alpha2.Tar. GZCD Zabbix-3.0. 0alpha2groupadd Zabbixuseradd-g Zabbix Zabbix./configure--prefix=/usr/local/zabbix-server--enable-server--with-mysql--with-net-snmp--with-libcurl--with-LIBXML2 Make Install

2. Edit the configuration file and start:

Mkdir/var/log/zabbix
Chown-r Zabbix:zabbix/var/log/zabbix
vim/usr/local/zabbix-server/etc/zabbix_server.conf--------------------------------------------------- ---------->logfile=/var/log/zabbix/zabbix_server.logdbhost=192.168. 19.66 Dbname=zabbixdbuser=zabbixdbpassword=123456listenip=127.0.0.1,192.168. 19.74
<-------------------------------------------------------------
/usr/local/zabbix-server/sbin/zabbix_server-c/usr/local/zabbix-server/etc/zabbix_server.conf Start the service

To view the port, the listener has started:

    

Iv. installation of Zabbix-web server

1. Install httpd and PHP on the web.jason.com host:

Yum install httpd php php-mysql libxpm php-bcmath php-gd php-mbstring php-xml t1lib mkdir/var/www /html/Zabbix
wget http://iweb.dl.sourceforge.net/project/zabbix/zabbix%20latest%20development/3.0.0alpha2/ Zabbix-3.0.0alpha2.tar.gz
Tar xf zabbix-3.0.0alpha2. Tar. gzcd Zabbix-3.0. 0alpha2/frontends/php/CP -A. /var/www/html/zabbix/

2. Configure PHP and start httpd:

vim/etc/php.ini----------------------------------------->date.timezone = Asia/shanghai
Post_max_size = 16M
Max_execution_time = 300
Max_input_time = 300
----------------------------------------->
Service httpd Start

Access Http://192.168.19.76/zabbix with a browser and follow the prompts to install:

    

    

The permission error appears here, download the configuration file and save it to the/var/www/html/zabbix/conf/zabbix.conf.php file. If also reported is wrong after manually writing to the configuration file, it can be ignored, the browser will be closed and the connection can be reopened. Login account Admin, login password Zabbix:

    

vim/var/www/html/zabbix/conf/zabbix.conf.php // manual Write configuration  ----------------------------------------------------------><?PHP//Zabbix GUI configuration file.global $DB; $DB ['TYPE']     ='MYSQL'; $DB ['SERVER']   ='192.168.19.66'; $DB ['PORT']     ='0'; $DB ['DATABASE'] ='Zabbix'; $DB ['USER']     ='Zabbix'; $DB ['PASSWORD'] ='123456';//Schema name. Used for IBM DB2 and PostgreSQL.$DB ['SCHEMA'] ="'; $ZBX _server='192.168.19.74'; $ZBX _server_port='10051'; $ZBX _server_name="'; $IMAGE _format_default=image_format_png;?>

    

V. Installation of Zabbix-agent end

1. Install on the agent.jason.com host:

wget http://iweb.dl.sourceforge.net/project/zabbix/zabbix%20latest%20development/ 3.0.0alpha2/zabbix-3.0.0alpha2.tar.gztar XF zabbix-3.0. 0alpha2. Tar . GZ CD Zabbix-3.0. 0alpha2groupadd Zabbix-G zabbix-agent zabbix-agent. /configure--prefix=/usr/local/zabbix-agent--enable-agentmakeinstall

2. Edit the configuration file:

mkdir/var/log/ZabbixChown-R zabbix-agent:zabbix-agent/var/log/zabbix/Vim/usr/local/zabbix-agent/etc/zabbix_agentd.conf------------------------------------------------------------>LogFile=/var/log/zabbix/Zabbix_agentd.logserver=192.168.19.74serveractive=192.168.19.74Hostname=Agent.jason.comUser=zabbix-Agent<------------------------------------------------------------
/usr/local/zabbix-agent/sbin/zabbix_agentd-c/usr/local/zabbix-agent/etc/zabbix_agentd.conf

Vi. Adding hosts

Here I'm going to show you a little bit about the process, which may not be detailed:

    

    

    

    

    

At this point, the presentation process is all over, thank you for watching! If you have any questions, please contact qq:82800452.

Compile and install Zabbix 3.0 and separate deployment configuration detailed

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.