zabbix server

Premise environment :

CentOS 6

Lnmp

php Need to pack (bcmath,mbstring,sockets,gd,libxml,xmlwriter,xmlreader,ctype,session,gettext)  # gettext Multilingual support

edition :Zabbix-3.2.3

server install

yum install -y net-snmp \
net-snmp-devel
cd /usr/local/src/zabbix-3.2.
./configure --prefix=/usr/local/zabbix \
--enable-server \
--enable-agent \
--with-mysql=/usr/local/mysql/bin/mysql_config \
--with-net-snmp \
--with-libcurl \
--with-libxml2 \
--with-openssl
make && make install

--enable-server zabbix Server side

--enable-agent zabbix client

modify php The configuration file (php.ini)

memory_limit=128M
post_max_size=16M
upload_max_filesize=2M
max_execution_time=
max_input_size=
session.auto_start = 0
mbstring.func_overload = 0
always_populate_raw_post_data = -1

Create user ( Server side Clients need to create The default running user is zabbix)

useradd -M -s /sbin/nologin zabbix

Initialize database
zabbix server,proxy You need a database
agent Unwanted
proxy Just import one sql file ,server You need to import three sql file
proxy:
database/mysql/schema.sql
server:
database/mysql/schema.sql
database/mysql/images.sql
database/mysql/data.sql

To configure zabbix server

/usr/local/zabbix/etc/zabbix_server.conf

LogFile=/tmp/zabbix_server.log
DBHost=localhost
DBName=zabbix
DBUser=root
DBPassword=
DBSocket=/tmp/mysql.sock

start-up zabbix server

/usr/local/zabbix/sbin/zabbix_server

To configure zabbix server Visit Site

copy Front end files
mkdir /storage/www/zabbix
cp -rp frontends/php/* /storage/www/zabbix

/usr/local/nginx/conf/nginx.conf

server
{
listen ;
server_name monitor.zabbix.com;
#access_log off;
root /storage/www/;
error_page /50x.html;
location = /50x.html {
root html;
}
location /
{
index index.php index.html;
}
location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
}

Configure access zabbix

One 、 Online configuration ( Graphical interface form The final program also writes parameters to zabbix.conf.php There will be module error checks )

user zabbix Need to be right zabbix.conf.php Write permission of

monitor.zabbix.com

Two 、 Direct manual modification zabbix.conf.php The configuration file

/storage/www/zabbix/conf/zabbix.conf.php

<?php
// Zabbix GUI configuration file.
global $DB; $DB['TYPE'] = 'MYSQL'; # Database type
$DB['SERVER'] = 'localhost'; # mysql host
$DB['PORT'] = ''; # mysql port What we set up is unix socket access So it doesn't need to be changed to 3306
$DB['DATABASE'] = 'zabbix'; # Specific database
$DB['USER'] = 'root'; # mysql user
$DB['PASSWORD'] = '123456'; # mysql pass ?>

Login language selection

Check whether Chinese is enabled in the configuration

include/locales.inc.php

'zh_CN' => ['name' => _('Chinese (zh_CN)'), 'display' => true],

Chinese code scrambling

Find the local C:\Windows\Fonts\simkai.ttf( Regular script ) Upload to server zabbix Website directory fonts Under the table of contents

Modify the configuration file

cd /storage/www/zabbix && sed -i 's/DejaVuSans/simkai/g' ./include/defines.inc.php

zabbix agent

agent install

cd /usr/local/src/zabbix-3.2.3
./configure --prefix=/usr/local/zabbix-agent \
--enable-agent
make && make install

Create user ( Server side Clients need to create The default running user is zabbix)

useradd -M -s /sbin/nologin zabbix

To configure zabbix agent

/usr/local/zabbix-agent/etc/zabbix_agentd.conf

LogFile=/tmp/zabbix_agentd.log
Server=172.18.2.196 # zabbix server ip
#ServerActive=172.18.2.196 # Active mode
Hostname=test6 # Client hostname ( perform hostname The result of the order is )
Include=/usr/local/zabbix-agent/etc/zabbix_agentd.conf.d/ # Other monitoring module paths

start-up zabbix agent

/usr/local/zabbix-agent/sbin/zabbix_agentd

ALL(server,agent)

The startup script

misc/init.d   There are many. linux Distribution init Script ( You need to modify the program path yourself )

test

server(zabbix_get Get the client item value )

zabbix_get -s (agent ip) -p (agent port) -k "item-key"

example:  zabbix_get -s 127.0.0.1 -p 10050 -k "system.uname"

agent(zabbix_agentd obtain item value )

zabbix_agentd -t "item-key"

example: zabbix_agentd -t "system.uname"

ps: All the relative paths in this article are source decompression paths (/usr/local/src/zabbix-3.2.3) As a starting point

Reference resources :https://www.zabbix.com/documentation/3.2/manual/installation/install

Zabbix3.2 More articles on installation and deployment

  1. Zabbix3.4 Installation and deployment

    Zabbix3.4 Installation and deployment One . System environment cat /etc/redhat-release  CentOS Linux release 7.3.1611 (Core)  Close the firewall and selinux sy ...

  2. zabbix3.0 Install deployment documentation

    zabbix v3.0 Installation and deployment Abstract : The installation process of this article is taken from http://www.ttlsa.com/ as well as http://b.lifec-inc.com , And the stationmaster <ZABBIX From entry to mastery v ...

  3. Zabbix3.0 Install deployment best practices

    Zabbix Introduce 1.1zabbix brief introduction Zabbix Is a highly integrated network monitoring solution , It can provide enterprise level open source distributed monitoring solutions , It is maintained and updated by a foreign team , The software can be downloaded freely , The operation team depends on providing ...

  4. CentOS7 Installation and deployment zabbix3.4 Operation record

    CentOS7 Installation and deployment zabbix3.4 Operation record 1. Preparation before installation 1.1 see centos System version of [root@zabbix ~]# cat /etc/redhat-release CentOS L ...

  5. Zabbix3.x Installation illustration tutorial

    Prepare knowledge : Zabbix3.x Compare the previous 2.0 The interface has changed a lot , But the installation and deployment process is different from 2.x It's basically the same . 1.Zabbix2.x Installation illustration tutorial http://www.osyunwei.com/archi ...

  6. zabbix3.0 install 【server】

    About zabbix Introduction to , Not much , Powerful , Avant garde Architecture , Go directly to the official website for research ad locum , Or research an application or technology , You have to install and deploy by yourself , Practical operation , In order to master , Based on this spirit ,zabbix Start with installation and deployment ...

  7. zabbix 3.2.7 ( Source package ) Installation and deployment

    Zabbix 3.2.7 + CentOS7 install Environmental preparation : operating system CentOS Linux release 7.2.1511 (Core) zabbix server 10.30.94.60 ...

  8. centos Installation and deployment zabbix

    Zabbix_server Initial installation deployment Modules to be installed for each module Server:server+nginx+mysql+php Agentd:agentd Proxy:proxy+mysql 1. Prepare the environment : ...

  9. zabbix 3.2.2 server End ( Source package ) Installation and deployment ( One )【 turn 】

    Environmental preparation : operating system CentOS 6.8 2.6.32-642.11.1.el6.x86_64 zabbix server 172.16.10.150 zabbix agent 172.16.10. ...

Random recommendation

  1. CSS Basic grammar

    Here we mainly introduce Bootstrap Used in CSS grammar , In order to be easier to understand and learn when analyzing the source code .Bootstrap Of CSS The core of components is the definition of selectors and the processing of their respective priorities . priority How to determine the CSS The priority of the , here ...

  2. iOS- Common auxiliary tool software

    1.Navicat Premium11.0.20 Cracked version quick install configuration ( Attached documents )   Navicat Premium It's a very useful database management software right now , But it's very expensive , And there are some little bug, Feeling 3000+ Of ...

  3. thorough .NET Internal test questions

    One   choice question 1)       What's wrong with the following description of serialization and deserialization is ( C). a)      Serialization is the process of storing the state of an object in a specific storage medium b)      Binary formatter's Serialize() and D ...

  4. MotionEvent Common values

    Common action constants : public static final int ACTION_DOWN        = 0; Single touch action public static final int ACTION_UP     ...

  5. POJ 3318 Matrix Multiplication( Matrix multiplication )

    Topic link The question : Give you three n D matrix , Let you decide A*B Is it equal to C. Ideas : Optimization transforms two dimensions into one . Randomly generate a one-dimensional vector d, bring A*(B*d)=C*d, Multiple tests can greatly reduce the error probability . #inc ...

  6. sublime text Use

    One . stay sublime text Created in html.css.js file ctrl+shift+p( Call up the console )   Then input Set Syntax:html( You can also type :ssh) Set Syntax:css ...

  7. oracle Database backup

    // Create a temporary table space create temporary tablespace test_temp tempfile 'D:\oracle\data\test\test_temp.dbf' size 32m ...

  8. js date Related learning !

    var myDate = new Date(); myDate.getYear(); // Get current year (2 position ) myDate.getFullYear(); // Get full year (4 position ,1970-???? ...

  9. Recommend five Android Automated testing tools for applications

    Now automated testing has been applied to daily testing . No wonder , Because automated testing saves time in the testing process , It can also avoid test errors and omissions caused by human factors . There are many options for automated testing tools . Some are open source , Some are very expensive . Some of the automation tools are a few ...

  10. HTMLCSS Achieve fixed width on the left and scrollable content on the right

    When making mobile page , I often come across a div There are two in the middle div, left div Fixed width or percentage , On the right side div The content overflows from left to right , You need to slide left and right to get to the full content , I wrote a demo. The key point in dealing with this problem is ...