ZABBIX的安装和部署(手动添加,自动发现,自动注册,API接口)

zabbix的安装
1、zabbix是什么

zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案。它可以监视各种网络参数,保证服务器系统的安全运营;并提供灵活的通知机制以让系统管理员快速定位/解决存在的各种问题。
zabbix由2部分构成,zabbix server与可选组件zabbix agent。

zabbix的简介

  • 监控及报警:监控机器性能、网卡、服务是否开启等,发现问题通过邮件、短信、微信等方式及时报警。

  • ·批量配置:快速将某些配置同步到大量的机器中。

  • ·问题快递定位:从大量机器中监控各项日志、业务流程,快速定位出现的问题。

  • ·应用监控测试:监控业务的响应时间,主要体现在网页监控上。

2、zabbix的安装

首先封装一台rhe7.3的虚拟机,这里一般7系以上的就行,但是不建议使用7.0的,7.0过于老旧了。
本次实验使用的主机分别是,其中的selinux都必须是disabled,防火墙是关闭状态;

server1 172.25.66.1

实验配置如下:
首先需要在zabbix官网下载以下插件,下载真实的物理主机上
配置yum源,虚拟机配置yum源。

[root@server1 yum.repos.d]# vim zabbix.repo 
[root@server1 yum.repos.d]# cat zabbix.repo 
[zabbix]
name=zabbix
baseurl=file:///root/4.0
gpgcheck=0                    配置好yum源
[root@server1 yum.repos.d]# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
lucky                                                    | 4.1 kB     00:00     
zabbix                                                   | 2.9 kB     00:00     
(1/3): lucky/group_gz                                      | 136 kB   00:00     
(2/3): zabbix/primary_db                                   | 9.5 kB   00:00     
(3/3): lucky/primary_db                                    | 3.9 MB   00:00     
repo id                              repo name                            status
lucky                                lucky                                4,751
zabbix                               zabbix                                  12
repolist: 4,763

下载zabbix所需要的插件,并且登陆数据库

[root@server1 ~]# yum install zabbix-server-mysql zabbix-web-mysql  -y
[root@server1 ~]# yum install mariadb-server -y
[root@server1 ~]# systemctl start mariadb
[root@server1 ~]# mysql_secure_installation 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none): 
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] 
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success! 
 [root@server1 ~]# systemctl enable mariadb 			设置开机自启
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

登陆数据库,编写新的数据库资源

[root@server1 ~]# mysql -p
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identif
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值