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 6 / 7 (x86_64 only).
-
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.
-
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 by running the following command as a root user:
uln_register
You will need to enter 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 (ULN) 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. In the ULN, go to System > Select the local repository machine (click on the name)> Manage Subscription > select the addons for the operating system you're launching on and the repository. For example, if your operating system is 7, and you want to create a local repository for 8, you should install both OEL7 and OEL8 addons. see images below:
-
-
For Oracle Linux 6: subscribe to the Oracle Linux 6 Addons (x86_64)
-
For Oracle Linux 7: subscribe to the Oracle Linux 7 Addons (x86_64)
-
-
-
If you want to add an additional channel to your yum mirror, add it to the Subscribed Channels list on ULN. The next time the uln-yum-mirror script runs, it automatically mirrors any additional channels that have been added. Disable server updates for any channels that you add as described in configuring the server for updates.
-
Create a yum repository base directory in /var/www/html.
mkdir -p /var/www/html/yum
This directory will house the repository. Make sure that the yum repository owner has read and write permission on this directory.
-
Install the "uln-yum-mirror" package as the root user. This command installs the /usr/bin/uln-yum-mirror script and automatically configures a daily cronjob to update your local yum repositories. You can adjust the configuration of the script by editing the /etc/sysconfig/uln-yum-mirror file. Configuration options are discussed in mirror configuration options.
- For Oracle Linux 6/7:
yum install uln-yum-mirror
- For Oracle Linux 6/7:
- Enable and start the Apache web server.
chkconfig httpd on
service httpd start
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
Please note: If you are setting up an Oracle Linux 8 client server and import is not working as expected, go to your local repository server and copy the RPM-GPG-KEY from /usr/share/rhn to the same location in your client server. -
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=1For example:
[local_ol6_x86_64_latest]
name=Oracle Linux $releasever - $basearch - latest
baseurl=http://<repository_server>/yum/OracleLinux/OL6/latest/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
enabled=1You can browse http://<repository_server>/yum/ to find the baseurl for each repository. You can also use the $releasever and $basearch parameters.
-
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
You should be able to see the repositories Oracle Linux 6 Latest (x86_64) and Unbreakable Enterprise Kernel Release 3 for Oracle Linux 6 (x86_64) - Latest enabled.
-
To ensure that your local repositories do not conflict with upstream repositories, prefix their names with the string "local_".
Comments
0 comments
Please sign in to leave a comment.