Zabbix3.0lts Installation

Source: Internet
Author: User
Tags snmp

Basic Environment:

nginx:1.8.1

mysql:5.6.29

php:5.5.30 (zabbix_3.0 requires PHP version above 5.4)


First, install the LNMP

1, the installation process is no longer described here, please refer to other articles

2. Note: PHP should be compiled with--WITH-MYSQLI=MYSQLND and--with-gettext support Zabbix


Second, installation Zabbix

1, Hint: Official installation document: Https://www.zabbix.com/documentation/3.0/manual/installation/install

2. Download the source package:

Shell>wget http://www.zabbix.com/download.php


3. Yum Installation Base Environment

Shell>yum Install Mysql-dev gcc net-snmp-devel curl-devel perl-dbi php-gd php-mysql php-bcmath php-mbstring PHP-XM


4. Add Zabbix Users

Shell>useradd zabbix-s/sbin/nologin


5. Compile and install

Shell>tar XF ZABBIX-3.0.1.TAR.GZ;CD zabbix-3.0.1

Shell>./configure--prefix=/opt/app/zabbix--enable-server--enable-agent--with-mysql--enable-ipv6-- WITH-NET-SNMP--with-libcurl--WITH-LIBXML2

Shell>make Install

Parameter description

―prefix= for the specified installation directory

―enable-server for installing the Zabbix service-side program

―enable-agent Installing the Agent Program

―with-mysql to use MySQL database

―enable-ipv6 to enable IPv6 support

―WITH-NET-SNMP to enable SNMP support

―with-libcurl to enable Curl

―WITH-LIBXML2 compiling XML modules, primarily for monitoring VM virtual machines


6. Create MySQL library and Zabbix read-write account

Mysql>create database Zabbix Character set UTF8 collate utf8_bin;

Mysql>grant all privileges in zabbix.* to [email protected] '% ' identified by ' <password> ';

Mysql>flush privileges;


7. Enter the MySQL data directory and import the data into the Zabbix library in sequence.

shell>cd/opt/src/zabbix-3.0.1/database/mysql/

Mysql>mysql-uroot-p Zabbix < Schema.sql

Mysql>mysql-uroot-p Zabbix < Images.sql

Mysql>mysql-uroot-p Zabbix < Data.sql


8. Add and modify Zabbix configuration files

Shell>vim/opt/app/zabbix/etc/zabbix_server.conf

Dbname=zabbix #数据库名称

Dbuser=zabbix #数据库用户名

dbpassword= #数据库密码

Dbport= #数据库端口

listenip=127.0.0.1 #数据库ip地址

Alertscriptspath=/opt/app/zabbix/alertscripts #zabbix运行脚本存放目录


9. Start Zabbix Server

Shell>/opt/app/zabbix/sbin/zabbix_server

If there are errors, look for Zabbix error log


10. Set PHP.ini parameters

Shell>vim $PHP _path/php.ini mainly for the following parameters

PHP option Post_max_size 16M

PHP option Max_execution_time 300

PHP option Max_input_time 300

PHP Time Zone Asia/shanghai


11. Start PHP

Shell>service php-fpm Start


12. Configuring the Zabbix Web Environment

SHELL>CD zabbix-3.0.1/frontends/

SHELL>CP-RF php/data/wwwroot/zabbix.xxx.com

shell>cd/data/wwwroot/zabbix.xxx.com/conf/

SHELL>CP Zabbix.conf.php.example zabbix.conf.php

Shell>vim zabbix.conf.php #配置zabbix连接数据库


13, configure the Nginx virtual host Zabbix

server{        listen 80;         server_name zabbix. xxx.com;        index index.php index.html;         root /data/wwwroot/zabbix. xxx.com;                 Location ~ .*\. (PHP|PHP5)? $                {                          fastcgi_pass  unix:/tmp/php-cgi.sock;                    #fastcgi_pass    127.0.0.1:9000;                   fastcgi_index index.php;                   include fcgi.conf;                 }}


14, confirm PHP, Nginx, MySQL, has been started. Open the Zabbix.xxx.com page in the browser, follow the prompts, step by step configuration Zabbix

Tip: As I do this step, the browser jumps directly to the last page, that is, there is no custom configuration. The default user name is admin, and the password is Zabbix. (Note case)


15. Set up Chinese support

A> Find the/data/wwwroot/zabbix.xxx.com/include/locales.inc.php file, find 55 rows, and change flase to true, such as: ' zh_cn ' + = [' name ' = = ' Chinese (ZH_CN) '), ' display ' = True],

B> Log In, click the Human icon in the upper right corner to set Chinese.


16, because of changes in language, graphics will appear garbled, make the following changes

A: Download Microsoft Ya-black font, upload Wryh.ttf to the/data/wwwroot/zabbix.xxx.com/fonts/directory

B> found:/data/wwwroot/zabbix.xxx.com/include/defines.inc.php

C>define (' Zbx_font_name ', ' wryh '); #第45行

D>define (' Zbx_font_name ', ' wryh '); #第93行


17. Complete Installation

This article is from "John Steven-Salted Fish" blog, please be sure to keep this source http://johnsteven.blog.51cto.com/2523007/1762079

Zabbix3.0lts Installation

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.