Sie sind auf Seite 1von 28

2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using

t using Satellite server? - Red Hat Custo…

C U S T O M E R (https://access.redhat.com/)
P O R TA L

How to create a local mirror of the latest update for


Red Hat Enterprise Linux 5, 6, 7, 8 without using
Satellite server?
$ SOLUTION VERIFIED - Updated November 8 2019 at 9:04 AM - English ()

Environment
Red Hat Enterprise Linux 8
Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 6
Red Hat Enterprise Linux 5
Red Hat Network (RHN)
Red Hat Subscription Management (RHSM)
reposync

Issue
What is reposync utility and how to use it?
How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, or 8
without using Satellite server
Need to download all packages / rpms from specific channel locally
How to make a local repository

Resolution
RHEL 5,6,7

Create a basic repository


Create a repository that allows clients to install groups
Modify repodata to identify which packages are security related

RHEL 8

Sync a RHEL 8 repository


https://access.redhat.com/solutions/23016 1/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

Install the required


C U S T O packages
M E R (https://access.redhat.com/)

P O R TA L
Install the "yum-utils" and "createrepo" packages on the registered system.

# yum install yum-utils createrepo

Create a basic local repository


NOTE: Change <repo-id> to the repository you intend to sync

Sync all the packages from a specified repository to a specified directory

# reposync --gpgcheck -l --repoid=<repo-id>


for example:
# reposync --gpgcheck -l --repoid=rhel-6-server-rpms --download_path=/var/www/html

In the targeted directory, there will be a new directory named after the Repository ID. All
the downloaded packages will be inside this directory.

# cd /var/www/html/<repo-id>
# createrepo -v /var/www/html/<repo-id>

Create a local repository that allows clients to use groups


How to download all the metadata for the repository that is being synced which will allow the use
of various plugins such as 'yum groupinstall'

On RHEL6 and later, reposync supports the --download-metadata and --downloadcomps


options. For example:

# reposync --gpgcheck -l --repoid=repo-id --downloadcomps --download-metadata


for example:
# reposync --gpgcheck -l --repoid=rhel-6-server-rpms --download_path=/var/www/html --
downloadcomps --download-metadata

To have access to the group data for the newly synced repo, please run the createrepo
command as follows:

# cd /var/www/html/<repo-id>
# createrepo -v /var/www/html/<repo-id>/ -g comps.xml 
https://access.redhat.com/solutions/23016 2/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

C U S T O M E R (https://access.redhat.com/)
P O R TA L

Modify the repodata to define which packages are security
related.
These steps require that the createrepo command has already been run.

# yum clean all


# yum list-sec
# find /var/cache/yum/ -name updateinfo.xml ##For RHEL 5 use '-name
*updateinfo.xml*'

From the find command above, identify the updateinfo.xml that matches the that you ran
reposync against and move that file into your repodata directory.

# mv updateinfo.xml /var/www/html/<repo-id>/repodata/updateinfo.xml
# modifyrepo /var/www/html/<repo-id>/repodata/updateinfo.xml /var/www/html/<repo-
id>/repodata

How to update security Erratas on system which is not connected to internet ?


(https://access.redhat.com/solutions/55654)

Create a local repo with Red Hat Enterprise Linux 8


Ensure you have yum-utils-4.0.8-3.el8.noarch or higher installed so reposync correctly
downloads all the packages.
RHSA-2019:3583 (https://access.redhat.com/errata/RHSA-2019:3583)
Sync all enabled repositories and their repodata

# reposync -p <download-path> --download-metadata --repo=<repo id>

NOTE:

createrepo is not required for RHEL 8. reposync will download everything including the
repodata.

NOTE:

To keep the sync current, for example, cronjobs can be used. The createrepo command
supports --update to efficiently update existing repositories.
The locally created repository is typically used by other RHEL clients via LAN, for example
via HTTP/HTTPS (for example provided by the apache webserver which is part of RHEL),
https://access.redhat.com/solutions/23016 3/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

via FTP (i.e. vsftpd) or NFS (nfs-utils package). Share


C U S T O M E R (https://access.redhat.com/)
(https://access.redhat.com/node/3176811/#share)
P O R TA L this local repository with the offline 
systems to update the offline systems.
reposync utility can only mirror repositories which the system is entitled to.
Accessing multiple repositories without the appropriate, active, subscription of RHEL
version on 'single' system is not supported and will be considered as abuse of subscription.
Related information How do I delete old packages in local repository server?
(https://access.redhat.com/solutions/4011571)

Root Cause
Red Hat provides a utility called reposync which can be used to download the packages from
the CDN. In order to download all packages from a specific channel, the system should be
subscribed to that channel. If the system is not subscribed to the required channel then
reposync will not be able to download and sync those packages on local system.

Diagnostic Steps
createrepo-0.9.9-26.el6.noarch which is part of RHEL6.9GA has an issue regarding
--update , refer to bz1434369 (https://bugzilla.redhat.com/show_bug.cgi?id=1434369) for
details.

Product(s) Red Hat Network (/taxonomy/products/red-hat-network)

Red Hat Enterprise Linux (/taxonomy/products/red-hat-enterprise-linux)

Component anaconda (/components/anaconda) yum (/components/yum)

Category Learn more (/category/learn-more)

Tags createrepo (/tags/createrepo) rhel_5 (/tags/rhel_5) rhel_6 (/tags/rhel_6)

rhel_7 (/taxonomy/tags/rhel7) rhel_8 (/taxonomy/tags/rhel8) rhn (/tags/rhn) sync (/tags/sync)

yum (/tags/yum)

This solution is part of Red Hat’s fast-track publication program, providing a huge library of
solutions that Red Hat engineers have created while supporting our customers. To give you the
knowledge you need the instant it becomes available, these articles may be presented in a raw
and unedited form.

People who viewed this solution also viewed 


https://access.redhat.com/solutions/23016 4/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

C U S T O M E R (https://access.redhat.com/)
When using reposync to update a local repo, why is it downloading all of the packages 
P O R TA L
again?

Solution - 9 Mar 2019

Why yum grouplist "" does not list the groups in repository in Red Hat Enterprise Linux
7?

Solution - 21 Apr 2017

reposync fails when it can not retrieve repository metadata

Solution - 28 Feb 2014

79 Comments
5 August 2011 12:32 PM (https://access.redhat.com/solutions/23016#comment-332103)
GA gao_whited (/user/506863)
(/user/506863)
How can one do this for multiple software channels and architectures ?  I am trying
COMMUNITY to maintain servers and workstations in both 32 and 64 bit and I need to try to do it
MEMBER
without Satellite.
40 Points

≤ Reply (/Ajax_comments/Reply/23016/332103)

8 August 2011 5:56 AM (https://access.redhat.com/solutions/23016#comment-332203)


MT Martijn ten Heuvel (/user/1119233)
(/user/1119233)
Hi
ACTIVE
CONTRIBUTOR
,
135 Points
Try another repoid:


https://access.redhat.com/solutions/23016 5/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

reposync C--gpgcheck (https://access.redhat.com/)


U S T O M E R -l --repoid=rhel-x86_64-server-5 --download_path=/test/path
P O R TA L

Could just change this to something like (but this is a guess..):

reposync --gpgcheck -l --repoid=rhel-i386-server-5 --download_path=/test/path2

Createrepo in both directories, configure a service to serve your rpm's and you're
ready to go.

≤ Reply (/Ajax_comments/Reply/23016/332203)

9 August 2011 6:49 AM (https://access.redhat.com/solutions/23016#comment-332273)


AN annamalai.vrv (/user/1661943)
(/user/1661943)
The below command not work on rhel5 32 bit.
NEWBIE
reposync --gpgcheck -l --repoid=rhel-x86_64-server-5 --
5 Points
download_path=/test/path

pls let me know y it won't work

Thanks

≤ Reply (/Ajax_comments/Reply/23016/332273)

7 April 2016 5:13 PM (https://access.redhat.com/solutions/23016#comment-1034421)


BK Brent Kimberley (/user/13724271)
(/user/13724271)
Correction: sudo reposync --gpgcheck -l --repoid=rhel-x86_64-server-5 --
COMMUNITY download_path=/test/path
MEMBER

40 Points
≤ Reply (/Ajax_comments/Reply/23016/1034421)

9 August 2011 7:36 AM (https://access.redhat.com/solutions/23016#comment-332253)


PM Paresh Mutha (/user/5273)
(/user/5273)reposync would pull the contents from RHN only when the system needs to be
RED HAT
subscribed to the channels.  As you are trying to sync x86_64 channel on a i386
GURU
(32bit) system, this will not work because system is not subscribed to rhel-x86_64-
3594
server-5 channel.
Points

I have updated the article accordingly.



Thanks !
https://access.redhat.com/solutions/23016 6/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

≤ Reply (/Ajax_comments/Reply/23016/332253)
C U S T O M E R (https://access.redhat.com/)
P O R TA L

9 August 2011 11:55 AM (https://access.redhat.com/solutions/23016#comment-332283)
GA gao_whited (/user/506863)
(/user/506863)
OK, but is it possible to get both a 32 bit and 64 bit channel repo sync'ed onto a 64
COMMUNITY bit machine ?
MEMBER

40 Points For the purposes of a repo-server, can one subscribe one physical box to multiple
channels ?

≤ Reply (/Ajax_comments/Reply/23016/332283)

11 August 2011 6:03 AM (https://access.redhat.com/solutions/23016#comment-332323)


PM Paresh Mutha (/user/5273)
(/user/5273)No, system cannot subscribe to multiple arch base channels (example RHEL 5 32bit
RED HAT
and 64bit).
GURU

3594 As reposync has the ability to sync packages only from the channels/repositories to
Points which it has access, it is not possible sync multiple arch channels from RHN on the
same system.

You can refer https://access.redhat.com/kb/docs/DOC-9744 which has the details


on setting up repository from RHEL DVD iso. This could help you setup multiple
channel repositories on a single system but it won't have latest errata's after the
recent RHEL update release. (example RHEL 5.7)

≤ Reply (/Ajax_comments/Reply/23016/332323)

23 April 2013 3:51 PM (https://access.redhat.com/solutions/23016#comment-483803)


CA carl.chenet@ingenico.com (/user/418403)
(/user/418403)
What about subscribing to multiple version channels (RHEL 5 and RHEL 6) ? This is
NEWBIE for a spacewalk server.
5 Points
≤ Reply (/Ajax_comments/Reply/23016/483803)

14 December 2014 7:14 PM (https://access.redhat.com/solutions/23016#comment-860593)

Walid Shaari (/user/702353)


(/user/702353)
can one separate the errata's per minor release, e.g. 5.9 errates, 5.10 errates, 5.11
PRO errates, ..etc?
738 
Points
https://access.redhat.com/solutions/23016 7/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

≤ Reply (/Ajax_comments/Reply/23016/860593)
C U S T O M E R (https://access.redhat.com/)
P O R TA L

2 December 2015 11:29 PM (https://access.redhat.com/solutions/23016#comment-992683)
TB Thomas Bludau (/user/2756823)
(/user/2756823)
Did anyone knows a solution for the different minor releases?
NEWBIE

5 Points ≤ Reply (/Ajax_comments/Reply/23016/992683)

28 February 2016 1:48 AM (https://access.redhat.com/solutions/23016#comment-1019361)


SR Steven Roberts (/user/7094273)
(/user/7094273)
FYI, you can use reposync to pull from content sets the machine you are running
COMMUNITY from is not directly subscribed to.
MEMBER

39 Points you need to extract the URL's from your entitlement cert (rct works decebnt for
this). then make a custom yum.conf with the URL, your client cert and such and
finally run reposync giving it a path to download to

was able to run reposync just fine to slurp down rhels7 content sets while running on
a rhels6 install util box.

≤ Reply (/Ajax_comments/Reply/23016/1019361)

6 October 2011 2:32 PM (https://access.redhat.com/solutions/23016#comment-334193)


MA matt.hilgers@clickbank.com (/user/653613)
(/user/653613)
where can I find other channel-ids or repoids that are valid names?
NEWBIE

5 Points ≤ Reply (/Ajax_comments/Reply/23016/334193)

1 November 2011 8:24 PM (https://access.redhat.com/solutions/23016#comment-335433)


RH rhardy@entrust.com (/user/219363)
(/user/219363)
Under el6 you can see all the available channels using rhn-channel -L which is part
NEWBIE of the rhn-setup package. It probably exists on el5 too.
5 Points
≤ Reply (/Ajax_comments/Reply/23016/335433)

14 September 2012 2:37 AM (https://access.redhat.com/solutions/23016#comment-400783)


VP Vincent Passaro (/user/57473)
(/user/57473)
So this is a total fail. I have to install a separate system for each Architecture just to
ACTIVE be able to sync updates. 
CONTRIBUTOR

https://access.redhat.com/solutions/23016 8/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

205 Worthles.... Even M$ doesn't require this nonsense.


Points C U S T O M E R (https://access.redhat.com/)
P O R TA L

≤ Reply (/Ajax_comments/Reply/23016/400783)

2 April 2013 11:19 PM (https://access.redhat.com/solutions/23016#comment-477383)


SM Sidney Markowitz (/user/1017483)
(/user/1017483)
I'm trying this and it mostly works, but now I am getting a series of errors on some
COMMUNITY packages (but not most of them) on the different channels, such as this example. I
MEMBER
tried doing a yum clean and running reposync again, but it continues to get the
70 Points
same errors on the same set of packages.

The reposync command in the script I use looks like (I noticed that you use -g here. I
did not have that, but I added it and it made no difference as one would expect. Also
removing -q does not add anything useful to the output messages. Adding the -t
option also makes no difference)

~~~

reposync -q -n -a x86_64 -d -m -l -p ${base_dir} \


-r rhel-x86_64-server-6 \
-r rhel-x86_64-server-fastrack-6 \
-r rhel-x86_64-server-optional-6 \
-r rhel-x86_64-server-optional-fastrack-6

~~~

For each of a number of certain packages, consistent which ones, but most
packages do not produce these messages, I get

~~~

Could not retrieve package batik-1.7-6.3.el6.x86_64. Error was failed to retrieve


getPackage/batik-1.7-6.3.el6.x86_64.rpm from rhel-x86_64-server-6
error was [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 416
Requested Range Not Satisfiable"

~~~

Any advice about this?

≤ Reply (/Ajax_comments/Reply/23016/477383)

3 April 2013 2:02 AM (https://access.redhat.com/solutions/23016#comment-477453)


SM Sidney Markowitz (/user/1017483)

(/user/1017483)
https://access.redhat.com/solutions/23016 9/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…
COMMUNITY
I don't know whether this cleared it or if the rhn server was busy cleaning up a
C U S T O M E R (https://access.redhat.com/)
MEMBER

70 Points problem while


P O RITA
was 
L doing this, but when I tried yumdownloader of a package that
had this error it downloaded ok, and then running reposync again has no more errors
on the channel that contained that package. Then I did yumdownloader of another
package that still had the error, and running reposync again had no error from that
package and some others, but still had the error on some other packages in the
same channel, i.e., the use of yumdownloader did not fix one entire channel as it
appeared to from the first time I did it. However each time I ran yumdownloader to
get a package that had this error it downloaded ok and then the error did not repeat
when I ran reposync again, repeating until reposync runs with no errors at all.

≤ Reply (/Ajax_comments/Reply/23016/477453)

21 October 2013 10:46 AM (https://access.redhat.com/solutions/23016#comment-560563)


KS Kristof-Imre Szabo (/user/5780143)
(/user/5780143)
Is there anything additional required to sync security errata? Can
NEWBIE reposync/createrepo manage this? We would like to use the local repo for security
5 Points updates as well.

≤ Reply (/Ajax_comments/Reply/23016/560563)

20 January 2014 5:32 PM (https://access.redhat.com/solutions/23016#comment-692313)


DU DumitruC (/user/2044113)
(/user/2044113)
Hi,
NEWBIE
Is it possible to subscribe and mirror 2 different releases (on the same architecture -
5 Points
x86_64).
So I can have one repo for rhel 5.x and another for 6.x; both on the same machine
though.

Thanks much,
Dumitru

≤ Reply (/Ajax_comments/Reply/23016/692313)

27 May 2014 8:22 PM (https://access.redhat.com/solutions/23016#comment-762463)

Magdy Mahmoud (/user/1195083)


(/user/1195083)
It looks like 'createrepo' no longer comes with yum-utils (if it ever did). It's now in a
COMMUNITY separate package named createrepo. You may want to update this solution with the
MEMBER
additional step of running 'yum install createrepo'.
66 Points

https://access.redhat.com/solutions/23016 10/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

≤ Reply (/Ajax_comments/Reply/23016/762463)
C U S T O M E R (https://access.redhat.com/)
P O R TA L

3 December 2018 8:53 AM (https://access.redhat.com/solutions/23016#comment-1393551)

Sayan Das (/user/24898401)


(/user/24898401)
To add one , along with createrepo two more packages will be required i.e deltarpm
RED HAT
& python-deltarpm.
ACTIVE
CONTRIBUTOR

153 Points
≤ Reply (/Ajax_comments/Reply/23016/1393551)

24 June 2014 2:59 PM (https://access.redhat.com/solutions/23016#comment-777483)


GB gberman (/user/7545063)
(/user/7545063)
Hi,
COMMUNITY Is it possible to follow this with RHEL 7?
MEMBER

33 Points Thanks!

≤ Reply (/Ajax_comments/Reply/23016/777483)

5 August 2014 12:28 PM (https://access.redhat.com/solutions/23016#comment-799813)

Akemi Yagi (/user/856543)


(/user/856543)
For better performance, one may want to give createrepo_c a try instead of
GURU createrepo. It is available from the EPEL repository (therefore not officially
3184 supported by Red Hat).
Points
≤ Reply (/Ajax_comments/Reply/23016/799813)

21 September 2014 12:12 PM (https://access.redhat.com/solutions/23016#comment-820243)


JC Jameson Collins (/user/6412343)
(/user/6412343)
Is there a way to download the original repodata folder, or the groups xml file?
NEWBIE

5 Points ≤ Reply (/Ajax_comments/Reply/23016/820243)

30 September 2014 11:45 PM (https://access.redhat.com/solutions/23016#comment-827373)


ML Matthew Little (/user/1754433)
(/user/1754433)
What is the recommended way to disable the RHN base channel of systems that are
NEWBIE using a local repo created in this manner so that package updates only come from
5 Points the local repo?

≤ Reply (/Ajax_comments/Reply/23016/827373)
https://access.redhat.com/solutions/23016 11/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

C U S T O M E R (https://access.redhat.com/)
29 May 2015 12:19 PM (https://access.redhat.com/solutions/23016#comment-924973) 
MY
P O R TA L
Mahesh Yellapu (/user/9472923)
(/user/9472923)
Hi Matthew,
NEWBIE
You can disable it by enable=0 in /etc/yum/pluginconf.d/rhnplugin.conf
5 Points

≤ Reply (/Ajax_comments/Reply/23016/924973)

15 August 2015 2:43 AM (https://access.redhat.com/solutions/23016#comment-954493)


UA Unix Admin (/user/1539973)
(/user/1539973)
The reposync option --download-metadata is not available on RHEL5's version of
NEWBIE reposync. This is needed on RHEL6 (and above?) to pull security metadata.
5 Points
Is there an equivalent on Redhat 5?

≤ Reply (/Ajax_comments/Reply/23016/954493)

27 August 2015 5:24 PM (https://access.redhat.com/solutions/23016#comment-958743)


CO contact@cfengine.com (/user/5318863)
(/user/5318863)
I would like to know the same. I am in the process of mirroring "rhel-5-server-rpms"
NEWBIE which I suppose is the relative equivalent of "rhel-x86_64-server-5" in these
17 Points instructions.

I get an error that --download-metadata is an invalid option. --downloadcomps


works, but if I understand correctly that only contains the package groupings.

How do I download the security metadata so that I can use the yum-security plugin
with this mirror?

I didn't see any channels for rhel-x86_64-server-5 in the output of


subscription-manager repos --list | grep "Repo ID"

How to view available repositories:


https://access.redhat.com/documentation/en-
US/Red_Hat_Subscription_Management/1/html/RHSM/entitlements-and-
yum.html#viewing-repos

≤ Reply (/Ajax_comments/Reply/23016/958743)

1 September 2015 10:09 PM (https://access.redhat.com/solutions/23016#comment-960453)


FA Firas AlShafei (/user/4037303) 
https://access.redhat.com/solutions/23016 12/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

(/user/4037303)
Here's what I've been doing to keep the metadata. It's not elegant but it works by
C U S T O M E R (https://access.redhat.com/)
COMMUNITY just copying
P Othe
R TAmetadata
L from the local cache every time. 
MEMBER

20 Points Let me know if it works for you :)

#!/bin/bash
#==============================================================================
# Title : syncRepo.sh
#
# Description : Synchronizes the local RHEL repository to RHN
#
# Author : Firas AlShafei
#
# Version : v1.1
#
#==============================================================================
RELEASE=rhel-x86_64-server-5

# Clear YUM cache


yum clean all

# Create directory structure


mkdir -p /MYPATH/RHEL5_REPO/$RELEASE

# Remove previous metadata from our repository


rm -f /MYPATH/RHEL5_REPO/$RELEASE/repodata/*

# Sync RHN repo to our local folder


reposync -p /MYPATH/RHEL5_REPO/ --repoid=$RELEASE -l

# Create metadata
yum --disablerepo=* --enablerepo=$RELEASE makecache

# Copy metadata from cache to our local repo


cp -f /var/cache/yum/$RELEASE/*.xml* /MYPATH/RHEL5_REPO/$RELEASE/repodata/

≤ Reply (/Ajax_comments/Reply/23016/960453)

1 September 2015 10:06 PM (https://access.redhat.com/solutions/23016#comment-960443)


FA Firas AlShafei (/user/4037303)
(/user/4037303)
duplicate response - please delete
COMMUNITY
MEMBER
≤ Reply (/Ajax_comments/Reply/23016/960443)
20 Points

14 September 2015 1:06 PM (https://access.redhat.com/solutions/23016#comment-964753)


MC Mihail Ceban (/user/1963513)
(/user/1963513)
How run sync on server ? 
https://access.redhat.com/solutions/23016 13/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…
NEWBIE
≤ Reply (/Ajax_comments/Reply/23016/964753)
C U S T O M E R (https://access.redhat.com/)
10 Points
P O R TA L

14 September 2015 1:09 PM (https://access.redhat.com/solutions/23016#comment-964763)


MC Mihail Ceban (/user/1963513)
(/user/1963513)
what and how to configure the client need?
NEWBIE

10 Points ≤ Reply (/Ajax_comments/Reply/23016/964763)

29 January 2016 7:25 AM (https://access.redhat.com/solutions/23016#comment-1009521)


RD ramesh Devasurmatt (/user/662973)
(/user/662973)
How we can download the RPM's when we are nor exposed to internet? The solution
COMMUNITY says when you don't have satellite server.
MEMBER

23 Points Pls provide the solution if we don't have both the alternatives(rhn connectitivty and
satellite server).

≤ Reply (/Ajax_comments/Reply/23016/1009521)

29 January 2016 9:33 AM (https://access.redhat.com/solutions/23016#comment-1009581)

Christian Horn (/user/12843)


(/user/12843)
Indeed, this solutions requirement is always that somewhere there is internet
RED HAT
connectivity. I am not aware that we are offering services like "shipping USB sticks"
GURU
or "dvd-media" with these updates. Please open a case with Red Hat support to
3740
discuss possible alternatives. Seeing you posting this comment makes be confident
Points
there might be some level of internet connectivity.

≤ Reply (/Ajax_comments/Reply/23016/1009581)

8 June 2016 7:20 PM (https://access.redhat.com/solutions/23016#comment-1057321)


BK Brent Kimberley (/user/13724271)
(/user/13724271)
Hi Christian. What are the least privileges that successfully download rpms and
COMMUNITY metadata without flipping bits? (I would like to download rpms and metadata from a
MEMBER
limited user account. )
40 Points

Regarding alternatives: Does Red Hat supply any (metadata) distribution schemes
or interfaces which are (loosely) analogous to https://support.microsoft.com/en-
ca/kb/913086?

Thanks!

https://access.redhat.com/solutions/23016 14/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

≤ Reply (/Ajax_comments/Reply/23016/1057321)
C U S T O M E R (https://access.redhat.com/)
P O R TA L

9 June 2016 2:39 AM (https://access.redhat.com/solutions/23016#comment-1057491)

Christian Horn (/user/12843)


(/user/12843)
Hi,
RED HAT

GURU
What are the least privileges that successfully download rpms and metadata
3740
without flipping bits? (I would like to download rpms and metadata from a
Points
limited user account. ) I think the user needs to be able to register a system
under the account and be able to receive packages. The latter part can be
verified in having the user download a package from the customer portal
download area. The metadata pieces are included in this. I think the required
permissions are at this point not documented more verbosely. One could
either try this out (restrict an account as far as possible) or have us investigate
and document this with a customer center case.

Regarding alternatives: Does Red Hat supply any (metadata) distribution


schemes or interfaces which are (loosely) analogous to
https://support.microsoft.com/en-ca/kb/913086? Our media of minor
releases could be seen as "iso containing collections of the known fixes". These
contain stability and security fixes, and can additionally be used to install new
systems. So, for example when a RHEL6.5 was installed, the RHEL6.6GA,
6.7GA and 6.8GA media can serve as iso containing fixes.

As for interfaces to access data about security fixes in an automated way, "yum
security" on an installed system or https://access.redhat.com/solutions/4161
(describing our OVAL data) are a good start.

≤ Reply (/Ajax_comments/Reply/23016/1057491)

21 March 2017 4:47 PM (https://access.redhat.com/solutions/23016#comment-1158681)


BK Brent Kimberley (/user/13724271)
(/user/13724271)
Hi Christian, Attached please find the logic to refresh repository metadata.
COMMUNITY
MEMBER
Can it be simplified?
40 Points
Best Regards, Brent


https://access.redhat.com/solutions/23016 15/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

C U S T O M-n
#if [ "$(getfacl (https://access.redhat.com/) |grep group:####:r-- |wc -
E R /etc/pki/entitlement/*-key.pem
P O R TA L
l)" != "1" ]; then exit 1; fi

#yum clean all
#rm -rf upstreamrepo
#reposync --gpgcheck -l -u --repoid=upstreamrepo -d --downloadcomps --download-
metadata --download_path `pwd` | gzip -9 -c > upstreamrepo.url.txt.gz
#createrepo -v `pwd`/<upstreamrepo> -g comps.xml
#pushd upstreamrepo
#cp *updateinfo.xml.gz repodata/updateinfo.xml.gz
#gunzip repodata/updateinfo.xml.gz
#modifyrepo `pwd`/repodata/updateinfo.xml `pwd`/repodata/
#popd

≤ Reply (/Ajax_comments/Reply/23016/1158681)

22 March 2017 3:25 AM (https://access.redhat.com/solutions/23016#comment-1158871)

Christian Horn (/user/12843)


(/user/12843)
Hi, did you verify if createrepo option --update could help you here?
RED HAT

GURU
≤ Reply (/Ajax_comments/Reply/23016/1158871)
3740
Points

22 March 2017 3:44 PM (https://access.redhat.com/solutions/23016#comment-1159231)


BK Brent Kimberley (/user/13724271)
(/user/13724271)
There is nothing to update.
COMMUNITY
MEMBER
#createrepo --update -v `pwd`/<upstreamrepo> -g comps.xml
40 Points

Scanning old repo data


Could not find valid repo at: /upstreamrepo/

≤ Reply (/Ajax_comments/Reply/23016/1159231)

22 March 2017 3:58 PM (https://access.redhat.com/solutions/23016#comment-1159251)


JC John Castranio (/user/10039653)
(/user/10039653)
Hello,
RED HAT

ACTIVE If I'm following this correctly, I believe you are trying to include the security data in
CONTRIBUTOR
your local repository yes? If you haven't seen this it may help.
197 Points
https://access.redhat.com/solutions/55654

You want the updatinfo.xml.gz to be in the repodata folder created by running 


createrepo after the reposync.
https://access.redhat.com/solutions/23016 16/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

Then you will want to use modifyrepo as shown below to apply the security data to
C U S T O M E R (https://access.redhat.com/)
the repo. P O R TA L 

the updateinfo.xml.gz file should be put in //repodata/

# cd /var/cache/yum/<arch>/<release>/<upstreamrepo>/
# cp *updateinfo.xml.gz /<upstreamrepo>/repodata/updateinfo.xml.gz
# gzip -d /<upstreamrepo>/repodata/updateinfo.xml.gz
# modifyrepo /<upstreamrepo>/repodata/updateinfo.xml
/<upstreamrepo>/repodata/

Once all this is done, remember that clients connecting to this should run "yum clean
all" to ensure they remove the cached metadata and get the new metadata.

≤ Reply (/Ajax_comments/Reply/23016/1159251)

22 March 2017 8:46 PM (https://access.redhat.com/solutions/23016#comment-1159531)


BK Brent Kimberley (/user/13724271)
(/user/13724271)
Hi John. Thanks for the pointer to https://access.redhat.com/solutions/55654.
COMMUNITY 189533 helps as well.
MEMBER

40 Points Question: Under what circumstances do the *-updateinfo file(s) below differ?

/upstreamrepo/*-updateinfo.xml.gz
/var/cache/yum/<arch>/<release>/<upstreamrepo>/*-updateinfo.xml.gz

≤ Reply (/Ajax_comments/Reply/23016/1159531)

22 March 2017 9:39 PM (https://access.redhat.com/solutions/23016#comment-1159601)


JC John Castranio (/user/10039653)
(/user/10039653)
For the local repository server, when it connects it will store the updatinfo.xml.gz file
RED HAT
in: /var/cache/yum////*-updateinfo.xml.gz
ACTIVE
CONTRIBUTOR
That file needs to be taken from there, and put into the directory where you ran
197 Points
createrepo. Then modify repo will put the data in place. So if I understand the
question correctly, These should be the same files. The main difference I saw is that
"updatinfo.xml" needs to be put in the repodata folder of the local repo.
//repodata/updatinfo.xml

≤ Reply (/Ajax_comments/Reply/23016/1159601)

24 March 2017 2:18 PM (https://access.redhat.com/solutions/23016#comment-1160361) 


https://access.redhat.com/solutions/23016 17/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

Brent Kimberley (/user/13724271)


C U S T O M E R (https://access.redhat.com/)
BK Hi John. You
P Oare
R TAcorrect,
L updateinfo.xml should be in the repodata folder.

(/user/13724271)
Question. Where is the XML schema definition file for updateinfo?
COMMUNITY
MEMBER
Thanks! Brent
40 Points

≤ Reply (/Ajax_comments/Reply/23016/1160361)

24 March 2017 7:05 PM (https://access.redhat.com/solutions/23016#comment-1160511)


BK Brent Kimberley (/user/13724271)
(/user/13724271)
Hi John and Christian
COMMUNITY
MEMBER
I see that comps.xml is verified by comps.rng. Where can I find the other schema
40 Points definitions?

https://bugzilla.redhat.com/show_bug.cgi?id=1296282

https://rhn.redhat.com/errata/RHBA-2016-2187.html

≤ Reply (/Ajax_comments/Reply/23016/1160511)

28 March 2017 2:04 AM (https://access.redhat.com/solutions/23016#comment-1160901)

Christian Horn (/user/12843)


(/user/12843)
I can not answer that from the top of my head. If it is possible for you to open a case
RED HAT
at the customer center, with the details around the issue, then this would probably
GURU
the best way to answer this question.
3740
Points
≤ Reply (/Ajax_comments/Reply/23016/1160901)

24 March 2017 2:28 PM (https://access.redhat.com/solutions/23016#comment-1160371)


BK Brent Kimberley (/user/13724271)
(/user/13724271)
Hi Christian.
COMMUNITY
MEMBER

40 Points Hi, did you verify if createrepo option --update could help you here?

Good tip! Thanks

≤ Reply (/Ajax_comments/Reply/23016/1160371)

https://access.redhat.com/solutions/23016 18/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

22 February 2016 4:49 PM (https://access.redhat.com/solutions/23016#comment-1017481)


C U S T O M E R (https://access.redhat.com/)
Tobias Wolter
P O R(/user/6516033)
TA L

(/user/6516033)
Cheers, could you maybe add rough numbers for the expected sizes of the
NEWBIE respective repositories?
7 Points
≤ Reply (/Ajax_comments/Reply/23016/1017481)

9 June 2016 2:51 AM (https://access.redhat.com/solutions/23016#comment-1057511)

thomas.jones2@dodiis.mil (/user/6299943)  Community Leader

(/user/6299943)
Would depend on whether you're doing a full sync or using the "only latest" option.
GURU Having done a reposync, today, of the 6-Server channel, using the "only latest"
6435 option cut the download from 17,000+ RPMs to a little over 4,000.
Points
≤ Reply (/Ajax_comments/Reply/23016/1057511)

9 June 2016 3:04 AM (https://access.redhat.com/solutions/23016#comment-1057521)

Christian Horn (/user/12843)


(/user/12843)
Not easy to do this reliably, I would do a full fetch, take note of the size, and then
RED HAT
look at the growth over some months. Atleast one minor release should also be part
GURU
of the observation, as these are also introducing new features (for releases in
3740
production phase 1), and bring many new packages. From that one could draw
Points
estimations for the consumtion. In production phase 2 and later, the size will grow
much slower.

≤ Reply (/Ajax_comments/Reply/23016/1057521)

13 May 2016 8:18 PM (https://access.redhat.com/solutions/23016#comment-1048291)


PO poolj@advisory.com (/user/12388203)
(/user/12388203)
Is it possible to use a single subscribed Centos 7(preferably) or RHEL 7 server to
NEWBIE host base and update package repos for RHEL5-7? We have no interest in Satellite
12 Points server just want a simple network local yum repo for RHEL OS updates like we have
for CentOS.

≤ Reply (/Ajax_comments/Reply/23016/1048291)

9 June 2016 3:10 AM (https://access.redhat.com/solutions/23016#comment-1057531)

Christian Horn (/user/12843)


(/user/12843)
RED HAT 
GURU

https://access.redhat.com/solutions/23016 19/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

3740 "hosting" repos for all of these via protocols like http or nfs could be done on a single
Points C U S T O M E R (https://access.redhat.com/)
system likePaOCentos7
R TA L box. Yet, fetching does to my knowledge require one "RHEL" 
per architecture and per major line. So for 32bit/64bit for rhel5/6/7, one can setup
KVM guests with these releases for fetching, and configure the host to offer the
fetched packages. In that config the host could also be RHEL7/64bit directly for
fetching this release, and 4 VMs could be used to cover the rhel5/6 flavours.

≤ Reply (/Ajax_comments/Reply/23016/1057531)

22 March 2017 1:42 PM (https://access.redhat.com/solutions/23016#comment-1159171)


PO poolj@advisory.com (/user/12388203)
(/user/12388203)
Thanks, that is what i ended up doing building a sync server using RHEL 6 and 7 and
NEWBIE subscribing them in order to provide RHEL repos internally.
12 Points
≤ Reply (/Ajax_comments/Reply/23016/1159171)

8 June 2016 6:55 PM (https://access.redhat.com/solutions/23016#comment-1057301)

thomas.jones2@dodiis.mil (/user/6299943)  Community Leader

(/user/6299943)
Is there an easy way to grab just the comps.xml?
GURU

6435 ≤ Reply (/Ajax_comments/Reply/23016/1057301)


Points

9 June 2016 2:49 AM (https://access.redhat.com/solutions/23016#comment-1057501)

Christian Horn (/user/12843)


(/user/12843)
Not aware of a way in style of "wget ...comps.xml" to get the latest version. Maybe
RED HAT
the versions which are on the RHEL media are ok for you. The ordering of packages
GURU
into groups is not changing very often.
3740
Points
≤ Reply (/Ajax_comments/Reply/23016/1057501)

16 June 2016 5:08 PM (https://access.redhat.com/solutions/23016#comment-1060721)


TF Trever Furnish (/user/1218313)
(/user/1218313)
The note about security repositories requiring a different process is unclear (at least
COMMUNITY to me).
MEMBER

26 Points Doesn't the rhel-7-server-rpms channel include security updates for the packages
in that channel when they're released?


https://access.redhat.com/solutions/23016 20/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

Also, the link to that separate process (https://access.redhat.com/solutions/55654)


C U S T O M E R (https://access.redhat.com/)
goes to a page that
P O R TA L only references RHEL5 and RHEL6 -- does it still apply to

RHEL7? It would appear NOT, because the updateinfo.xml.gz doesn't exist in my
RHEL7 system, although I do have files with suspiciously similar names, like this one:

/var/cache/yum/x86_64/7Server/rhel-7-server-thirdparty-oracle-java-
rpms/0afde39e01bc126f3d3335a6adddc87cc50e46c6ebfdd6574e8193e2aeedf14c-
updateinfo.xml.gz

≤ Reply (/Ajax_comments/Reply/23016/1060721)

21 March 2017 1:57 PM (https://access.redhat.com/solutions/23016#comment-1158511)


AK Alexander Kohr (/user/10042623)
(/user/10042623)
It is my understanding that this only does a one-time copy of the repo data from the
COMMUNITY source repo and that if you want to have it automatically update the repository data
MEMBER
on a regular basis you need to set up cron/acron/... with a script or individual
91 Points
commands that perform reposync and "createrepo --update" for each of the repos.
It could be useful to others to suggest that automated tasks/a script be set up and
an example of the commands to run for each repo. I did not do the initial set up's of
our repo server and we did not use the path recommended in this article, however it
also appears that a web server nor an ftp server are a requirements for either yum-
utils or createrepo to be installed. It might be useful to mention something like a
webserver or ftpserver need to be installed and configured; and that if you install
apache with an http based repos and put the repos in /var/www/html as instructed
no additional configuration should be needed. Thank you.

≤ Reply (/Ajax_comments/Reply/23016/1158511)

22 March 2017 2:42 AM (https://access.redhat.com/solutions/23016#comment-1158861)

Christian Horn (/user/12843)


(/user/12843)
Thank you, hints on this have been incorporated. We did this not until now, because
RED HAT
there are so many options for distribution. Besides HTTP(S)/FTP/NFS, distributing
GURU
the repos with rsync/ssh or pulp is also not uncommon.
3740
Points
≤ Reply (/Ajax_comments/Reply/23016/1158861)

22 March 2017 2:05 PM (https://access.redhat.com/solutions/23016#comment-1159201)


AK Alexander Kohr (/user/10042623)
(/user/10042623)
In reviewing the article I think that waiting to mention --update as a note under
COMMUNITY Diagnostic Steps where it could easily be missed by a rushing sysadmin will cause
MEMBER
the sysadmins to rely on this for days to possibly months before they realize that

91 Points
https://access.redhat.com/solutions/23016 21/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

somethings is wrong, and then having them open an after the fact support ticket or
C U S T O M E R (https://access.redhat.com/)
wasting a bunch
P O R TAof
L time trying to figure out why the local repo is not providing

update content. Maybe it should be moved up as an optional step without specific
details as it will vary greatly by preference and number of repositories that are
mirrored. Also this may be my over interpreting things but to me "local mirror," as
contained in the Issue section, makes me think of something that can be accessed
by more than just the box itself, using most likely http, https, ftp or sftp even though
other protocols will work. I would find it would be much more end user friendly if the
note "Above commands create a local copy ... or NFS (nfs-utils package)" were inline
before the "How to create a .repo file" link; along with some wording about "For
other boxes to access the repo you may need to;" and that "choosing which
distribution method to use and how to configure them is outside the scope of this
document." Mention something like "Though an apache http install and it's
configuration should be relatively easy due to the repositories being placed in
/var/www/html/” could be especially useful since the linked repo configuration page
is a very simple page with minimal information and the only example of a repo file
has http for the base url. With comments like these inline or maybe in the Resolution
section like the fact that the box has to be subscribed to the channel it would be
much clearer that additional steps are needed. Thank you for the changes you have
already made and for considering the following comments ideas for the main article.

≤ Reply (/Ajax_comments/Reply/23016/1159201)

24 March 2017 6:45 AM (https://access.redhat.com/solutions/23016#comment-1160261)

Christian Horn (/user/12843)


(/user/12843)
Thanks.
RED HAT

GURU ≤ Reply (/Ajax_comments/Reply/23016/1160261)


3740
Points

23 May 2017 10:42 AM (https://access.redhat.com/solutions/23016#comment-1177871)


JR Jayant Rohlan (/user/4177763)
(/user/4177763)
Hi, I have subscription for Red Hat Enterprise Linux for SAP Applications, how can I
COMMUNITY sync it locally?
MEMBER

20 Points
≤ Reply (/Ajax_comments/Reply/23016/1177871)

25 June 2017 6:33 AM (https://access.redhat.com/solutions/23016#comment-1189321)

Bhushan Dangre (/user/14570841)


(/user/14570841)
This local repository is not minor version specific. 
RED HAT

https://access.redhat.com/solutions/23016 22/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…
COMMUNITY
MEMBER ≤ Reply (/Ajax_comments/Reply/23016/1189321)
C U S T O M E R (https://access.redhat.com/)
24 Points P O R TA L

26 June 2017 2:59 PM (https://access.redhat.com/solutions/23016#comment-1189621)


JC John Castranio (/user/10039653)
(/user/10039653)
When you use reposync against a repository, it will sync all available packages. The
RED HAT
only way to version lock the local repo is to version lock the server running
ACTIVE
CONTRIBUTOR "reposync". Then it will only have access to the minor release specified.
197 Points
You will need to keep this is in a separate folder from the main repo

≤ Reply (/Ajax_comments/Reply/23016/1189621)

18 September 2018 5:22 AM (https://access.redhat.com/solutions/23016#comment-1354041)


NM Nor Idzuwan Mohammad (/user/23768541)
(/user/23768541)
Dear Experts,
NEWBIE
When we create and offline repo from a server that have valid subscription does the
10 Points
client that are using these offline repo will need a valid subscription too? does it
legal to use the the offline repo for a production machine that does not have a
subscription from terms and condition point of view? (self support)

I could not found anything of the lisense agreement

Regards Thanks!

≤ Reply (/Ajax_comments/Reply/23016/1354041)

9 January 2019 5:23 PM (https://access.redhat.com/solutions/23016#comment-1419711)


ET Elio Thome (/user/568263)
(/user/568263)
I would like to know if there is a possibility of creating repositories of version 6.x and
NEWBIE 7.x on a single server with version 6.9.
7 Points
≤ Reply (/Ajax_comments/Reply/23016/1419711)

9 January 2019 6:14 PM (https://access.redhat.com/solutions/23016#comment-1419771)


JC John Castranio (/user/10039653)
(/user/10039653)
You will need one registered system for every Major Version or Variant repository
RED HAT
you need to sync. You can sync the RHEL 7 packages then move them to the RHEL
ACTIVE
CONTRIBUTOR 6 machine in order to host them on one system.

197 Points

https://access.redhat.com/solutions/23016 23/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

≤ Reply (/Ajax_comments/Reply/23016/1419771)
C U S T O M E R (https://access.redhat.com/)
P O R TA L

10 January 2019 12:12 AM (https://access.redhat.com/solutions/23016#comment-1419991)

Christian Horn (/user/12843)


(/user/12843)
..or have the rhel6 and rhel7 guests fetch onto a common filesystem, for example an
RED HAT
NFS share. One could also run a rhel7 on bare metal, have the rhel6 run as KVM
GURU
guest, and consolidate the files on an NFS file system hosted by the rhel7
3740
hypervisor.
Points

≤ Reply (/Ajax_comments/Reply/23016/1419991)

25 January 2019 3:12 PM (https://access.redhat.com/solutions/23016#comment-1431041)

Robert Ramsey (/user/24090581)


(/user/24090581)
Just in case anyone was wondering how to find out what repo-ids are available for
ACTIVE their system, you can reference this page:
CONTRIBUTOR

104 Enabling or disabling a repository using Red Hat Subscription Management


Points
(https://access.redhat.com/solutions/265523)

≤ Reply (/Ajax_comments/Reply/23016/1431041)

27 February 2019 10:11 PM (https://access.redhat.com/solutions/23016#comment-1459301)


VK Venkatesh Kancharla (/user/25448021)
(/user/25448021)
getting below error
NEWBIE
reposync --gpgcheck -l --repoid=rhel-x86_64-server-6 --
7 Points
download_path=/repodata/rhel68 --downloadcomps --download-metadata
Loaded plugins: product-id, rhnplugin, subscription-manager This system is
receiving updates from RHN Classic or RHN Satellite. Traceback (most recent call
last): File "/usr/bin/reposync", line 386, in main() File "/usr/bin/reposync", line 290,
in main resultfile = repo.retrieveMD(ftype) File "/usr/lib/python2.6/site-
packages/yum/yumRepo.py", line 1571, in retrieveMD return
self._retrieveMD(mdtype) File "/usr/lib/python2.6/site-
packages/yum/yumRepo.py", line 1654, in _retrieveMD size=thisdata.size) File
"/usr/share/yum-plugins/rhnplugin.py", line 397, in _getFile self.id, e)
yum.Errors.RepoError: failed to retrieve repodata/comps.xml from rhel-x86_64-
server-6 error was [Errno 14] PYCURL ERROR 22 - "The requested URL returned
error: 500 Internal Server Error"

≤ Reply (/Ajax_comments/Reply/23016/1459301)

https://access.redhat.com/solutions/23016 24/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

9 March 2019 11:12 AM (https://access.redhat.com/solutions/23016#comment-1468841)


C U S T O M E R (https://access.redhat.com/)
Jörg Kastning
P O R(/user/13546641)
TA L

(/user/13546641)
Hello everyone,
GURU I would like to draw your attention to a small project of mine which provides some
1856 useful scripts to setup a local mirror for RHEL repos without using Satellite server.
Points
The project is called Poor Man's RHEL Mirror (https://github.com/Tronde/poor-
man-s-rhel-mirror) and it is hosted on GitHub.com. Information about what it does
and for what it could be used you will find in the README.md
(https://github.com/Tronde/poor-man-s-rhel-mirror/blob/master/README.md).

Please feel free to use it and adapt it to your own needs. Feedback is welcome.

Best regards,
Joerg

≤ Reply (/Ajax_comments/Reply/23016/1468841)

21 May 2019 11:25 PM (https://access.redhat.com/solutions/23016#comment-1528371)

Akemi Yagi (/user/856543)


(/user/856543)
Could this article be updated to include RHEL 8? I'm afraid introduction of
GURU molularity adds some complexity to the process.
3184
Points ≤ Reply (/Ajax_comments/Reply/23016/1528371)

22 May 2019 6:34 AM (https://access.redhat.com/solutions/23016#comment-1528751)

Christian Horn (/user/12843)


(/user/12843)
RHEL8 looks quite a bit different, we decided to not make this here more complex
RED HAT
and created https://access.redhat.com/solutions/4163651 . Still state 'solution in
GURU
progress'. As for modularity, I think that this is dealed with on yum/dnf level, once
3740
they just plainly see the repo. For the 2 repos (baseos/appstream) from the rhel8
Points
media, it works like this. rhel8 clients get these 2 configured as repos, and the
modularity parts are then done on yum layer.

≤ Reply (/Ajax_comments/Reply/23016/1528751)

3 June 2019 6:39 PM (https://access.redhat.com/solutions/23016#comment-1537731)


KK Kirill Kashtanov (/user/29601431)
(/user/29601431)
mv updateinfo.xml /var/www/html//repodata/repomd.xml
NEWBIE shouldn't it be /var/www/html//repodata/updateinfo.xml ??
5 Points

https://access.redhat.com/solutions/23016 25/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

≤ Reply (/Ajax_comments/Reply/23016/1537731)
C U S T O M E R (https://access.redhat.com/)
P O R TA L

3 June 2019 6:58 PM (https://access.redhat.com/solutions/23016#comment-1537751)
JC John Castranio (/user/10039653)
(/user/10039653)
Yes it should. I have updated the article now to correctly reflect that. Thank you for
RED HAT
letting me know.
ACTIVE
CONTRIBUTOR

197 Points
≤ Reply (/Ajax_comments/Reply/23016/1537751)

24 October 2019 8:13 PM (https://access.redhat.com/solutions/23016#comment-1651241)


DC Dan Carrington (/user/76483)
(/user/76483)
Forgive me if I missed it in previous comments, but how does a local repo handle RH
PRO subscriptions and validate that I'm not standing up unlicensed servers? Just trying
556 to get a full understanding of this setup and don't want to run into any unexpected
Points difficulties. Thanks!

≤ Reply (/Ajax_comments/Reply/23016/1651241)

24 October 2019 8:35 PM (https://access.redhat.com/solutions/23016#comment-1651281)


JC John Castranio (/user/10039653)
(/user/10039653)
At this time, local repositories do not validate if the clients pulling content from it are
RED HAT
entitled or not. For that purpose we have Red Hat Satellite which can sync and host
ACTIVE
CONTRIBUTOR repositories for all of your clients which register to the satellite itself. The local repo
197 Points is a single registered system that is downloading all of the content of a repository it
has access to, and then hosting it via http (most commonly).

≤ Reply (/Ajax_comments/Reply/23016/1651281)

24 October 2019 8:51 PM (https://access.redhat.com/solutions/23016#comment-1651321)


DC Dan Carrington (/user/76483)
(/user/76483)
Yes. We currently have Satellite 5 and are planning to move to a different platform
PRO and I was looking at this as a possible solution for that, but it sounds like that will not
556 work for what we're looking for. Thanks!
Points
≤ Reply (/Ajax_comments/Reply/23016/1651321)

13 November 2019 3:51 PM (https://access.redhat.com/solutions/23016#comment-1665841)


DM David Maguire (/user/19457201)

(/user/19457201)
https://access.redhat.com/solutions/23016 26/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…
ACTIVE
Hi, Got my RHEL 7 local repo server running with no problem, however, how do I
C U S T O M E R (https://access.redhat.com/)
CONTRIBUTOR

161 Points restrict client


POR servers
TA L to use only minor release, e.g. 7.6 updates? Thanks. 

≤ Reply (/Ajax_comments/Reply/23016/1665841)

14 November 2019 12:13 AM (https://access.redhat.com/solutions/23016#comment-1666401)

Christian Horn (/user/12843)


(/user/12843)
Hm.. can't think of an easy way, sorry. Most client systems probably use
RED HAT
'subscription-manager release --set=..', but as these clients here just use a pure yum
GURU
repo, that does not apply. You could by some way track for example the rhel-7.6
3740
stream receiving updates, and on the repo server manually maintain a repo where
Points
you copy in the rpm packages released in that stream. I see no easy way to
automate this. This might be one of the advanced features for which you should
consider RH Satellite.

≤ Reply (/Ajax_comments/Reply/23016/1666401)

18 November 2019 2:19 PM (https://access.redhat.com/solutions/23016#comment-1669001)


JC John Castranio (/user/10039653)
(/user/10039653)
When we release lock a registered system, it actually changes the baseurl and looks
RED HAT
at a different location. You would need to do the same thing by release locking the
ACTIVE
CONTRIBUTOR Repo Server, then syncing to a folder for specifically only that release.
197 Points
# subscription-manager release --set=7.6
# rm -rf /var/cache/yum/
# reposync -r rhel-7-server-rpms -p /var/www/html/7.6/

Then the clients would need a repo configuration to look at that 7.6 locked repo.

≤ Reply (/Ajax_comments/Reply/23016/1669001)

25 December 2019 8:46 PM (https://access.redhat.com/solutions/23016#comment-1695081)

Jörg Kastning (/user/13546641)


(/user/13546641)
Merry Christmas everyone,
GURU I would like to draw your attention to the RHEL 8 version of the Poor Man's RHEL
1856 Mirror (https://github.com/Tronde/poor-man-s-rhel-mirror/releases/tag/3.0.0-
Points beta) hosted on GitHub.com. Information about what it does and for what it could
be used you will find in the README.md (https://github.com/Tronde/poor-man-s-
rhel-mirror/blob/rhel8/README.md).

Please feel free to use it and adapt it to your own needs. Feedback is welcome. 
https://access.redhat.com/solutions/23016 27/28
2/4/2020 How to create a local mirror of the latest update for Red Hat Enterprise Linux 5, 6, 7, 8 without using Satellite server? - Red Hat Custo…

Best regards, Joerg


C U S T O M E R (https://access.redhat.com/)
P O R TA L

≤ Reply (/Ajax_comments/Reply/23016/1695081)

1 2 (/solutions/23016?page=1) next › (/solutions/23016?page=1)

last » (/solutions/23016?page=1)

All systems operational (https://status.redhat.com)

Privacy Statement
(http://www.redhat.com/en/about/privacy-policy)
Customer Portal Terms of Use
(https://access.redhat.com/help/terms/)
All Policies and Guidelines
(http://www.redhat.com/en/about/all-policies-guidelines)
Copyright © 2020 Red Hat, Inc.


https://access.redhat.com/solutions/23016 28/28

Das könnte Ihnen auch gefallen