网站建设公司销售前景,一般网站建设公司怎么收费,做防水的网站有哪些,南阳建网站企业文章目录前言一. 实验环境二. 安装zabbix过程2.1. 安装zabbix源2.2 安装zabbix相关的软件2.3 安装数据库并启动2.4 开始初始化数据库#xff1a;2.5 创建数据库实例及对应的用户2.6 导入官网提供的数据2.7 配置zabbix 服务的配置文件2.8. 启动服务2.9 从网页进行安装2.10 登陆…
文章目录前言一. 实验环境二. 安装zabbix过程2.1. 安装zabbix源2.2 安装zabbix相关的软件2.3 安装数据库并启动2.4 开始初始化数据库2.5 创建数据库实例及对应的用户2.6 导入官网提供的数据2.7 配置zabbix 服务的配置文件2.8. 启动服务2.9 从网页进行安装2.10 登陆zabbix总结前言
大家好我是沐风晓月本文主要讲解在rocky9.0系统下实现zabbix6.0版本的部署。
号外
在大佬的指导下把csdn的专栏做了细分目前正在更新的有以下几个专栏会依次进行整理和更新如果你有更好的想法欢迎与我交流。
这份表格后面还会继续优化希望能等到你的建议学习永无止境茫茫人海一起加油努力
python全栈领跑营python地基-零基础入门篇万事开头难先进门再说语法进阶篇主要围绕多线程编程正则表达式各类项目展开爬虫入门与实战没有什么是爬虫解决不了的自动化办公篇搞定常用办公软件的自动化操作数据库开发实战篇无数据不运营搞定数据库开发数据分析篇待更新python web实战篇实现想要的网站的各种功能拥有自己的网站人工智能篇这才是我们的终极目标云原生DevOPS掌握devops技术栈CI/CD微服务和服务网格(istio详尽的讲解微服务架构分布式数据库与存储分布式是高薪必备云原生周边-组件-安全-监控云原生网络安全存储等底层技术go语言专栏go语言基础-零基础入门篇万事开头难先进门再说语法进阶篇主要围绕多线程编程正则表达式各类项目展开go web框架没有什么网站是不能用go实现的go二次开发对云原生产品做二次开发数据库开发实战篇无数据不运营搞定数据库开发数据分析篇待更新go语言高并发实战秒杀架构高并发请求一网打尽大数据架构实战大数据入门万事开头难先进门再说大数据必须之Java基础没有什么是Java解决不了的大数据其他内容待更新
一. 实验环境
操作系统 Rocky 9.1 版本
zabbix 版本 6.0.4 LTS
数据库版本 MySQL 8.0
注意
本文不涉及rocky系统的安装想学习rocky系统的安装可以参考之前的文章。rocky系统安装成功后默认没有开启ssh远程连接需要手动开启。
开启方法如图
关于zabbix官网对各版本的要求配图 确认你的实验环境的方法
操作系统
[rootmufeng ~]# cat /etc/redhat-release
Rocky Linux release 9.1 (Blue Onyx) 关闭防火墙 [rootmufenggrow ~]# systemctl stop firewalld.service 关闭selinux
[rootmufenggrow ~]# setenforce 0查看 服务器信息 [rootmufenggrow ~]# hostnamectl Static hostname: mufenggrowIcon name: computer-vmChassis: vmMachine ID: fbfae1777e0a4f338ee24764faba55ffBoot ID: 55e469d19fc44197a9ee251ca549c35eVirtualization: vmwareOperating System: Red Hat Enterprise Linux 8.0 (Ootpa)CPE OS Name: cpe:/o:redhat:enterprise_linux:8.0:GAKernel: Linux 4.18.0-80.el8.x86_64Architecture: x86-64
二. 安装zabbix过程
2.1. 安装zabbix源
系统中本身并没有zabbix源若你已经安装了epel源建议先屏蔽掉不要使用因为epel安装的包会造成冲突”
rpm -Uvh https://repo.zabbix.com/zabbix/6.0/rhel/9/x86_64/zabbix-release-6.0-4.el9.noarch.rpm由于zabbix官网的源比较慢建议换成国内其他的源
sed -i s/repo.zabbix.com/mirrors.nju.edu.cn\/zabbix/g /etc/yum.repos.d/zabbix.repo2.2 安装zabbix相关的软件
设置好zabbix源之后开始安装相关的软件包
dnf install zabbix-server-mysql zabbix-web-mysql zabbix-apache-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent -y2.3 安装数据库并启动
由于 6.0 的版本需要 mysql 8.0 以上所以需要安装最新的 mysql 源 而 类 CentOS 8 系统和 9 系统只需要将软件源更新至最新mysql 的版本就为 8。
所以我们只需要更新软件包然后使用dnf install 安装即可。
[rootmufeng ~]# dnf -y update dnf install mysql-server -y安装成功如图
启动数据库如下
systemctl start mysqld systemctl enable mysqld[rootmufeng ~]# ps -aux |grep mysqld
mysql 55275 1.8 15.2 1850808 611492 ? Ssl 01:51 1:24 /usr/libexec/mysqld --basedir/usr
root 57540 0.0 0.0 221812 2396 pts/1 S 03:08 0:00 grep --colorauto mysqld
[rootmufeng ~]#
2.4 开始初始化数据库
初始化命令如下
mysql_secure_installation此处是执行过程中所出现的所有的提示大多数地方只需要输入Y即可比如移除匿名用户移除test库等等 另外选择密码的时候可以选择low也就是设置简单的密码。
[rootmufeng ~]# mysql_secure_installationSecuring the MySQL server deployment.Connecting to MySQL using a blank password.VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?Press y|Y for Yes, any other key for No: yThere are three levels of password validation policy:LOW Length 8
MEDIUM Length 8, numeric, mixed case, and special characters
STRONG Length 8, numeric, mixed case, special characters and dictionary filePlease enter 0 LOW, 1 MEDIUM and 2 STRONG: 0
Please set the password for root here.New password: Re-enter new password: Estimated strength of the password: 50
Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : y
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
Success.Normally, root should only be allowed to connect from
localhost. This ensures that someone cannot guess at
the root password from the network.Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
Success.By default, MySQL comes with a database named test that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y- Dropping test database...
Success.- Removing privileges on test database...
Success.Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y
Success.All done!
[rootmufeng ~]#
2.5 创建数据库实例及对应的用户
这一步主要是配置让zabbix用户能够通过localhost使用密码12345678 访问 zabbix的所有表
[rootmufeng ~]# mysql -uroot -p12345678
.
mysql create database zabbix character set utf8mb4 collate utf8mb4_bin;
Query OK, 1 row affected (0.00 sec)mysql create user zabbixlocalhost identified by 12345678;
Query OK, 0 rows affected (0.01 sec)mysql grant all privileges on zabbix.* to zabbixlocalhost;
Query OK, 0 rows affected (0.01 sec)mysql set global log_bin_trust_function_creators 1;
Query OK, 0 rows affected (0.00 sec)mysql quit
Bye
主要设置了以下三个值这三个值在后面配置zabbix的配置文件的时候还要用到。 DBUserzabbix
DBPassword12345678
DBNamezabbix
2.6 导入官网提供的数据
这一步是导入官网提供的sql语句zabbix6.0和zabbix5.0提供的路径稍微有点不同其他的都一样。
[rootmufeng ~]# cd /usr/share/zabbix-sql-scripts/mysql/
[rootmufeng mysql]# ls
double.sql history_pk_prepare.sql proxy.sql server.sql.gz
[rootmufeng mysql]# zcat server.sql.gz |mysql --default-character-setutf8mb4 -uzabbix -p zabbix
Enter password:
[rootmufeng mysql]# 查看导入的数据
[rootmufeng mysql]# mysql -p12345678mysql use zabbix
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -ADatabase changed
mysql show tables;
----------------------------
| Tables_in_zabbix |
----------------------------
| acknowledges |
| actions |2.7 配置zabbix 服务的配置文件
在上一步骤中我们已经给数据库设置好了用户名和密码这一步我们要把上面设置好的数据库用户名密码和用户都写入配置文件。
先找到配置文件
[rootmufeng mysql]# find / -name zabbix_server.conf
/etc/zabbix/zabbix_server.conf
查看修改的内容
[rootmufeng mysql]# grep -v ^# /etc/zabbix/zabbix_server.conf |grep ^DB
DBNamezabbix
DBUserzabbix
DBPassword12345678
配置文件中有些内容已经存在就无需配置比如DBname默认已经存在就不需要在配置了。
2.8. 启动服务
到现在为止已经全部配置完成了接下来需要启动httpphpzabbix-server等服务
[rootmufeng ~]# systemctl restart zabbix-server zabbix-agent httpd php-fpm
[rootmufeng ~]# systemctl enable zabbix-server zabbix-agent httpd php-fpm
Created symlink /etc/systemd/system/multi-user.target.wants/zabbix-server.service → /usr/lib/systemd/system/zabbix-server.service.2.9 从网页进行安装
网页登陆地址是IP/zabbix的格式我这里登陆的方式 http://192.168.1.55/zabbix/setup.php 进入安装界面 检测各个版本是否匹配若不匹配会有提示 配置DB数据库连接 此处的密码是在zabbix配置文件中输入的DBPasswd密码 设置时区此时知道UTC8 很重要要不你还得找半天安装前的最后检查 安装完成 2.10 登陆zabbix
当出现如下图的内容
用户名默认为 Admin 密码默认为 zabbix 输入后点击登陆即可登陆到如下界面 到此所有的安装就结束了zabbix6.0部署成功。
总结 好啦这就是今天要分享给大家的全部内容了我们下期再见 博客主页mufeng.blog.csdn.net 本文由沐风晓月原创首发于CSDN博客 每一个你想要学习的念头都是未来的你像现在的你求救不辜负未来全力奔赴