How to add third party repositories (e.g. EPEL or Centrify for Red Hat Enterprise Linux 6) in Red Hat Satellite 5.x?
Environment
- Red Hat Satellite 5.X
- Red Hat Enterprise Linux 5 and above
Issue
- Need to create and
syncsome third party repositories in Red Hat Satellite. - How does one add non-redhat repositories to a satellite server?
- How can a third party repository be added to the satellite so that the servers gets updated when when we do a yum update ?
- How to host my local repository on satellite server so that it can be shared with all the clinets ?
Resolution
To Sync a third party repository on RHN Satellite, follow the procedure given below. In the following steps, the example is taken of "EPEL" repository.
-
Go to the Satellite Web-UI through browser, then select
Channels => Manage Software Channels. Here you can seecreate new channellink. Click on that. -
It will open a
Create Software Channelpage, in Details tab, provide the following (As an example,EPELis selected, so provide the details according to the requirements.)
Channel Name*: EPEL for Red Hat Enterprise Linux 6
Channel Label*: epel_rhel6_x86_64
Parent Channel: Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64)
Parent Channel Architecture: x86_64
Yum Repository Checksum Type: sha1
Channel Summary*: EPEL Repository
Some other information can be filled, but it's not mandatory to fill all of the information. Then click on Create Channel.
- In the left corner, click on
Manage Repositories, and then on Right corner, click oncreate new repository. Provide two details there. As testing is done for EPEL Repository for Red Hat Enterprise Linux 6 x86_64 bit, put the information as follows.
Repository Label* epel_repo_rhel6_x86_64
Repository URL* http://mirrors.kernel.org/fedora-epel/6Server/x86_64/
- In case of centrify repo, you need to provide username and password in URL declaration*
Repository Label: centrify
Repository URL: https://USERNAME:PASSWORD@repo.centrify.com/rpm-redhat/ <== replace USERNAME/PASSWORD
Note: If the mirror URL above does not work then please choose a new mirror from the Fedora EPEL mirror list
Then click on Create Repository Button. It will display "Repository created successfully"
-
To sync the repositories, click on
Manage Software Channelon Left side Box, and search forepel_repo_rhel6_x86_64, here in Repositories tab of "epel_rhel6_x86_64", and then select "epel_repo_rhel6_x86_64" which is the newly created repository. Tick in the check-box given in front of the same. ClickUpdate Repositoriesbutton. Now the repository is aligned to the channel. -
In the same page, see
syncsubtab underRepositorytab. Click onSync. Now, click on theSync Nowbutton to sync the repository right, or it can be scheduled later. -
After completing
sync, go to theSystemstab and select any test Red Hat Enterprise Linux 6 machine. Click onAlter Channel Subscriptionand selectEPEL for Red Hat Enterprise Linux 6Channel. And save. -
Go on the same client machine and run the following command to see if the repository is enabled or not.
# yum repolist
For more details, the documentation is available on Portal, click here to go to the Documentation
If you want to sync it manually or through the command line use :
# spacewalk-repo-sync -c <channel label> -u http://mirrors.kernel.org/fedora-epel/6Server/x86_64/
# spacewalk-repo-sync -c <channel label> -u https://USERNAME:PASSWORD@repo.centrify.com/rpm-redhat/
To check the progress of the repo sync, please check the logs on:
/var/log/rhn/reposync/{channel name} {date}.log
Note: Make sure URL is correct. If the mirror URL above does not work then please choose a new mirror from the Fedora EPEL mirror list
For repos containing packages with same name/version (NVREA) but different content / checksums, see How to store packages with same name/version (nvrea) but different content/checksum in Satellite 5.x?
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.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
