Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux Monitoring system _ Zabbix installation steps and configuration v1.1 (3)

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Environment:

Configure Server / Web GUI / Database # C7R3 172.16.79.73 with one host

The other host is regarded as the monitored host # C7R4 172.16.79.74

Here we experiment with zabbix mysql (mariadb) apache php

Trousers package: is a trusted computing group program station (zabbix will call the system in the belt, the possible version is called Laohui bug), please update

Since 3. 0, there is no zabbix-server installation package and instead zabbix-server-mysql (pgsql) provides it.

Proxy is not used at this time, so there is no need to install

* install server side * *

* * set mysql**

] # yum install mariadb-server # Experimental environment is Centos 7

] # vim / etc/my.cnf # or / etc/my.cnf.d/ creation

1. Create independent tablespaces

two。 Prohibit resolution of hostname

~] # systemctl start mariadb # enable the service

~] # mysql

MariaDB [(none)] > CREATE DATABASE zabbix CHARSET 'utf8'; # create a table and set the character set

MariaDB [(none)] > GRANT ALL ON zabbix.* TO zbxuser@'127.0.0.1' IDENTIFIED BY 'zbxpass'; # set authorization and account password

*

~] # yum install zabbix

~] # yum install zabbix22-server-mysql.x86_64

~] # yum install httpd php zabbix22-web-mysql

Install zabbix-agent if you want to monitor the zabbix server itself

* ******************

Split is installed here

* ***************

* * Server configuration *

* * prepare mysql***

Server database initialization:

Although the database is established on the server side, there are no tables. Zabbix provides scripts to automatically create tables for db.

2.x: three sql scripts

3. 0: there is a sql script

This section takes version 2.2 as an example:

] # cd / usr/share/zabbix-mysql/

] # ls

Data.sql p_w_picpaths.sql schema.sql upgrades

] # mysql-h 127.0.0.1-u zbxuser-p zabbix < / usr/share/zabbix-mysql/schema.sql

] # mysql-h 127.0.0.1-u zbxuser-p zabbix < / usr/share/zabbix-mysql/p_w_picpaths.sql

] # mysql-h 127.0.0.1-u zbxuser-p zabbix < / usr/share/zabbix-mysql/data.sql

* * prepare zabbix***

] # cd / etc/zabbix # pay attention to backup

] # vim zabbix_server.conf

= =

Configuration segment

# GENERAL PARAMETERS # General parameter section

# ADVANCED PARAMETERS # Advanced parameters

# LOADABLE MODULES # loadable module

# TLS-RELATED PARAMETERS # Security related

Item format:

# Option: NodeID # instruction name

# Unique NodeID in distributed setup. # meaning

# 0-standalone server

#

# Mandatory: whether no # is mandatory

# Range: 0-999 # removable range

# Default: # default

# NodeID=0 # current settings

General parameters:

ListenPort=10051 default listening port

The ip address from which the SourceIP= data collection request is sent, (involving agent authentication)

LogType=file log type

LogFile=/var/log/zabbix/zabbix_server.log log file

LogFileSize=0 log size

PidFile=/var/run/zabbix/zabbix_server.pid

DBHost=localhost database service address

DBName=zabbix database name

DBUser=zbxuser database user

DBPassword=zbxpass database password

DBSocket=/var/lib/mysql/mysql.sock database socket file

Modify the configuration file:

DBHost=127.0.0.1

DBUser=zbxuser

DBPassword=zbxpass

Open the service and check the status:

] # systemctl start zabbix-server

] # systemctl status zabbix-server

* * configure WEB GUI****

You must define the time zone:

Version 2.x must be modified:

] # vim / etc/php.ini # / date.timezone will affect php global configuration Asia/Shanghai

3.0:

] # vim / etc/httpd/conf.d/zabbix.conf Asia/Shanghai

Restart the service:

] # systemctl restart httpd

* *

Visit http://172.16.79.73/zabbix

Fuck you. I'm so excited.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report