当前位置:网站首页>Zabbix部署与练习
Zabbix部署与练习
2022-07-30 19:57:00 【雾山雨巫】
1、部署zabbix服务。
(1)首先保证防火墙和selinux的关闭
[[email protected] ~]# systemctl stop firewalld
[[email protected] ~]# setenforce 0
(2)设置时间同步
[[email protected] ~]# yum install chrony -y
[[email protected] ~]# vim /etc/chrony.conf
server cn.pool.ntp.org iburst
[[email protected] ~]# systemctl enable chronyd.service
[[email protected] ~]# systemctl start chronyd.service(3)更换源
[[email protected] ~]# sed -i.bak -e 's|^mirrorlist=|#mirrorlist=|' -e 's|^#baseurl=|baseurl=|' -e 's|dl.rockylinux.org/$contentdir|mirrors.nju.edu.cn/rocky|' /etc/yum.repos.d/Rocky-*.repo
[[email protected] ~]# dnf -y https://repo.huaweicloud.com/zabbix/zabbix/5.4/rhel/8/x86_64/zabbix-release-5.4-1.el8.noarch.rpm(4)安装
[[email protected] ~]# dnf install -y zabbix-server-mysql
[[email protected] ~]# dnf install -y zabbix-agent2
[[email protected] ~]# dnf install -y zabbix-web-mysql httpd zabbix-apache-conf
[[email protected] ~]# dnf install -y mariadb-server
[[email protected] ~]# dnf install -y zabbix-sql-scripts.noarch(5)配置数据库
# 启动数据库
[[email protected] ~]# systemctl enable --now mariadb
# 配置数据库
[[email protected] ~]# mysql -e "create database zabbix character set utf8 collate utf8_bin;" [[email protected] ~]# mysql -e "create user 'zabbix'@'localhost' identified by 'zabbix';" [[email protected] ~]# mysql -e "grant all privileges on zabbix.* to 'zabbix'@'localhost';"
# 导入数据
[[email protected] ~]# zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql - uzabbix -pzabbix zabbix
(6)为zabbix server 配置数据库
[[email protected] ~]# grep ^DB /etc/zabbix/zabbix_server.conf
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix(7)配置php时区
[[email protected] ~]# tail -1 /etc/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai(8)启动服务
[[email protected] ~]# systemctl enable --now httpd.service php-fpm.service zabbix-server.service zabbix-agent2.service(9)浏览器进入ip/zabbix

按步骤配置即可

登录 用户/密码:Admin/zabbix


2、安装zabbix-agent监控linux和windows。
创建一台客户端,我这里使用的为CentOS7
在客户端安装服务
[[email protected] ~]# dnf localinstall -y https://mirrors.aliyun.com/zabbix/zabbix/4.5/rhel/7/x86_64/zabbix-release-4.5-1.el7.noarch.rpm
[[email protected] ~]# yum install chrony -y
[[email protected] ~]# vim /etc/chrony.conf
[[email protected] ~]# dnf install -y zabbix-agent2
[[email protected] ~]# vim /etc/zabbix/zabbix_agent2.conf //修改ip为服务端,hostname改为本地主机名
[[email protected] ~]# systemctl enable zabbix-agent2.service --now
在服务端上
[[email protected] ~]# dnf install -y zabbix-agent2
[[email protected] ~]# yum install zabbix-get.x86_64 -y
[[email protected] ~]# zabbix_get -s 192.168.163.141 -k system.uptime
[[email protected] ~]# systemctl enable zabbix-agent2.service --now网页右上角创建 主机



可以点击监测-主机-node1-图形,进行查看监控项
Windows参照linux步骤配置即可

边栏推荐
- 推荐系统-排序层-模型(一):Embedding + MLP(多层感知机)模型【Deep Crossing模型:经典的Embedding+MLP模型结构】
- Download and installation of the latest version of MySQL 8.0 under Linux (detailed steps)
- MySQL mass production of data
- These services can't ali interview?Then don't go to, the basic notification, etc
- MySql密码
- 试写C语言三子棋
- 为单行查询设置JDBC Statement.setFetchSize()为1的方法指南
- 多线程的互斥锁应用RAII机制
- [PyTorchVideo Tutorial 01] Quickly implement video action recognition
- 如何优化OpenSumi终端性能?
猜你喜欢

KEIL问题:【keil Error: failed to execute ‘C:\Keil\ARM\ARMCC‘】

Different lower_case_table_names settings for server (‘1‘) and data dictionary (‘0‘) 解决方案

Face-based Common Expression Recognition (2) - Data Acquisition and Arrangement

来了!东方甄选为龙江农产品直播带货

银行数据资产转换能力弱?思迈特软件助力解决银行困境

MySQL六脉神剑,SQL通关大总结

基于人脸的常见表情识别(2)——数据获取与整理

The JDBC programming of the MySQL database
Database Tuning - Database Tuning

Centos7 install mysql8
随机推荐
Database Tuning - Database Tuning
el-input 只能输入整数(包括正数、负数、0)或者只能输入整数(包括正数、负数、0)和小数
Linux下安装Mysql5.7,超详细完整教程,以及云mysql连接
SQLyog注释 添加 撤销 快捷键
To the operation of the int variable assignment is atom?
Start background services across processes
从离线到实时对客,湖仓一体释放全量数据价值
.eslintrc.js for musicApp
mysql慢查询优化
ImportError: attempted relative import with no known parent package
Mac安装PHP开发环境
【无标题】多集嵌套集合使不再有MultipleBagFetchException
360杜跃进:太空安全风险加剧,需打造一体化防御体系
PostgreSQL 14.4如何安装使用
el-input can only input integers (including positive numbers, negative numbers, 0) or only integers (including positive numbers, negative numbers, 0) and decimals
使用MULTISET来比较数据集的实例介绍
明解C语言第五章习题
MySQL six-pulse sword, SQL customs clearance summary
MySQL八股文背诵版
推荐系统-模型:FNN模型(FM+MLP=FNN)