安装rocky9
阿里巴巴开源镜像站http://mirrors.aliyun.com
1、Rocky
2、初始化 防火墙
systemctl stop firewalld
systemctl disable filewalld
或者
systemctl disable firewalld --now
3、selinux
vi /etc/selinux/config
配置源 sed -e 's|^mirrorlist=|#mirrorlist=|g' \-e 's|^#baseurl=http://dl.rockylinux.org/$contentdir|baseurl=https://mirrors.aliyun.com/rockylinux|g' \ -i.bak \ /etc/yum.repos.d/rocky*.repo
//按照笔记配置,图片中有些出入
4、固定IP地址:
vim /etc/NetworkManager/system-connections/ens33.nmconnection
[ipv4]
method=manual
address=192.168.100.136/24,192.168.100.2
dns=223.5.5.5
5、重启网络服务
systemctl restart NetworkManager /
6、测试:
ping baidu.com
如果ping域名无法ping通,但是可以ping通公网IP vim /etc/resolv.conf nameserver 223.5.5.5
rocky linux 9部署zabbix6
配置官方源
# rpm -Uvh https://repo.zabbix.com/zabbix/6.4/rhel/9/x86_64/zabbix-release-6.4-2.el9.noarch.rpm
# dnf clean all
安装必要软件 //Install Zabbix server, frontend, agent
# dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-selinux-policy zabbix-agent
安装MySQL数据库
1.下载数据库yum源
# yum -y install https://dev.mysql.com/get/mysql84-community-release-el9-1.noarch.rpm
或者
# rpm -ivh https://dev.mysql.com/get/mysql84-community-release-el9-1.noarch.rpm
2.安装数据库 //本次装的8.0版本
(1)# cd /etc/yum.repos.d
# ll
# vim mysql-community-repo
将8.0 enable=1,8.4 enable=0;这样安装就是8.0版本了
(2)安装数据库
# yum -y install mysql-sever
3.启动数据库
# systemctl start mysqld
4.获取临时密码
# grep "passwd" /var/log/mysql.log
5.修改密码
# mysqladmin -p'临时密码' password'修改密码'
6.登录数据库
# mysql -p密码
7.创建zabbix数据库
mysql> create database zabbix character set utf8mb4 collate utf8mb4_bin;
mysql> create user zabbix@'%' identified by 'password';
mysql>grant all privileges on zabbix.* to zabbix@localhost;
mysql>set global log_bin_trust_function_creators = 1;
mysql> \q
On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.
导入数据
# zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
登录数据库
# mysql -p mima
mysql > set global log_bin_trust_function_creators = 0;
mysql>\q
Configure the database for Zabbix server
修改 Zabbix server 配置文件
DBPassword=password
Configure PHP for Zabbix frontend
为 Zabbix 前端配置 PHP
vim /etc/nginx/conf.d/zabbix.conf uncomment and set 'listen' and 'server_name' directives.
# listen 80;
# server_name -;
. Start Zabbix server and agent processes
.启动 Zabbix server 和 agent 进程
# systemctl restart zabbix-server zabbix-agent nginx php-fpm
# systemctl enable zabbix-server zabbix-agent nginx php-fpm
登录界面
用户名:Adimn
密码:zabiix
监控系统
首先设置自己监视自己
标签:Zabbix,rocky,linux,zabbix6,server,zabbix,systemctl,mysql,com From: https://blog.csdn.net/weixin_63223249/article/details/141896346