centos6.5 compiling and installing zabbix3.0 and Chinese support organizing documents

Source: Internet
Author: User
Tags snmp

Editor's note

Recently the company part of the business migration room, in order to more convenient monitoring management host resources, decided to go online Zabbix monitoring platform. OPS personnel use 2.4 version of the deployment, the individual in the spare time early adopters, using zabbix3.0 for deployment, collation documents as follows, for reference only!

1. LNMP Basic Environment Construction:

nginx-1.9.11 Environment Compilation Installation: Reference http://www.cnblogs.com/songqingbo/articles/5355025.html

  

    Location/{      root   html;      Index  index.php index.html index.htm;    }    Error_page   502 503 504  /50x.html;    Location =/50x.html {      root   html;    }    Location ~ \. (PHP|PHP5) $ {      root   /usr/local/nginx/html/zabbix;      Fastcgi_pass   127.0.0.1:9000;      Fastcgi_index  index.php;       # Fastcgi_param  script_filename  /scripts$fastcgi_script_name;      Fastcgi_param  script_filename  /usr/local/nginx/html$fastcgi_script_name;      Includefastcgi_params;      }    

mysql-5.6.20 Compile and install: reference http://www.cnblogs.com/songqingbo/articles/5355025.html

php-5.6 Compile and install:

Dependent environment

1.yum-y Install zlib-devel libxml2-devel libjpeg-devel libiconv-devel freetype-devel libpng-devel gd-devel curl-devel li Bxslt-devel2.wget Http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gztar zxf libiconv-1.14.tar.gz && CD libiconv-1.14 &&./configure--prefix=/usr/local/libiconv && make && make install && C D.. /3.yum-y Install Libmcrypt-devel Mhash mcrypt

Compile and install:



Make && make install

To configure a PHP configuration file:

Vim/application/php/lib/php.ini is mainly for the following several parameters PHP option post_max_size 16MPHP option max_execution_time 300PHP option Max_ Input_time 300PHP Time Zone Asia/shanghai

Configure startup scripts:/etc/init.d/php-fpm chmod +x/etc/init.d/php-fpm && chkconfig php-fpm on

#!/bin/sh # datetime:2013-09-16# author:lianbaikai# site:http://www.ttlsa.com/html/3039.html# chkconfig:-84 16 #  Source function Library. .  /etc/rc.d/init.d/functions # Source Networking configuration. .  /etc/sysconfig/network # Check that networking are up. ["$NETWORKING" = "no"] && exit 0 phpfpm= "/USR/LOCAL/PHP/SBIN/PHP-FPM" prog=$ (basename ${phpfpm}) lockfile=/    VAR/LOCK/SUBSYS/PHPFPM start () {[-X ${PHPFPM}] | | Exit 5 echo-n $ "Starting $prog:" Daemon ${phpfpm}      Retval=$?      echo [$retval-eq 0] && touch $lockfile return $retval} stop () {echo-n $ "stopping $prog:"      Killproc $prog-quit retval=$?      echo [$retval-eq 0] && rm-f $lockfile return $retval} restart () {configtest | | return $?      Stop start} reload () {Configtest | | return $?      Echo-n $ "Reloading $prog:" Killproc ${phpfpm}-hup retval=$?  echo} force_reload () {    Restart} configtest () {${PHPFPM}-T} rh_status () {Status $prog} rh_status_q () {Rh_status      ;/dev/null 2>&1} case "$" in start) Rh_status_q && exit 0 $; Stop) rh_status_q | |      Exit 0 $;;      Restart|configtest) \ n; Reload) Rh_status_q | |      Exit 7 $;;      status) Rh_status;; *) echo $ "Usage: $ start|stop|status|restart|reload|configtest}" Exit 2 Esac

2. Compile and install Zabbix_server

SOURCE Package Download

CD/USR/LOCAL/SRC && wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.0.0/ Zabbix-3.0.0.tar.gz

Dependent environment

Yum install net-snmp-devel openipmi-devel openssl-devel fping-devel libcurl-devel perl-dbi gcc-y

Add user

Mkdir-p/usr/local/zabbix3.0/lib/useradd-d/usr/local/zabbix3.0/lib/zabbix-s/sbin/nologin Zabbix

Compiling the installation

./configure--prefix=/usr/local/zabbix3.0--enable-server  --enable-agent--with-mysql--enable-ipv6-- With-net-snmp--with-libcurl--WITH-LIBXML2 && make install

Permissions

Chown–r zabbix.zabbix/usr/local/zabbix3.0

Add Port

Vim/etc/serviceszabbix-agent 10050/tcp # Zabbix agentzabbix-agent 10050/udp # Zabbix agentzabbix-trapper 10051/tcp # Zabb IX Trapperzabbix-trapper 10051/UDP # Zabbix Trapper

Database initialization

Mysql> CREATE DATABASE Zabbix characterset utf8;mysql> grant all on zabbix.* to ' Zabbix ' @ ' 127.0.0.1 ' identified by ' Zabbixtest ' with Grant option;mysql> flush Privileges;mysql-uroot-p Zabbix </usr/local/src/zabbix-3.0.0/ Database/mysql/schema.sqlmysql-uroot-p Zabbix </usr/local/src/zabbix-3.0.0/database/mysql/images.sqlmysql- Uroot-p Zabbix </usr/local/src/zabbix-3.0.0/database/mysql/data.sql

Profile identification:/usr/local/zabbix3.0/etc/zabbix_server.conf zabbix_agentd.conf

To configure the startup script:

Zabbix_server

#!/bin/bash##/etc/rc.d/init.d/zabbix_server## starts the Zabbix_server daemon## chkconfig:-Up to Description:zab Bix monitoring server# processname:zabbix_server# pidfile:/tmp/zabbix_server.pid# Modified for Zabbix 2.0.0# May, Z Abbix sia# Source Function Library: /etc/init.d/functionsretval=0prog= "Zabbix Server" zabbix_bin= "/usr/local/zabbix3.0/sbin/zabbix_server" if [!-X ${ Zabbix_bin}];        Then Echo-n "${zabbix_bin} not installed!"        # Tell the user this has skipped exit 5fistart () {echo-n $ "starting $prog:" Daemon $ZABBIX _bin        Retval=$?        [$RETVAL-eq 0] && touch/var/lock/subsys/zabbix_server echo}stop () {echo-n $ "stopping $prog:"        Killproc $ZABBIX _bin retval=$?   [$RETVAL-eq 0] && rm-f/var/lock/subsys/zabbix_server echo}case "$" in start) start;  stop) stop;;      Reload|restart) Stop sleep Ten start  Retval=$?  ;; Condrestart) if [-f/var/lock/subsys/zabbix_server];  Then stop start fi;;        Status) status $ZABBIX _bin retval=$?  ;; *) echo $ "Usage: $ condrestart|start|stop|restart|reload|status}" Exit 1esacexit $RETVAL

Zabbix_agentd

#!/bin/bash##/etc/rc.d/init.d/zabbix_agentd## starts the Zabbix_agentd daemon## chkconfig:-Up to Description:zab Bix monitoring agent# processname:zabbix_agentd# pidfile:/tmp/zabbix_agentd.pid# Modified for Zabbix 2.0.0# May, Za Bbix sia# Source Function Library: /etc/init.d/functionsretval=0prog= "Zabbix Agent" zabbix_bin= "/usr/local/zabbix3.0/sbin/zabbix_agentd" if [!-X ${ Zabbix_bin}];        Then Echo-n "${zabbix_bin} not installed!"        # Tell the user this has skipped exit 5fistart () {echo-n $ "starting $prog:" Daemon $ZABBIX _bin        Retval=$?        [$RETVAL-eq 0] && touch/var/lock/subsys/zabbix_agentd echo}stop () {echo-n $ "stopping $prog:"        Killproc $ZABBIX _bin retval=$?   [$RETVAL-eq 0] && rm-f/var/lock/subsys/zabbix_agentd echo}case "$" in start) start;  stop) stop;;        Reload|restart) Stop sleep Ten startRetval=$?  ;; Condrestart) if [-F/VAR/LOCK/SUBSYS/ZABBIX_AGENTD];  Then stop start fi;;        Status) status $ZABBIX _bin retval=$?  ;; *) echo $ "Usage: $ condrestart|start|stop|restart|reload|status}" Exit 1esacexit $RETVAL

Other related configuration references:

Http://www.tuicool.com/articles/JRVVniM http://www.mamicode.com/info-detail-1223031.htmlhttp://www.360doc.com/ Content/14/0330/19/8085797_364996162.shtml

Configure Chinese support reference: http://www.ttlsa.com/zabbix/zabbix-display-chinese/

3.zabbix_proxy Installation configuration:

Compile and install the same server, add a new parameter--enable-proxy

Zabbix_proxy Startup scripts

#!/bin/sh# chkconfig:345 95# Desctription:zabbix proxy# zabbix# Copyright (C) 2001-2013 Zabbix sia## Free software; Can redistribute it and/or modify# it under the terms of the GNU general public License as published by# the free Soft Ware Foundation;  Either version 2 of the License, or# (at your option) any later version.## this program was distributed in the hope that it would be useful,# and without any WARRANTY; Without even the implied warranty of# merchantability or FITNESS for A particular PURPOSE.  See the# GNU General public License-details.## you should has received a copy of the GNU General public license# Along with the program; If not, write to the free software# Foundation, Inc., Wuyi Franklin Street, Fifth Floor, Boston, MA 02110-1301, usa.# start/ Stop the Zabbix Agent daemon.# Place a startup script in/sbin/init.d, and link to it from/sbin/rc[023].dservice= "Zabbix Proxy "Daemon=/usr/local/zabbix3.0/sbin/zabbix_proxypidfile=/tmp/zabbix_agenTd.pidbasedir=/usr/local/zabbix3.0zabbix_agentd= $BASEDIR/sbin/zabbix_proxycase $ In ' start ') if [-X ${daemon}]then$ daemon# Error checking here would is Good...echo "${service} started." Elseecho "Can ' t find file ${daemon}." echo "${service} not started." fi;; ' Stop ') if [-s ${pidfile}]thenif kill ' Cat ${pidfile} ' >/dev/null 2>&1thenecho "${service} terminated." Rm-f ${pidfile}fifi;; ' Restart ') $ stopsleep 10$0 start; *) echo "Usage: $ start|stop|restart";; Esac

For detailed configuration please refer to:

Http://www.2cto.com/os/201401/273888.html
Http://www.tuicool.com/articles/zMZrUjU
Http://blog.chinaunix.net/uid-23500957-id-4919835.html

4. FAQ Summary:

Error connecting to database:no such file or directory

Workaround: http://www.bubuko.com/infodetail-1149825.html

Zabbix of Chinese and garbled solutions

Workaround: http://www.linuxidc.com/Linux/2015-05/117208.htm

5. Monitoring Platform Access

http://www.onealert.com/open/alert/overview.jsp

6.zabbix compile and install the Automation script:

Http://www.dwhd.org/20150519_162243.html

centos6.5 compiling and installing zabbix3.0 and Chinese support organizing documents

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.