zabbix installation and deployment (CentOS7)

1. Zabbix Introduction

 

 

 

  • zabbix is ​​based on providing a distributed system monitoring and network monitoring capabilities WEB interface, enterprise-class open source solutions.
  • zabbix can monitor various network parameters to ensure the safe operation of the server system; and to provide a flexible notification mechanism to allow system administrators to quickly locate / solve problems.

  • zabbix consists of two parts, zabbix server and optional components zabbix agent.

  • zabbix server can provide monitoring, data collection and other functions on the remote server / network status through SNMP, zabbix agent, ping, port monitoring and other methods, it can run on Linux, Solaris, HP-UX, AIX, Free BSD, Open BSD, OS X and other platforms.

2. LAMP / LNMP Introduction

  • LAMP: Linux + Apache + Mysql / MariaDB + Perl / PHP / Python to build a common set of dynamic Web sites or servers open source software itself is its own program, but as is often used together, have a growing high degree of compatibility, together form a powerful Web application platform.

  • LNMP: LNMP refers to a written Nginx CentOS / Debian-based, PHP, MySQL, phpMyAdmin, eAccelerator a key installation package. LNMP can easily install a production environment on the VPS, dedicated hosting.
  • L:linux

  • A:apache

  • N:nginx

  • M:mysql,mariaDB

  • P:php,python,perl

3. Preparations

To reduce the impact, before installation, you need to turn off the firewall and selinux.

  • Close selinux
Temporary closure: setenforce 0 
permanently closed: vi / etc / selinux / config

 

 

  • Turn off the firewall
Temporary closure: systemctl stop firewalld.service
Permanent closure: systemctl disable firewalld.service

 

4. LAMP installation environment

  • ① install apache

 

yum install -y httpd

 

 

  •  Start httpd service

 

systemctl start httpd

 

 

  •  ② install mysql

Because mysql version 7 to charge, so we installed mariadb

 

yum install -y mariadb mariadb-server

 

 

  • Start mariadb Service
systemctl start mariadb

 

 Check whether the installation is successful Mariadb

 

  •  ③ installed php
yum install -y php php-mysql

5. Installation Zabbix

  • ① install php
rpm -ivh http://repo.zabbix.com/zabbix/4.2/rhel/7/x86_64/zabbix-release-4.2-6.el7.noarch.rpm
  • ② installation package zabbix
yum install -y zabbix-server-mysql zabbix-get zabbix-web zabbix-web-mysql zabbix-agent zabbix-sender
  • ③ zabbix library and create a set of utf8 character encoding format
create database zabbix character set utf8 collate utf8_bin;

 

  •  ④ create an account and password authorization, then refresh
grant all privileges on zabbix.* to zabbix@'%' identified by 'zabbix';
flush privileges;

Zabbix assigned to the user from any client can perform all operations on the database privileges zabbix all tables, and set a password for zabbix

  • ⑤ import table

Switching this directory

cd /usr/share/doc/zabbix-server-mysql-4.2.6/

Decompressing

gunzip create.sql.gz

To import table

mysql;
use zabbix;
source create.sql;

 

 

  •  ⑥ Configuration zabbix server configuration file

Profile directory

cd /etc/zabbix

 

 To configure zabbix_server.conf

 

 Locate and modified to the following:

DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
DBSocket=/var/lib/mysql/mysql.sock

Open zabbix-server service

systemctl start zabbix-server.service

⑦ configuration php

cd /etc/httpd/conf.d
vi zabbix.conf

Configuration time

 

 Zabbix.conf.php modify configuration files

cd /etc/zabbix/web/
vi zabbix.conf.php

Modify their own localhost server's IP address, such as the following:

$DB['SERVER']   = '192.168.4.112';
$ZBX_SERVER      = '192.168.4.112';

Restart the service and set to boot

systemctl restart httpd zabbix-server restart zabbix-agent
systemctl restart httpd zabbix-server restart zabbix-agent mariadb
  • ⑧ landing zabbix URL settings

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Use Admin / zabbix Login

 

Guess you like

Origin www.cnblogs.com/jxcryf/p/11597132.html