CentOS-7 Compiling and installing Zabbix-3.0

Source: Internet
Author: User
Tags ibm db2 snmp iweb

Compile and install Zabbix 3.0 install Zabbix-server Please prepare the LNMP or lamp environment, this article uses the LNMP environment

Download dependencies

Yum-y Install mysql-devel libxml2-devel net-snmp-devel libcurl-devel php-mysql libxpm php-bcmath php-gd php-mbstring php- XML t1lib

Download Zabbix Package

wget http://iweb.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Development/3.0.0alpha2/zabbix-3.0.0alpha2.tar.gz

Compiling Zabbix

Tar XF 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--enable-agentmake && make Install

Configure Zabbix

1. Create Zabbix User

Groupadd zabbixuseradd-g Zabbix Zabbix

2. Create databases and authorized users

 

Description

The data file import order cannot be changed, or you can import the data file using the MySQL command at the command line

3. Modify the configuration file and start

 

Description

Here and 2.x version of Zabbix a little change, 2.x Zabbix version need to add Zabbix port, and 3.0 do not need!

To view the port, the listener has started:


4. Configure Web Access

4.1. Copy Web files to nginx virtual directory

Mkdir/usr/local/nginx/html/zabbixcd zabbix-3.0.0alpha2/frontends/php/\cp-a. /usr/local/nginx/html/zabbix/

4.2. Modifying the php.ini configuration

Vim php.ini date.timezone = Asia/shanghai Post_max_size = 16M Max_execution_time = Max_input_time = 300

4.3. Restart the Nginx service and access the Web interface

/usr/local/nginx/sbin/nginx-s Reload

Browser Input IP address access

192.168.56.12/zabbix

You can see the following picture content that proves the installation is successful, the configuration is correct.

650) this.width=650; "src=" Http://ww4.sinaimg.cn/mw690/006qKA7kgw1f4go3kptjyj30mv0dhjsh.jpg "alt=" 1 "style=" margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px; padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px; border-left-width:0px; "/>

The value in must be OK to the next step!

650) this.width=650; "src=" Http://ww1.sinaimg.cn/mw690/006qKA7kgw1f4go642pe1j30mv0dhjtr.jpg "alt=" 2 "style=" margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px; padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px; border-left-width:0px; "/>

1. Verify that the php.ini file parameter has been modified correctly
2. Install PHP If you do not specify a php.ini file path, the default will be found in the/etc/directory, use Find to find out all php.ini files and then confirm which file is used

Fill in the database information 650) this.width=650; "src=" Http://ww3.sinaimg.cn/mw690/006qKA7kgw1f4go5h2dhkj30mw0dg0uu.jpg "alt=" 3 "style= "margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px; padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px; border-left-width:0px; "/>

Fill in Zabbix-server information 650) this.width=650; "src=" Http://ww2.sinaimg.cn/mw690/006qKA7kgw1f4go435nwlj30mx0ddmyl.jpg "alt = "4" style= "margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px ;p adding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px; border-left-width:0px; "/>

Final confirmation fill in information 650) this.width=650; "src=" Http://ww2.sinaimg.cn/mw690/006qKA7kgw1f4go5cyhpoj30my0deac4.jpg "alt=" 5 "style = "margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px; padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px; border-left-width:0px; "/>

Generate files according to filling information 650) this.width=650; "src=" Http://ww1.sinaimg.cn/mw690/006qKA7kgw1f4go5nrgocj30mw0dcwg0.jpg "alt=" 6 " Style= "margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px; padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px; border-left-width:0px; "/>

No, it's okay. Click the link to download the file to the specified path or add it manually.

Follow the prompts to download the connection file to the specified path or manually write the file

vim/usr/local/nginx/html/zabbix/conf/zabbix.conf.php

<?php//Zabbix GUI configuration File.global $DB; $DB [' TYPE '] = ' MYSQL '; $DB [' SERVER '] = ' 192.168.56.12 '; $DB [' PORT ' ] = ' 3306 '; $DB [' DATABASE '] = ' Zabbix '; $DB [' USER '] = ' Zabbix '; $DB [' PASSWORD '] = ' 123456 ';//Schema name. Used for IBM DB2 and PostgreSQL. $DB [' SCHEMA '] = '; $ZBX _server = ' localhost '; $ZBX _server_port = ' 10051 '; $ZBX _server_n AME = "; $IMAGE _format_default = Image_format_png;? >

After you have modified, refresh appears.

650) this.width=650; "Src=" Http://cdn.xuliangwei.com/qiniu/455/image/7dd3ee39aa1d627e895b954f9d73f4be.png? imageview2/2/w/756/h/455 "alt=" 7 "style=" margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px; Padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width : 0px;border-bottom-width:0px;border-left-width:0px; "/>

Main Page after sign-in

650) this.width=650; "src=" Http://ww2.sinaimg.cn/mw690/006qKA7kgw1f4go3pbmczj311g0fzjvp.jpg "alt=" 8 "style=" margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px; padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px; border-left-width:0px; "/>

Enter user name/password login
The default user name password is: Admin Zabbix

650) this.width=650; "src=" Http://ww3.sinaimg.cn/mw690/006qKA7kgw1f4go3t7btgj30gd0f6aax.jpg "alt=" 8 "style=" margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px; padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px; border-left-width:0px; "/>

Installing Zabbix-agent

Zabbix-agent installation process is not very different from zabbix-server.

Download the Zabbix package and install

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-agentuseradd-g Zabbix-agent zabbix-agent./configure--prefix=/usr/local/zabbix-agent--enable-agentmake && make install

Configure Zabbix-agent

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.log server=192.168.56.12 serveractive=192.168.56.12 Hostname= Linux-node1 user=zabbix-agent

Start Zabbix-agent

/usr/local/zabbix-agent/sbin/zabbix_agent

Configuration is complete, you can add a host to the Web interface!

add a host

650) this.width=650; "src=" Http://ww3.sinaimg.cn/mw690/006qKA7kgw1f4go5qd6cmj30iz04a74y.jpg "alt=" 1 "style=" margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px; padding-bottom:0px;padding-left:0px;border-top-width:0px;border-right-width:0px;border-bottom-width:0px; border-left-width:0px; "/>650" this.width=650; "src=" http://ww4.sinaimg.cn/mw690/ 006qka7kgw1f4go3z9ix4j30r30f10uz.jpg "alt=" 2 "style=" margin-top:0px;margin-right:0px;margin-bottom:0px; margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;border-top-width:0px; border-right-width:0px;border-bottom-width:0px;border-left-width:0px; "/>650) this.width=650;" src= "http:// Ww2.sinaimg.cn/mw690/006qka7kgw1f4go5k1hk5j30zn08atas.jpg "alt=" 3 "style=" margin-top:0px;margin-right:0px; margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px; Border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px; "/>


This article is from the "Cloudy Circle Missing" blog, please be sure to keep this source http://gouliang.blog.51cto.com/10735353/1785586

CentOS-7 Compiling and installing Zabbix-3.0

Related Article

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.