It's possible to use JetPatch when you are working with local repositories. Described below is a full user guide on how to setup an Oracle Linux Local Repository server and make sure everything is configured correctly and available for JetPatch usage.
Please note that the instructions below are for setting up local repositories and are not related to JetPatch functionality.
Prerequisites:
-
A server running Oracle Linux 7
-
An active Internet connection, either direct or via a proxy server, that can access linux.oracle.com and linux-update.oracle.com via HTTP (port 80) and HTTPS (port 443).
-
A valid Oracle Linux customer support identifier (CSI). To purchase Oracle Linux support, go to the online Oracle Linux Store or contact your sales representative.
-
A valid Oracle Single Sign-On account and an activated Unbreakable Linux Network account.
-
Sufficient memory to create the yum metadata. At least 6GB of RAM is recommended to create the metadata for Oracle Linux 5 repositories, but at least 2GB is required.
-
Sufficient disk space to store a local copy of the mirrored channels. See disk storage requirements for minimum required disk space.
Local Repository Setup
The following steps describe how to mirror packages from selected channels on the Unbreakable Linux Network and make them available from a local yum server. You can create and host i386, x86_64, and ia64 repositories on the same server.
Please note: Currently, there is no tool for mirroring ULN channels from ULN to a local yum server that is hosted on Oracle Linux 8. However, you can still perform ULN mirroring on Oracle Linux 7, as well as mirror any Oracle Linux 8 Update 1 ULN channels onto a yum server that is hosted on Oracle Linux 7. For more information visit Oracle Linux 8 release notes
-
Ensure that you have activated your Oracle Linux CSI and enabled your account on the Unbreakable Linux Network.
-
Ensure that the yum-rhn-plugin RPM is installed and plugins=1 is enabled in /etc/yum.conf.
-
Register the server with the Unbreakable Linux Network:
-
Run the uln_register command as the root user:
uln_register
-
Register the server by entering your Oracle Single Sign-On username, password and a valid CSI.
-
Enable the yum server option for your newly registered server:
- Log in to the Unbreakable Linux Network with the username and password that you used to register the server.
- On the Systems tab, click the link named for your server in the list of registered servers.
- On the System Detail page, click Edit.
- On the Edit System Properties page, select the Yum Server checkbox and click Apply Changes.
-
After registration with ULN, the server is automatically subscribed to the appropriate latest channel. You need to manually register the server to the correct addons channel to install the uln-yum-mirror package. For Oracle Linux 8 you must add to your subscription addons for the OS your'e launching on. In the unbreakable linux network, go to System > Select Local Repo Machine (click on the name) > Subscribed Channels Manage Subscription > select the addons for the operating system you're launching on (if your operation system 7 then you should install the OL7 addons. see images below)
- Create a yum repository base directory in /var/www/html. This directory will house the repository. Make sure that the yum repository owner has read and write permission on this directory.
mkdir -p /var/www/html/yum
9. Run the following commands (after you've added to the subscription the relevant channels):
# wget https://yum.oracle.com/RPM-GPG-KEY-oracle-ol8 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
# yum install uln-yum-mirror
10. Enable and start the Apache web server.
chkconfig httpd on
service httpd start
11. After the repository were synced (when the uln-yum-mirror command is completed) run the following commands for every Repository you have created (every channel you have subscribed to)
For example - BaseOS repository :
# move the file repomd.xml to the correct path
cp /var/cache/yum/x86_64/7Server/ol8_x86_64_baseos_latest/repomd.xml /var/www/html/yum/OracleLinux/OL8/baseos/latest/x86_64/
# Run create Repo command for each repository :
createrepo -v /var/www/html/yum/OracleLinux/OL8/baseos/latest/x86_64/ -g comps.xml
Your local repo server is all set ! Navigate to the local server http://<ip or hostname>/yum and make sure all relevant repositories appear.
Setting Up Oracle Linux Client Servers
To configure an Oracle Linux client servers to receive updates from the local yum server, perform the following steps:
-
Import the GPG key as the root user:
# rpm --import /usr/share/rhn/RPM-GPG-KEY
OR USE:
# wget https://yum.oracle.com/RPM-GPG-KEY-oracle-ol8 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle -
Create a yum repository configuration file in /etc/yum.repos.d using the following format:
[<channel_label>]
name=<Channel Description>
baseurl=http://<repository_server>/yum/<repository path>
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
enabled=1
priority=1
For example :
[baseOS_1]
name= Oracle Linux $releasever BaseOS Latest ($basearch)
baseurl=http://<repository-server>/yum/OracleLinux/OL8/baseos/latest/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
enabled=1
priority=1
To test that yum is correctly configured to install and update packages from your local yum repository:
-
Clear the yum metadata cache:
yum clean metadata
-
Ensure the correct channels are configured run:
yum repolist
the following should appear: You should be able to see the repositories Oracle Linux 8 Latest (x86_64)
To ensure that your local repositories do not conflict with upstream repositories, prefix their names with the string "local_".
Comments
0 comments
Article is closed for comments.