How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 and 9 without using Satellite server?

How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 and 9 without using Satellite server? - Red Hat Customer Portal

 

Create a local repo with Red Hat Enterprise Linux 8/9

  • Only a RHEL 8 system, Red Hat Satellite, or a Capsule can sync RHEL 8 content correctly.
  • On RHEL8, ensure you have yum-utils-4.0.8-3.el8.noarch or higher installed so reposync correctly downloads all the packages.

Sync all enabled repositories and their repodata

# reposync -p <download-path> --download-metadata --repo=<repo id>
reposync --repoid=rhel-8-for-x86_64-highavailability-rpms --download-path=/ha_soft -n --downloadcomps --download-metadata

To sync a specific minor release

For systems registered to the CDN or Red Hat Satellite you must release lock the system with subscription-manager

# subscription-manager release --set=8.4 && rm -rf /var/cache/dnf

 At this point your system will only have access to content released for RHEL 8.0- 8.4. If you are syncing multiple minor releases, you must keep these separate from each other. For example to sync both 8.4 and 8.5:

# subscription-manager release --set=8.4 && rm -rf /var/cache/dnf
# reposync -p /var/www/html/8.4 --download-metadata --repo=<repo id>
# subscription-manager release --set=8.5 && rm -rf /var/cache/dnf
# reposync -p /var/www/html/8.5 --download-metadata --repo=<repo id>

To sync only the latest content for a specific minor release, you must set the subscription-manager version-lock. Then run reposync with the -n option to specify that you only wish to download the latest content (and not content for older minor release versions as well):

# subscription-manager release --set=8.4 && rm -rf /var/cache/dnf
# reposync -n -p /var/www/html/8.4 --download-metadata --repo=<repo id>

 

实例

复制代码
# subscription-manager repos --list
# subscription-manager list --available
# subscription-manager list --consumed

执行以下命令将订阅附加到主机:
# subscription-manager attach --pool 8a85f9a17f69ca57017faa742b2662ad
# subscription-manager refresh

附加 ha 订阅到主机后,再次尝试启用 repo:
# subscription-manager repos --enable rhel-8-for-x86_64-highavailability-rpms
复制代码

 

Redhat8 安装包

复制代码
pacemaker                        x86_64  2.1.2-4.el8_6.3                           rhel-8-for-x86_64-highavailability-rpms  466 k
 pcs                              x86_64  0.10.12-6.el8_6.2                         rhel-8-for-x86_64-highavailability-rpms  9.7 M
 clufter-bin                      x86_64  0.77.1-5.el8                              rhel-8-for-x86_64-highavailability-rpms   34 k
 clufter-common                   noarch  0.77.1-5.el8                              rhel-8-for-x86_64-highavailability-rpms   81 k
 corosync                         x86_64  3.1.5-2.el8                               rhel-8-for-x86_64-highavailability-rpms  278 k
 libknet1                         x86_64  1.22-2.el8_6                              rhel-8-for-x86_64-highavailability-rpms   80 k
 libknet1-compress-bzip2-plugin   x86_64  1.22-2.el8_6                              rhel-8-for-x86_64-highavailability-rpms   15 k
 libknet1-compress-lz4-plugin     x86_64  1.22-2.el8_6                              rhel-8-for-x86_64-highavailability-rpms   17 k
 libknet1-compress-lzma-plugin    x86_64  1.22-2.el8_6                              rhel-8-for-x86_64-highavailability-rpms   15 k
 libknet1-compress-lzo2-plugin    x86_64  1.22-2.el8_6                              rhel-8-for-x86_64-highavailability-rpms   16 k
 libknet1-compress-plugins-all    x86_64  1.22-2.el8_6                              rhel-8-for-x86_64-highavailability-rpms   11 k
 libknet1-compress-zlib-plugin    x86_64  1.22-2.el8_6                              rhel-8-for-x86_64-highavailability-rpms   15 k
 libknet1-crypto-nss-plugin       x86_64  1.22-2.el8_6                              rhel-8-for-x86_64-highavailability-rpms   20 k
 libknet1-crypto-openssl-plugin   x86_64  1.22-2.el8_6                              rhel-8-for-x86_64-highavailability-rpms   18 k
 libknet1-crypto-plugins-all      x86_64  1.22-2.el8_6                              rhel-8-for-x86_64-highavailability-rpms   11 k
 libknet1-plugins-all             x86_64  1.22-2.el8_6                              rhel-8-for-x86_64-highavailability-rpms   11 k
 libnozzle1                       x86_64  1.22-2.el8_6                              rhel-8-for-x86_64-highavailability-rpms   33 k
 pacemaker-cli                    x86_64  2.1.2-4.el8_6.3                           rhel-8-for-x86_64-highavailability-rpms  332 k
 python3-clufter                  noarch  0.77.1-5.el8                              rhel-8-for-x86_64-highavailability-rpms  351 k
 resource-agents                  x86_64  4.9.0-16.el8_6.2                          rhel-8-for-x86_64-highavailability-rpms  519 k
复制代码

 

复制代码
yum localinstall pacemaker-2.1.2-4.el8_6.3.x86_64.rpm \
                  pcs-0.10.12-6.el8_6.2.x86_64.rpm \
                  clufter-bin-0.77.1-5.el8.x86_64.rpm \
                  clufter-common-0.77.1-5.el8.noarch.rpm \
                  libknet1-1.22-2.el8_6.x86_64.rpm \
                  libknet1-compress-bzip2-plugin-1.22-2.el8_6.x86_64.rpm \
                  libknet1-compress-lz4-plugin-1.22-2.el8_6.x86_64.rpm \
                  libknet1-compress-lzma-plugin-1.22-2.el8_6.x86_64.rpm \
                  libknet1-compress-lzo2-plugin-1.22-2.el8_6.x86_64.rpm \
                  libknet1-compress-plugins-all-1.22-2.el8_6.x86_64.rpm \
                  libknet1-compress-zlib-plugin-1.22-2.el8_6.x86_64.rpm \
                  libknet1-crypto-nss-plugin-1.22-2.el8_6.x86_64.rpm \
                  libknet1-crypto-openssl-plugin-1.22-2.el8_6.x86_64.rpm \
                  libknet1-crypto-plugins-all-1.22-2.el8_6.x86_64.rpm \
                  libknet1-plugins-all-1.22-2.el8_6.x86_64.rpm \
                  libnozzle1-1.22-2.el8_6.x86_64.rpm \
                  pacemaker-cli-2.1.2-4.el8_6.3.x86_64.rpm \
                  python3-clufter-0.77.1-5.el8.noarch.rpm \
                  resource-agents-4.9.0-16.el8_6.2.x86_64.rpm  \
                  corosync-3.1.5-2.el8.x86_64.rpm
复制代码

 注意订阅过期可以使用

subscription-manager attach --auto 刷新一下

posted @   goldtree358  阅读(1235)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 单元测试从入门到精通
· 上周热点回顾(3.3-3.9)
· winform 绘制太阳,地球,月球 运作规律
点击右上角即可分享
微信分享提示