简述

CentOS8 引入新的module软件包管理机制,下面将介绍如何部署搭建本地module源。

部署流程:

思路:

先制作nginx-1.14的module.yaml(需要微调),然后同法制作nginx-1.16的module.yaml(需要微调)。
然后将nginx-1.14与nginx-1.16的repodata都删除,去正在一个完整的repodata
然后将nginx-1.16的module.yaml去掉” document: modulemd-defaults”那部分信息,其他皆最加至nginx-1.14 module.yaml配置文件中。
最后在repodate同级目录下执行createrepo_mod . 去生成module索引。

1) 先制作nginx-1.14的module:

createrepo -v nginx-1.14/

2) 给nginx-1.14生成module.yaml文件

注意:repo2module执行前提需要确保和repodata的同级目录下:

repo2module命令再centos8已经集成了rpm默认yum安装即可, 如无请参考官方文档: https://github.com/rpm-software-management/modulemd-tools

cd nginx-1.14/
repo2module .  --module-name nginx1-wei --module-stream 1.14  --module-version 123   --module-context xyz
【参数解析】
--module-name设置module的名
--module-stream 1.14 设置module-stream
--module-version 设置module-version
--module-context xyz 设置--module-context

执行完上面操作后会在当前目录下生成modules.yaml文件 module.yaml微调修改如下

[root@iZ2xxxxxxacZ module]# cat modules.yaml
---
document: modulemd-defaults
version: 1
data:module: nginx-weistream: "1.14"        #这里设置的话,就决定在dmf module list的显示1.14 [d]profiles:1.14: [everything]  #这里的everthing需要改成对应的流,例如guding或者devel#如果还有的其他版本的module可以设置例如:1.16: [xuanzhe]

...  #<上面这些设置不同nginx的不同版本>
---
document: modulemd
version: 2
data:name: nginx-weistream: "1.14"version: 123context: xyzsummary: <auto-generated module summary>description: >-<auto-generated module description>license:module:- MITcontent:- <FILL THIS IN>profiles:everything:  #这里erverthing改成guding(流)rpms:- nginx- nginx-all-modules- nginx-filesystem- nginx-mod-http-image-filter- nginx-mod-http-perl- nginx-mod-http-xslt-filter- nginx-mod-mail- nginx-mod-streamapi:rpms:- nginx- nginx-all-modules- nginx-filesystem- nginx-mod-http-image-filter- nginx-mod-http-perl- nginx-mod-http-xslt-filter- nginx-mod-mail- nginx-mod-streamcomponents:rpms:nginx:rationale: Present in the repositoryartifacts:rpms:- nginx-1:1.14.1-9.module_el8.0.0+184+e34fea82.aarch64- nginx-all-modules-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch- nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch- nginx-mod-http-image-filter-1:1.14.1-9.module_el8.0.0+184+e34fea82.aarch64- nginx-mod-http-perl-1:1.14.1-9.module_el8.0.0+184+e34fea82.aarch64- nginx-mod-http-xslt-filter-1:1.14.1-9.module_el8.0.0+184+e34fea82.aarch64- nginx-mod-mail-1:1.14.1-9.module_el8.0.0+184+e34fea82.aarch64- nginx-mod-stream-1:1.14.1-9.module_el8.0.0+184+e34fea82.aarch64
...

3) 制作nginx-1.16的module(方法同上):

4) 合并nginx-1.14与module-1.16的module:

  删除nginx-1.14/repodate nginx-1.16/repodata重新生成两仓库的yum索引将nginx-1.16的module.yaml配置去掉” document: modulemd-defaults”那部分信息,其他的配置都追加到nginx-1.14的module.yaml配置文件中,完整如下
[root@icbbbbbxxx module]# cat /root/module/modules.yaml
---
document: modulemd-defaults
version: 1
data:module: nginx-weistream: "1.14"profiles:1.14: [guding]1.16: [xuanze]
...
---
document: modulemd
version: 2
data:name: nginx-weistream: "1.14"version: 123context: f32summary: <auto-generated module summary>description: >-<auto-generated module description>license:module:- MITcontent:- <FILL THIS IN>profiles:guding:rpms:- nginx- nginx-all-modules- nginx-filesystem- nginx-mod-http-image-filter- nginx-mod-http-perl- nginx-mod-http-xslt-filter- nginx-mod-mail- nginx-mod-streamapi:rpms:- nginx- nginx-all-modules- nginx-filesystem- nginx-mod-http-image-filter- nginx-mod-http-perl- nginx-mod-http-xslt-filter- nginx-mod-mail- nginx-mod-streamcomponents:rpms:nginx:rationale: Present in the repositoryartifacts:rpms:- nginx-1:1.14.1-9.module_el8.0.0+184+e34fea82.aarch64- nginx-all-modules-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch- nginx-filesystem-1:1.14.1-9.module_el8.0.0+184+e34fea82.noarch- nginx-mod-http-image-filter-1:1.14.1-9.module_el8.0.0+184+e34fea82.aarch64- nginx-mod-http-perl-1:1.14.1-9.module_el8.0.0+184+e34fea82.aarch64- nginx-mod-http-xslt-filter-1:1.14.1-9.module_el8.0.0+184+e34fea82.aarch64- nginx-mod-mail-1:1.14.1-9.module_el8.0.0+184+e34fea82.aarch64- nginx-mod-stream-1:1.14.1-9.module_el8.0.0+184+e34fea82.aarch64
...
---   #nginx-1.16的mudule.yaml配置信息加入了下面
document: modulemd
version: 2
data:name: nginx-weistream: "1.16"version: 456context: j23summary: <auto-generated module summary>description: >-<auto-generated module description>license:module:- MITcontent:- <FILL THIS IN>profiles:xuanze:  #如果想增加类似common devel这样的流,就在api上面在新增数据就行rpms:- nginx- nginx-all-modules- nginx-filesystem- nginx-mod-http-image-filter- nginx-mod-http-perl- nginx-mod-http-xslt-filter- nginx-mod-mail- nginx-mod-streamapi:rpms:- nginx- nginx-all-modules- nginx-filesystem- nginx-mod-http-image-filter- nginx-mod-http-perl- nginx-mod-http-xslt-filter- nginx-mod-mail- nginx-mod-streamcomponents:rpms:nginx:rationale: Present in the repositoryartifacts:rpms:- nginx-1:1.16.1-2.module_el8.4.0+820+127618ce.1.aarch64- nginx-all-modules-1:1.16.1-2.module_el8.4.0+820+127618ce.1.noarch- nginx-filesystem-1:1.16.1-2.module_el8.4.0+820+127618ce.1.noarch- nginx-mod-http-image-filter-1:1.16.1-2.module_el8.4.0+820+127618ce.1.aarch64- nginx-mod-http-perl-1:1.16.1-2.module_el8.4.0+820+127618ce.1.aarch64- nginx-mod-http-xslt-filter-1:1.16.1-2.module_el8.4.0+820+127618ce.1.aarch64- nginx-mod-mail-1:1.16.1-2.module_el8.4.0+820+127618ce.1.aarch64- nginx-mod-stream-1:1.16.1-2.module_el8.4.0+820+127618ce.1.aarch64
...

5) 生成module索引:

在repodata的同级目录下执行createrepo_mod . 来生成module索引

centos8系module软件包管理仓库部署相关推荐

  1. CentOS6.4之Linux软件包管理

    二进制软件包管理(RPM.YUM) 源代码包安装 脚本安装(Shell或Java脚本) Debian系Linux软件包管理简介 一.RPM包管理 RPM软件包的一个例子: sudo-1.8.6p3-7 ...

  2. helm部署仓库中没有的包_Kubernetes的Helm软件包管理器简介

    helm部署仓库中没有的包 Before we dive into the Helm package manager, I'm going to explain some key concepts t ...

  3. Docker harbor私有仓库部署与管理

    Docker harbor私有仓库部署与管理. 前言 一.什么是Harbor 二.Harbor的特性 三.Harbor的构成 四.Harbor部署 4.1 环境准备 4.2 部署Docker Comp ...

  4. 软件包管理以及如何创建本地yum仓库

    注:该文章中"+"等于 空格."跟" = 无空格. 软件包管理以及如何创建本地yum仓库 rpm下载安装,升级,卸载和查询 如何建立yum仓库 把光盘做成本地y ...

  5. 软件包管理 之 Fedora Extras(Fedora 计划的扩充资源) rpm.livna.org软件仓库的介绍和应用...

    作者:北南南北 来自:LinuxSir.Org 提要:rpm.livna.org 是一个重要的Fedora 扩充和增强资源,资源更新较快:是我们必用的资源之一:拥有apt和yum源:为Fedora c ...

  6. Docker容器之harbor私有仓库部署与管理

    Docker容器之harbor私有仓库部署与管理 前言 一.Harbor概述 二.Harbor的特性 三.Harbor的构成 四.Harbor私有仓库搭建 (1)安装docker-compose (2 ...

  7. 大数据与云计算学习计划 (一) 云计算系统管理 6 Linux中RPM软件包管理操作 、 Yum软件包仓库操作(概念与实操)

    大数据与云计算学习计划 (一) 云计算系统管理 6 Linux中RPM软件包管理操作 . Yum软件包仓库操作(概念与实操) 一.RPM软件包管理 1.常见软件包类型 2.RPM包文件名特征 3.RP ...

  8. 【Linux扩展】五、软件包管理 ——RPM(RedHat Package Manager,RedHat软件包管理工具)查询与卸载、YUM仓库配置

    软件包管理 5.1 RPM 5.1.1 RPM 概述 5.1.2 RPM 查询命令(rpm -qa) 5.1.3 RPM 卸载命令(rpm -e) 5.2 YUM 仓库配置 5.2.1 YUM 概述 ...

  9. RPM(红帽软件包管理器)和Yum软件仓库

    1.红帽软件包管理器 RPM机制是为了解决在校效.安装.卸载.查询.升级等管理软件操作过难设计的. 常用RPM软件包命令: 1)安装软件命令格式:rpm -ivh filename.rpm 2)升级软 ...

最新文章

  1. MUV LUV EXTRA 2019CCPC秦皇岛站J题 KMP
  2. 一些关于Java的句子
  3. 奇或偶数行高亮显示及鼠标划过高亮显示类
  4. 【MongoDB】增删改查基本操作
  5. 汉拓中国CRM评估报告简介
  6. SessionAttributes介绍
  7. 数组|leetcode209.长度最小的子数组
  8. c语言node类型_高阶宏的妙用技法,C语言宏你所不知道的聪明技巧
  9. 蒂森电梯服务器显示4480,成都电梯豪宅市场分析专题报告.docx
  10. azure 导入 bak_使用Azure Data StudioSQL Server数据导入
  11. hdu 4057(ac自动机+状态压缩dp)
  12. ajax后台重定向会返回什么_处理jquery ajax重定向
  13. 青云、金山云亏损IPO,为何中小云厂商“恰饭”这么难?
  14. PPT中导出高分辨率图片的方法
  15. 修改centos系统时间
  16. 程序员到底要不要读研,过来人给你几点建议!
  17. 高德地图放图钉_Google地图中的图钉掉了-如何定位和删除图钉
  18. 学习Spherical Harmonics的简记
  19. 微信安卓最新 7.0.22 版本来了,赶紧抢先内测体验吧!美颜,连麦,刷礼物统统来了...
  20. Java语法基本概念

热门文章

  1. 替人出头的大哥淘宝网投诉未果,当事人蚂蚁OceanBase会出来吗?
  2. 新年最该坚持的三件事:运动,读书,思考
  3. 修改Toolbar图标颜色
  4. Mac系统硬盘复制之后启动慢的问题
  5. kindeditor获取html,kindeditor肿么获取获取HTML数据
  6. 西乔:我在过着很奢侈的生活[转]
  7. Android百度地图——SDK版本v2.0.0初探
  8. BAT批处理文件语法教程及使用方法
  9. android 平板串口调试,实验六:FSPAD_702平板串口通信实验
  10. matlab的series,matlabseries基本用法