行业网站名称,文明网站建设总结,公司名称大全简单,做购票系统网站1.基础介绍
Zabbix#xff1a;企业级开源监控解决方案https://www.zabbix.com/cn这个是zabbix的官网#xff0c;你可以进去看到由官方给你提供的专业介绍和获取到最新版本的功能介绍#xff0c;还有各种安装#xff0c;由于官方安装是多种复杂的#xff0c;我这里就单独挑…1.基础介绍
Zabbix企业级开源监控解决方案https://www.zabbix.com/cn这个是zabbix的官网你可以进去看到由官方给你提供的专业介绍和获取到最新版本的功能介绍还有各种安装由于官方安装是多种复杂的我这里就单独挑出来centos9的安装方法进行演示 我之前已经出过一章centos7的搭建zabbix的方法本章会以centos9进行搭建最新版本的zabbix
下面这个文章就是centos7的
Linuxcentos7zabbix4.0安装监控》Linux》Windows》网络设备_linux7安装zabbix4-CSDN博客https://blog.csdn.net/w14768855/article/details/131840654本章的被监控端仍然使用centos7被监控因为他们都是一样的 2.环境介绍
centos9192.168.6.22serveragentcentos7192.168.6.10agentcentos7192.168.6.9agent 三台电脑均连接网络可以上互联网 3.初始准备
三台设备都要做的操作
yum -y isntall wget
关闭防火墙和selinux
systemctl stop firewalld.service
setenforce 0
上面这俩是临时关闭
systemctl disable firewalld.service
vim /etc/selinux/config将文件内的
SELINUXenforcing
改为
SELINUXdisabled
或者直接用命令
sed -i s/SELINUXenforcing/SELINUXdisabled/ /etc/selinux/config
上面这三是永久关闭firewalld防火墙和selinux
再去为三台电脑设置时间同步
systemctl start chronyd
systemctl enable chronyd
这个默认是找centos官方去同步的如果不可以用的话可以看下面这个文章改为阿里云或者微软的
Linux系统初始化内核优化性能优化1-CSDN博客https://blog.csdn.net/w14768855/article/details/136789499
导入zabbx的阿里云镜像公网仓 centos-9 rpm -Uvh https://repo.zabbix.com/zabbix/6.4/rhel/9/x86_64/zabbix-release-6.4-1.el9.noarch.rpm 两台centos-7 wget https://mirrors.aliyun.com/zabbix/zabbix/6.4/rhel/7/x86_64/zabbix-release-6.4-1.el7.noarch.rpm rpm -ivh zabbix-release-6.4-1.el7.noarch.rpm 4.安装zabbix
先去centos9安装一下他的依赖环境 和他所需的zabbix包
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
再安装一下mysql和httpd
wget https://dev.mysql.com/get/mysql80-community-release-el8-1.noarch.rpm
yum install mysql80-community-release-el8-1.noarch.rpm
yum module disable mysql
yum install mysql-community-server --nogpgchec
yum -y install httpd
开启mysql
vim /etc/my.cnfdefault-authentication-pluginmysql_native_password
去掉前面的# systemctl start mysqld
service enable mysqld
查看一下初始密码
cat /var/log/mysqld.log | grep temporary 后面这个就是 tmRNPb3mh.U我们每个人都不一样
mysql -uroot -ptmRNPb3mh.U
#进入mysql数据库-p后面的换成你刚刚获取到的密码alter user rootlocalhost identified with mysql_native_password by root_21ROOT;
set global validate_password.policy0;
set global validate_password.mixed_case_count0;
set global validate_password.number_count0;
set global validate_password.special_char_count0;
set global validate_password.length0;
alter user rootlocalhost identified with mysql_native_password by 123456;create database zabbix character set utf8mb4 collate utf8mb4_bin;
create user zabbixlocalhost identified by password;
grant all privileges on zabbix.* to zabbixlocalhost;
set global log_bin_trust_function_creators 1;
quit;
这样mysql就配置好了
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-setutf8mb4 -uzabbix -p zabbix
初始化一下环境
密码就是password
导入数据库架构后禁用log_bin_trust_function_creators选项。
mysql -uroot -p
#现在mysql密码就是123456了set global log_bin_trust_function_creators 0;
quit;
再去配置一下zabbix的数据库密码
vim /etc/zabbix/zabbix_server.conf修改131行的
# DBPassword
改为
DBPasswordpassword 让后就可以保存退出了启动服务后就能进行访问
systemctl start zabbix-serversystemctl enable zabbix-serversystemctl start zabbix-agentsystemctl enable zabbix-agentsystemctl start httpdsystemctl enable httpd 5.访问zabbix的web页面
注意你的nginx或者httpd没有index.html才行否则会报错404 访问方法你的服务器ip/zabbix 如192.168.6.22/zabbix 5.登录zabbix 右边这一侧都是ok就可以 写个主机名 下一步
完成 账户Admin
密码zabbix 登录成功