1:永久关闭防火墙.

systemctl disable --now firewalld

2:关闭selinux.

sed -i s/SELINUX=enforcing/SELINUX=disabled/ /etc/selinux/config

3:安装zabbix,保证机器能上网即可.直接用zabbix的源安装速度也不慢.

rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/8/x86_64/zabbix-release-6.0-1.el8.noarch.rpm
dnf clean all

4:安装 zabbix server,web前端和anget.

dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent

5:安装数据库,zabbix6.0需要Mariadb10.5以上的版本.

vi /etc/yum.repos.d/MariaDB.repo

6:在repo中添加下面的代码.10.5的在官网上已经无法下面,请参考下面的链接安装数据库。不放内容了,时间长了都失效。

数据库安装地址

# MariaDB 10.5 CentOS repository list - created 2022-04-22 11:10 UTC
# https://mariadb.org/download/
[mariadb]
name = MariaDB
baseurl = https://mirror.yongbok.net/mariadb/yum/10.5/centos8-amd64
module_hotfixes=1
gpgkey=https://mirror.yongbok.net/mariadb/yum/RPM-GPG-KEY-MariaDB
gpgcheck=1

7:安装数据库.

sudo dnf install MariaDB-server

8:启动数据库,并加入开机自启.

sudo systemctl start mariadb
sudo systemctl enable mariadb

9:创建并且初始化数据库.

mysql -uroot -p
password
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@localhost identified by 'password';
mysql> grant all privileges on zabbix.* to zabbix@localhost;
mysql> quit;

10:导入初始架构和数据,系统将提示您输入新创建的密码.

zcat /usr/share/doc/zabbix-sql-scripts/mysql/server.sql.gz | mysql -uzabbix -p zabbix

11: 为Zabbix server配置数据库,编辑配置文件 /etc/zabbix/zabbix_server.conf

DBPassword=password

12: 启动Zabbix server和agent进程,并为它们设置开机自启.

systemctl restart zabbix-server zabbix-agent httpd php-fpm
systemctl enable zabbix-server zabbix-agent httpd php-fpm

13:查看端口信息. 10051是zabbix server的端口,10050是anget的端口,3306是Mariadb的端口,80是http的端口,都是监听状态说明没有问题.

netstat -lntp

14:可以用http://IP/zabbix或和http://server_name/zabbix 登陆zabbix了.按照提示配置一下zabbix即可.默认的用户名是Admin,密码是zabbix

15:zabbix6.0监控vCenter7.0请参考.

https://blog.csdn.net/yleihj/article/details/124550445?spm=1001.2014.3001.5501

 16:Centos8安装部署zabbix6.0部分字体乱码请参考.

https://blog.csdn.net/yleihj/article/details/124523710?spm=1001.2014.3001.5501  

 17:zabbix6.0监控Linux主机请参考.

https://blog.csdn.net/yleihj/article/details/124563944?spm=1001.2014.3001.5501

 18:zabbxi6.0监控Windows Server主机。

https://blog.csdn.net/yleihj/article/details/124583919?spm=1001.2014.3001.5501

19:使用Grafana8.5.2显示zabbix6.0的信息

https://blog.csdn.net/yleihj/article/details/124758156

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐