当前位置:网站首页>ZABBIX introduction and installation
ZABBIX introduction and installation
2022-07-06 10:16:00 【Lick sheep azei】
Catalog
Two 、 choice zabbix The advantages of
3、 ... and 、zabbix Program components
1、 Prepare a new machine , Environment initialization
2、 obtain zabbix Download source
4、 install zabbix Front end environment
5、 install zabbix The required database
6、 Configuration database , Boot up
7、 Initialize database , Set the password
8、 Add database users and zabbix Required database information
9、 Use zabbix-mysql Command to import database information
10、 modify zabbix_server The configuration file , Change database password
11、 modify zabbix Of php The configuration file
12、 restart zabbix And set it to start automatically
13、 Log in zabbix Front settings
One 、zabbix Introduce
Zabbix By Alexei Vladishev Developed a kind of network monitoring 、 Management system , be based on Server-Client framework . It can be used to monitor various network services 、 Server and network machine etc .
Using a variety of Database-end Such as MySQL, PostgreSQL, SQLite, Oracle or IBM DB2 Store data .Server Terminal base on C Language 、Web The management end frontend Is based on PHP Made by .
Zabbix There are many ways to monitor . You can just use Simple Check No installation required Client End , It can also be based on SMTP or HTTP ... Custom monitoring of various protocols .
On the client side such as UNIX, Windows Install in Zabbix Agent after , Can be monitored CPU Load、 Network usage 、 Hard disk capacity and other states . And even if it's not installed Agent In the monitoring object ,Zabbix You can also go through SNMP、TCP、ICMP、 utilize IPMI、SSH、telnet Monitor the target .
Zabbbix Self contained Item Enough to meet the monitoring needs of ordinary small companies , For large companies, you can also set custom Item, Automatically generate reports , Also have API Can be integrated with other systems .
Two 、 choice zabbix The advantages of
zabbix It can meet the requirements of the idealized monitoring system
● Support custom monitoring scripts , Provide the value to be output
●zabbix The stored database table structure is slightly complex, but the logic is clear
●zabbix There is Concept of template , It's convenient to put - Deploy group monitoring items ( For example, we have many zabbix Server side , If we were in a machine a It defines 100 Monitoring content , We're working on the machine b If so many monitoring contents need to be defined in, we don't need to redefine them , Just put the machine a Export the monitoring template of to the machine b Can )
●zabbix each individual item That is to say Monitoring item , You can see the history , And web Friendly interface
●zabbix Yes Powerful Trigger( trigger ) Define the rules , Complex alarm logic can be defined
●zabbix Provides ack Alarm acknowledgement mechanism
●zabbix Support email , SMS , Wechat and other alarms
●zabbix stay After triggering the alarm , System commands can be executed remotely
●zabbix Yes Native PHP Drawing module
3、 ... and 、zabbix Program components
●Zabbix_ server, Server daemons
●Zabbix_ agentd, agent Daemon
●zabbix_ proxy, proxy server
●zabbix_ database, The storage system ,mysql, pgsq|
●Zabbix_ web, web GUI Graphical interface
●Zabbix_ get, Command line tools , Test direction agent Initiate data collection request
●Zabbix_ sender, Command line tools , Test direction server send data
●Zabbix_ java_ gateway, java gateway
Four 、zabbix Installation
zabbix The official download : download Zabbix
1、 Prepare a new machine , Environment initialization
zabbix The machine memory should be large enough ,4G Just fine .
Know the name of the device and take it out ip Address


Turn off firewall :
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
systemctl disable --now firewalld

selinux close , also iptables All three links allow data opening

2、 obtain zabbix Download source
rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
At Alibaba cloud's open source mirror zabbix5.0 Download the installation package

Once the download is complete , We can see in our repo There is one in the warehouse zabbix file

And then we vim Open this document , It is found that the default download path is zabbix official , That is, the Internet , Download too slow

So we need to zabbix.repo Source changed to Alibaba , use sed Command to replace the contents of the document
sed -i 's#http://repo.zabbix.com#https://mirrors.aliyun.com/zabbix#' /etc/yum.repos.d/zabbix. repo

Then open the file here to check whether the modification is successful

And then modify zabbix-fronted Front end source , take 0 Change to 1

then yum clean all Empty the old yum cache

3、 download zabbix
yum install zabbix-server-mysql zabbix-agent -y

Installation tools , Multiple versions of software can be used on the machine , And it will not affect the dependent environment of the whole system .
yum install centos-release-scl -y

4、 install zabbix Front end environment
yum install zabbix-web-mysql-scl zabbix-apache-conf-scl -y( If it's installed scl Tools )

Generate the files in the following directory

5、 install zabbix The required database
Just use our own mariadb
yum install mariadb-server -y

6、 Configuration database , Boot up
systemctl enable --now mariadb

7、 Initialize database , Set the password
First, make sure that the database is turned on
systemctl status mariadb

netstat -tunlp Make sure 3306 Open port

Enter the command to start the initialization operation mysql_secure_installation

Then the following options will appear :

First of all : Enter your current root password .# We newly installed mysql, The default password is empty , So we just go back
second : Whether to set up root password ,Y/N?# We type in Y, Set the password
Third : Set your password .
Fourth : Enter the password you set again .

The fifth : Remove anonymous users ?# We choose Y, Remove him .
The sixth : prohibit root Remote login ?# We selected N, Convenient for testing .
The seventh : Whether to remove the test database and execute ?# We selected Y
The eighth : Whether to refresh the authorization table ?# We selected Y
Then enter the password to enter the database : mysql -uroot -p

8、 Add database users and zabbix Required database information
Access to database

And then create a zabbix database , Character encoding set to utf-8
create database zabbix character set utf8 collate utf_bin;

Create a zabbix User and set password
create user [email protected] identified bu 'chaoge666';

Authorize the user
grant all privileges on zabbix.* to [email protected];

Refresh authorization table flush privileges;

Exit database .

9、 Use zabbix-mysql Command to import database information
First, check whether the file exists
ls /usr/share/doc/zabbix-server-mysql*/create.sql.gz

Then use the command to import the compressed file into the database
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
#mysql -u user name -p( password ) zabbix( This zabbix It's not a code , But specified zabbix This library )

Enter the database to check whether the import is successful

use zabbix
show tables; Check whether the table is successful

10、 modify zabbix_server The configuration file , Change database password
Get into zabbix_server Configuration file for

In the document /DBpassword Find the line that needs to be modified

Then change the empty password

Use grep Command to check whether the modification is successful
grep '^DBpa' /etc/zabbix/zabbix_server.conf

11、 modify zabbix Of php The configuration file
Enter the configuration file

Find in the document /timezone This business , Make changes
Change the back area to Shanghai , And cancel the comments before the line

Continue to use grep Command to check whether the modification is successful
grep 'timezone' /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf

12、 restart zabbix And set it to start automatically
systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm

13、 Log in zabbix Front settings
If you only enter your ip What I visited was httpd Test page , belong ip Then add zabbix The suffix
Such as 10.211.55.10/zabbix
Go in and click NEXT step next step

The next page will detect technology request Whether the environmental dependency is normal
All green cut ok Click next

Enter your password to log in to the database and click next

Click next again

Move on to the next step

Click finish

14、 Log in zabbix
After entering this page , The default account number is Admin The password is zabbix, Be careful A It's capital

Login successful

边栏推荐
- South China Technology stack cnn+bilstm+attention
- CAPL script pair High level operation of INI configuration file
- max-flow min-cut
- MySQL combat optimization expert 10 production experience: how to deploy visual reporting system for database monitoring system?
- Listen to my advice and learn according to this embedded curriculum content and curriculum system
- Flash operation and maintenance script (running for a long time)
- Implement context manager through with
- Safety notes
- oracle sys_ Context() function
- CANoe下载地址以及CAN Demo 16的下载与激活,并附录所有CANoe软件版本
猜你喜欢

C杂讲 文件 续讲
![16 medical registration system_ [order by appointment]](/img/7f/d94ac2b3398bf123bc97d44499bb42.png)
16 medical registration system_ [order by appointment]

Routes and resources of AI
![[NLP] bert4vec: a sentence vector generation tool based on pre training](/img/fd/8e5e1577b4a6ccc06e29350a1113ed.jpg)
[NLP] bert4vec: a sentence vector generation tool based on pre training

C杂讲 文件 初讲

13 医疗挂号系统_【 微信登录】
![[CV] target detection: derivation of common terms and map evaluation indicators](/img/e8/04cc8336223c0ab2dea5638def88df.jpg)
[CV] target detection: derivation of common terms and map evaluation indicators

Contrôle de l'exécution du module d'essai par panneau dans Canoe (primaire)

MySQL实战优化高手04 借着更新语句在InnoDB存储引擎中的执行流程,聊聊binlog是什么?

Combined search /dfs solution - leetcode daily question - number of 1020 enclaves
随机推荐
MySQL實戰優化高手04 借著更新語句在InnoDB存儲引擎中的執行流程,聊聊binlog是什麼?
高并发系统的限流方案研究,其实限流实现也不复杂
美疾控中心:美国李斯特菌疫情暴发与冰激凌产品有关
Not registered via @enableconfigurationproperties, marked (@configurationproperties use)
MySQL combat optimization expert 10 production experience: how to deploy visual reporting system for database monitoring system?
15 医疗挂号系统_【预约挂号】
Combined search /dfs solution - leetcode daily question - number of 1020 enclaves
The replay block of canoe still needs to be combined with CAPL script to make it clear
MySQL ERROR 1040: Too many connections
Control the operation of the test module through the panel in canoe (Advanced)
Software test engineer development planning route
Listen to my advice and learn according to this embedded curriculum content and curriculum system
Not registered via @EnableConfigurationProperties, marked(@ConfigurationProperties的使用)
The 32-year-old fitness coach turned to a programmer and got an offer of 760000 a year. The experience of this older coder caused heated discussion
The 32 year old programmer left and was admitted by pinduoduo and foreign enterprises. After drying out his annual salary, he sighed: it's hard to choose
17 medical registration system_ [wechat Payment]
CAPL脚本中关于相对路径/绝对路径操作的几个傻傻分不清的内置函数
Upload vulnerability
Vscode common instructions
Automation sequences of canoe simulation functions