It's possible to use JetPatch when you are working with local repositories. Below is a full user guide on how to setup an Oracle Linux 8 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 8
-
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).
- Disk space to store a local copy of the mirrored channels. See disk storage requirements for minimum required disk space.
Local Repository Setup
Install the package the includes the utilities to setup local repository
dnf install -y dnf-utils
Mount the disk space to the newly created repo server as /ol8 and create the below directories
mkdir -p /ol8/repo/OracleLinux
mkdir -p /ol8/repo/logs
mkdir -p /ol8/repo/scripts
In path /etc/yum.repos.d ensure the you have the below files and repositories are in enabled state
Perform the first reposync by using below set of commands to sync from remote public Oracle repository
/usr/bin/reposync --newest-only --download-metadata --repoid=ol8_baseos_latest -p /ol8/repo/OracleLinux
/usr/bin/reposync --newest-only --download-metadata --repoid=ol8_appstream -p /ol8/repo/OracleLinux
/usr/bin/reposync --newest-only --download-metadata --repoid=ol8_UEKR6 -p /ol8/repo/OracleLinux
Note: Use tmux command as these above commands will take more time for first time
To have the repo upto date with the public repository of Oracle 8 create file oracle8_repo_sync.sh in path /ol8/repo/scripts with below content.
#!/bin/bash
LOG_FILE=/ol8/repo/logs/repo_sync_$(date +%Y.%m.%d).log
# Remove old logs
find /ol8/repo/logs/repo_sync* -mtime +10 -delete; >> $LOG_FILE 2>&1
# Sync repositories
/usr/bin/reposync --newest-only --download-metadata --refresh --repoid=ol8_baseos_latest -p /ol8/repo/OracleLinux >> $LOG_FILE 2>&1
/usr/bin/reposync --newest-only --download-metadata --refresh --repoid=ol8_appstream -p /ol8/repo/OracleLinux >> $LOG_FILE 2>&1
/usr/bin/reposync --newest-only --download-metadata --refresh --repoid=ol8_UEKR6 -p /ol8/repo/OracleLinux >> $LOG_FILE 2>&1
Have the file with executable permission
chmod 744 /ol8/repo/scripts/oracle8_repo_sync.sh
Create Cron job to run every Friday at 1 AM using command
crontab -e
0 1 * * 5 /ol8/repo/scripts/oracle8_repo_sync.sh
Setup the Web Server
Use the below commands to install Apache and start/ enable the service
dnf install -y httpd
systemctl start httpd
systemctl enable httpd
Note: As this is Oracle Linux please make sure the Firewall rule is set to enable port 80
and SELinux is set to permissive state
Point the repositories to the HTTP server, with below set of commands
mkdir -p /var/www/html/repo/OracleLinux/ol8_baseos_latest
ln -s /ol8/repo/OracleLinux/ol8_baseos_latest/ /var/www/html/repo/OracleLinux/ol8_baseos_latest/x86_64
mkdir -p /var/www/html/repo/OracleLinux/ol8_appstream
ln -s /ol8/repo/OracleLinux/ol8_appstream/ /var/www/html/repo/OracleLinux/ol8_appstream/x86_64
mkdir -p /var/www/html/repo/OracleLinux/ol8_UEKR6
ln -s /ol8/repo/OracleLinux/ol8_UEKR6/ /var/www/html/repo/OracleLinux/ol8_UEKR6/x86_64
And in final step copy the GPG key to the HTTP server
cp /etc/pki/rpm-gpg/RPM-GPG-KEY-oracle /var/www/html/RPM-GPG-KEY-oracle-ol8
Now try to access the newly created Oracle 8 local repository using web
Setup local yum repo on client servers
Note: The following steps should be performed on all client servers that are configured to sync with the local repositories. We highly recommend using our run-task capabilities, to easily distribute the configurations.
1. Disable all current repositories in the client servers
2. Create a local_ol8.repo file that will be added to the /etc/yum.repos.d directory on every server using the repositories. That file should look similar to the following file. With file
local_ol8_baseos_latest]
name=Oracle Linux
baseurl=http://<Server-IP>/repo/OracleLinux/ol8_baseos_latest/$basearch/
gpgkey=http://<Server-IP>/RPM-GPG-KEY-oracle-ol8
gpgcheck=1
enabled=1
[local_ol8_appstream]
name=Oracle Linux AppStream
baseurl=http://<Server-IP>/repo/OracleLinux/ol8_appstream/$basearch/
gpgkey=http://<Server-IP>/RPM-GPG-KEY-oracle-ol8
gpgcheck=1
enabled=1
[local_ol8_UEKR6]
name=Latest Unbreakable Enterprise Kernel for Oracle Linux
baseurl=http://<Server-IP>/repo/OracleLinux/ol8_UEKR6/$basearch/
gpgkey=http://<Server-IP>/RPM-GPG-KEY-oracle-ol8
gpgcheck=1
enabled=1
Comments
0 comments
Article is closed for comments.