CentOS6.5 Compile and install zabbix3.0.5, compile and install Zabbix_agent client

Source: Internet
Author: User
Tags snmp

1. Environment Preparation:
CentOS6.5 Current address is 192.168.137.30
Set the lamp environment, yum installation method is also possible, but zabbix3.0 required to provide more than PHP5.5 version.
Here you can view this article: compiling and installing the lamp environment
There is also a need to recompile the PHP5.5, mainly providing the last three parameters.
#编译前先安装如下开发组件

# yum groupinstall  "Development tools"   "Server platform development" #  yum install -y curl-devel mysql-devel net-snmp-devel # #编译zabbix是需要提供的3个包 #  yum -y install libjpeg-devel libpng-devel freetype-devel  # #PHP编译需要这3个包 #  tar zxf php-5.5.38.tar.gz# cd php-5.5.38# ./configure --prefix=/usr/local/ Php --with-mysql=/usr/local/mysql --with-openssl --with-mysqli=/usr/local/mysql/bin/mysql_ config --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir -- with-zlib --with-libxml-dir=/usr --enable-xml  --enable-sockets --with-apxs2=/usr/ local/apache/bin/apxs --with-mcrypt  --with-config-file-path=/etc -- With-config-file-scan-dir=/etc/php.d --with-bz2  --enable-maintainer-zts --enable-bcmath  --with-gd  --with-gettext###--enable-bcmath --with-gd  --with-gettext  need to add these items, otherwise can not meet the zabbix3.0 minimum demand. # make && make install # cp php.ini-production /etc/php.ini

# #配置PHP参数 to meet zabbix_server minimum configuration requirements.

# vim/etc/php.inidate.timezone = Asia/shanghai # #时区max_execution_time = 300post_max_size = 16mmax_input_time = 300mbstri Ng.func_overload = 0


2. Compile and install zabbix3.0

Download zabbix3.0.5
Official: Http://www.zabbix.com/download

1) Create System Group, User:

# groupadd-g 201 zabbix# useradd-g zabbix-u 201-s/sbin/nologin Zabbix

2) Compile and install

# tar zxf zabbix-3.0.5.tar.gz# cd zabbix-3.0.5#./configure--prefix=/usr/local/zabbix--enable-server--enable-proxy-- Enable-agent--with-mysql=/usr/bin/mysql_config--with-net-snmp--with-libcurl# make && make install

3) Create Zabbix database and related tables

# # Login Database # CREATE DATABASE Zabbix default CharSet utf8;# grant all on zabbix.* to [e-mail protected] identified by ' Zabbix '; # #导入zabbix的表数据结构 # Mysql-uzabbix-pzabbix zabbix<./database/mysql/schema.sql# Mysql-uzabbix-pzabbix zabbix<./ database/mysql/images.sql# Mysql-uzabbix-pzabbix Zabbix<./database/mysql/data.sql

4) Link Zabbix configuration file

# mkdir/var/log/zabbix# Chown zabbix.zabbix/var/log/zabbix# ln-s/usr/local/zabbix/etc//etc/zabbix# ln-s/usr/local/z abbix/bin/*/usr/bin/# ln-s/usr/local/zabbix/sbin/*/usr/sbin/# cp-a/root/zabbix-3.0.5/misc/init.d/fedora/core/ zabbix_*/etc/init.d# chmod 755/etc/init.d/zabbix_*

5) Modify the Zabbix configuration file

#修改 Zabbix_server and Zabbix_agentd startup files in the/ETC/INIT.D directory

# vim/etc/init.d/zabbix_server basedir=/usr/local/zabbix# Vim/etc/init.d/zabbix_agentd BASEDIR=/usr/local/zabbix## You can also use SED to replace # sed-i "[email protected]=/usr/[email protected]=/usr/local/[email protected]"/etc/init.d/zabbix_server# Sed-i "[Email protected]=/usr/[email protected]=/usr/local/[email protected]"/etc/init.d/zabbix_agentd

#修改zabbix主配置文件

# Vim/etc/zabbix/zabbix_server.confdbuser=zabbixdbpassword=zabbixdbpassword=zabbixdbsocket=/tmp/mysql.sock #去掉前面 ; On, not enabled by default

#修改zabbix_agentd. conf configuration file, 192.168.137.30 for Zabbix_server server.

# vim/etc/zabbix/zabbix_agentd.conflogfile=/var/log/zabbix/zabbix_agentd.logserver= 127.0.0.1,192.168.137.30serveractive=192.168.137.30:10051 # #在主动模式下, Serveractive is a level two proxy server or server with a default port of 10051hostname= 192.168.137.30unsafeuserparameters=1 # #是否启用用户自定义监控脚本, 1 enabled, 0 not enabled

6) Copy the Zabbix installer to the Apache DocumentRoot directory. Set up self-booting and start the service

# cp-a ~/zabbix-3.0.5/frontends/php//usr/local/apache/htdocs/zabbix# chown-r Apache.apache/usr/local/apache/htdocs /zabbix# chkconfig zabbix_server on# chkconfig zabbix_agentd on# service zabbix_server startstarting zabbix_server: [OK] # service Zabbix_agentd startstarting zabbix_agentd: [OK]

#ss-listen started successfully

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/89/C1/wKioL1gb8tyCXxUcAABuuN8hDEU386.png "title=" Ss_ Listen.png "alt=" Wkiol1gb8tycxxucaabuun8hdeu386.png "/>

3, the next Web-side configuration Zabbix
Browser input: http://192.168.137.30/zabbix/setup.php
First step: Welcome interface Next Step

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/89/C1/wKioL1gb82WzEwdWAACJsY8HlrY711.png "title=" Setup1.png "style=" WIDTH:800PX;HEIGHT:374PX; "alt=" Wkiol1gb82wzewdwaacjsy8hlry711.png "width=" "vspace=" 0 " Border= "0" hspace= "0" height= "374"/>

The second step: Check the prerequisites, must be satisfied, otherwise you cannot next step

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/89/C4/wKiom1gb9M6BqlRYAACFNU31Rhk300.png "title=" Setup21.png "style=" width:750px;height:452px "alt=" Wkiom1gb9m6bqlryaacfnu31rhk300.png "width=" "vspace=" 0 " Border= "0" hspace= "0" height= "452"/>

Step Three: Configure the database, enter the password
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/89/C1/wKioL1gb9SbSdS-XAACcQE0M-Yw554.png "title=" Setup3.png "style=" WIDTH:800PX;HEIGHT:354PX; "alt=" Wkiol1gb9sbsds-xaaccqe0m-yw554.png "width=" "vspace=" 0 " Border= "0" hspace= "0" height= "354"/> Fourth step: Enter HOST/IP, Name
650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M00/89/C1/wKioL1gb9YrRzgHbAABbJi0ip2k550.png "title=" Setup4.png "style=" width:750px;height:446px "alt=" Wkiol1gb9yrrzghbaabbji0ip2k550.png "width=" "vspace=" 0 " Border= "0" hspace= "0" height= "446"/> Fifth Step: Display installation Information
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/89/C1/wKioL1gb9fKwq59fAABsSACJwew566.png "title=" Setup5.png "style=" width:750px;height:446px "alt=" Wkiol1gb9fkwq59faabssacjwew566.png "width=" "vspace=" 0 " Border= "0" hspace= "0" height= "446"/> Sixth step: Download config file import to/usr/local/apache/htdocs/zabbix/conf/zabbix.conf.php
650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/89/C1/wKioL1gb9kmRzENMAABgeym8lI0401.png "title=" Setup6.png "style=" width:750px;height:441px "alt=" Wkiol1gb9kmrzenmaabgeym8li0401.png "width=" "vspace=" 0 " Border= "0" hspace= "0" height= "441"/> Seventh Step: Complete the installation
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/89/C1/wKioL1gb9obw6KasAABZ-dohjiI150.png "title=" Setup7.png "style=" width:750px;height:446px "alt=" Wkiol1gb9obw6kasaabz-dohjii150.png "width=" "vspace=" 0 " Border= "0" hspace= "0" height= "446"/>4, landing Zabbix Web side, default login account: Admin/zabbix
Login Address http://192.168.137.30/zabbix/index.php
First_page
650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/89/C1/wKioL1gb9s3QQvXyAADOr4uFm4I177.png "title=" Frist_ Page.png "style=" width:750px;height:349px "alt=" Wkiol1gb9s3qqvxyaador4ufm4i177.png "width=" vspace= "0" border= "0" hspace= "0" height= "349"/>

#注释, php gettest extension, recompile php plus parameters:--with-gettext

Chinese setting: Chinese_set

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/89/C4/wKiom1gb99OS_uvPAACOpmYKWL0165.png "title=" Chinese_set.png "style=" width:750px;height:330px "alt=" Wkiom1gb99os_uvpaacopmykwl0165.png "width=" "vspace=" 0 " Border= "0" hspace= "0" height= "/>"

Now that the Zabbix installation is over, take a look at the auto-discovered native

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/89/C1/wKioL1gb-HWyVXzKAADZIUAQIzo823.png "style=" width : 700px;height:598px; "title=" Server_agent1.png "alt=" Wkiol1gb-hwyvxzkaadziuaqizo823.png "width=" "vspace=" 0 " Border= "0" hspace= "0" height= "598"/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/89/C1/wKioL1gb-HaCJ18gAADadusk3bY167.png "style=" width : 750px;height:341px; "title=" Server_agent2.png "alt=" Wkiol1gb-hacj18gaadadusk3by167.png "width=" "vspace=" 0 " Border= "0" hspace= "0" height= "341"/>

ZABBIX_AGENT3.0 client-side compilation and installation, and device additions

http://ljohn.blog.51cto.com/11932290/1869264

This article is from the "Ljohn" blog, make sure to keep this source http://ljohn.blog.51cto.com/11932290/1869257

CentOS6.5 Compile and install zabbix3.0.5, compile and install Zabbix_agent client

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.