为编程爱好者分享易语言教程源码的资源网
好用的代理IP,游戏必备 ____广告位招租____ 服务器99/年 ____广告位招租____ ____广告位招租____ 挂机,建站服务器
好用的代理IP,游戏必备 ____广告位招租____ 服务器低至38/年 ____广告位招租____ ____广告位招租____ 挂机,建站服务器

网站首页 > 网络编程 > 其它综合 正文

制作本地 Zabbix Yum 源 - 实现离线部署

三叶资源网 2022-11-15 19:18:50 其它综合 141 ℃ 0 评论

  • 环境要求
  • 1. 与目标服务器相同系统版本的最小化安装环境
  • 2. 此环境可以访问公网
  • 配置 yum 源
  • 1. CentOS-Base.repo 使用清华大学镜像
  • 2. epel.repo 使用清华大学镜像
  • 3. mysql.repo 使用清华大学镜像 5.6 版本
  • 4.zabbix 使用阿里云镜像 4.0 版本
  • 下载所有依赖的 rpm 包
  • 1. 创建工作目录
  • 2. 下载 rpm 包至 zabbix-repo/Packages 目录
  • 3. 安装 createrepo ,并生成 yum 源
  • 目标节点部署
  • 1.将生成的 zabbix-repo 拷贝至目标节点 /var/zabbix-repo
  • 2.配置本地 zabbix-local.repo
  • 3.目标节点使用本地源进行 zabbix 部署

VersionMySQL5.6.XZabbix4.0.X

环境要求

1. 与目标服务器相同系统版本的最小化安装环境

2. 此环境可以访问公网

配置 yum 源

1. CentOS-Base.repo 使用清华大学镜像

[base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7

2. epel.repo 使用清华大学镜像

[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/$basearch/debug
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=https://mirrors.tuna.tsinghua.edu.cn/epel/7/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1

3. mysql.repo 使用清华大学镜像 5.6 版本

[mysql56-community]
name=MySQL 5.6 Community Server
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql56-community-el7/
enabled=1
gpgcheck=0
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql57-community-el7/
enabled=0
gpgcheck=0
[mysql80-community]
name=MySQL 8.0 Community Server
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql80-community-el7/
enabled=0
gpgcheck=0
[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-connectors-community-el7/
enabled=1
gpgcheck=0
[mysql-tools-community]
name=MySQL Tools Community
baseurl=https://mirrors.tuna.tsinghua.edu.cn/mysql/yum/mysql-tools-community-el7/
enabled=1
gpgcheck=0

4.zabbix 使用阿里云镜像 4.0 版本

[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/4.0/rhel/7/$basearch/
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
[zabbix-debuginfo]
name=Zabbix Official Repository debuginfo - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/zabbix/4.0/rhel/7//$basearch/debuginfo/
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX-A14FE591
gpgcheck=0
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=https://mirrors.aliyun.com/zabbix/non-supported/rhel/7/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=0

下载所有依赖的 rpm 包

1. 创建工作目录

# mkdir zabbix-repo

2. 下载 rpm 包至 zabbix-repo/Packages 目录

yum --downloadonly --downloaddir=zabbix-repo/Packages install mysql-community-server zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-get zabbix-java-gateway zabbix-proxy-mysql

3. 安装 createrepo ,并生成 yum 源

# yum install createrepo
# ls zabbix-repo/
Packages
# createrepo zabbix-repo
Spawning worker 0 with 48 pkgs
Spawning worker 1 with 48 pkgs
Workers Finished
Saving Primary metadata
Saving file lists metadata
Saving other metadata
Generating sqlite DBs
Sqlite DBs complete
# ls zabbix-repo/
Packages repodata

至此 zabbix-repo 即为包含 MySQL Zabbix 及其依赖的本地 yum 源

目标节点部署

1.将生成的 zabbix-repo 拷贝至目标节点 /var/zabbix-repo

2.配置本地 zabbix-local.repo

vi /etc/yum.repos.d/zabbix-local.repo
[zabbix-local]
name=Zabbix - Local
baseurl=file:///var/zabbix-repo/
gpgcheck=0
enabled=1

3.目标节点使用本地源进行 zabbix 部署

# yum --disablerepo=* --enablerepo=zabbix-local install mysql-community-server zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-get

原文地址: https://www.xbases.org/article.html?id=QXJ0aWNsZU5vZGU6MTM%3D


From xbases.org

来源:三叶资源网,欢迎分享,公众号:iisanye,(三叶资源网⑤群:21414575

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

百度站内搜索
关注微信公众号
三叶资源网⑤群:三叶资源网⑤群

网站分类
随机tag
抖音脚本QQ看点评论163邮箱登陆鱼刺线程池小米商城EXUI仿迅雷登陆界面资源管理器哈罗单车游戏UI源码编辑框输入提示永辉生活登陆快手did获取胆码不重复算法组合框拼接按钮API实例源码桌面小精灵百度登录PcHook答题小游戏源码
最新评论