This article contains the following topics:
It's possible to use JetPatch when you are working with local repositories. Below is a full user guide on how to setup an Rocky Linux 9 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 Rocky Linux 9
- An active Internet connection, either direct or via a proxy server, that can access dl.rockylinux.org, vault.rockylinux.org and mirrors.rockylinux.org via HTTP (port 80) and HTTPS (port 443).
- Disk space to store a local copy of the mirrored channels Average of 300G > than.
Local Repository Setup
Install the package the includes the utilities to setup local repository
dnf install -y dnf-utils createrepo nginx
Mount the disk space to the newly created repo server as /rocky9 and create the below directories
mkdir -p /rocky9/repo/RockyLinux
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 Rocky repository, Sync happen according with the enabled repos. Check the enabled Repos before start sync.
reposync -m --download-metadata --download-path=/rocky9
To have the repo upto date with the public repository of Rocky 9 create file add the reposync to crontab.
Create Cron job to run every Friday at 1 AM using command
crontab -e
0 1 * * * /usr/bin/reposync -m --download-metadata --download-path=/rocky9 >> /var/log/reposync.log 2>&1
Setup the Web Server
Use the below commands to start/enable the service of nginx
systemctl start nginx
systemctl enable nginx
Note: As this is Rocky Linux please make sure the Firewall rule is set to enable port 80
and SELinux is set to permissive state
Also Check and change the permissions:
chown -R nginx:nginx /rocky9 chmod -R 755 /rocky9 semanage fcontext -a -t httpd_sys_content_t "/rocky9(/.*)?" restorecon -Rv /rocky9
Point the repositories to the HTTP server, with below set of commands
Enter the below details, vi /etc/nginx/conf.d/rocky9.conf and restart the nginx service.
server {
listen 80;
server_name _;
location /rocky9/ {
alias /rocky9/;
autoindex on;
}
}Now try to access the newly created Rocky 9 local repository using web
http://<IP>/rocky9/
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 rocky_local.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
[rocky_local_baseos] name=Rocky Linux 9 - BaseOS baseurl=http://<IP>/rocky9/baseos enabled=1 gpgcheck=0 [rocky_local_appstream] name=Rocky Linux 9 - AppStream baseurl=http://<IP>/rocky9/appstream enabled=1 gpgcheck=0 [rocky_local_extras] name=Rocky Linux 9 - Extras baseurl=http://<IP>/rocky9/extras enabled=1 gpgcheck=0
Comments
0 comments
Please sign in to leave a comment.