httpd Local offline repo server

koolaid

New Member
Joined
Apr 20, 2022
Messages
3
Reaction score
0
Credits
47
Created a rhel 7 repository server for updating offline clients. On RepoServer I installed httpd edited /etc/httpd/conf/httpd.conf to ServerAdmin root@RepoServer, ServerName192.168.166.13:80, DocumentRoot "/var/www/html". Started it, enabled it, ran httpd -t and Syntax is OK. Did reposync files are located at /var/www/html/rhel-7-server-rpms

On client side I created a baseos.repo in /etc/yum.repos.d/
[baseos]
name=Red Hat Enterprise Linux - BaseOS
baseurl=http://192.168.166.13/rhel-7-server-rpms/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

Ran yum clean all and yum repolist returns with :
[root@test ~]# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
repo id repo name status
baseos Red Hat Enterprise Linux - BaseOS 32,907
repolist: 32,907

Try to install package (unzip in this case) and get this:
[root@test ~]# yum -y install unzip
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package unzip.x86_64 0:6.0-19.el7 will be updated
---> Package unzip.x86_64 0:6.0-24.el7_9 will be an update
--> Finished Dependency Resolution
--> Finding unneeded leftover dependencies
Found and removing 0 unneeded dependencies

Dependencies Resolved

================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
unzip x86_64 6.0-24.el7_9 baseos 173 k

Transaction Summary
================================================================================
Upgrade 1 Package

Total download size: 173 k
Downloading packages:
No Presto metadata available for baseos
unzip-6.0-24.el7_9.x86_64.rpm FAILED
http://192.168.166.13/rhel-7-server-rpms/Packages/u/unzip-6.0-24.el7_9.x86_64.rpm: [Errno 14] HTTP Error 403 - Forbidden
Trying other mirror.
To address this issue please refer to the below knowledge base article


If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

Any ideas?



Error downloading packages:
unzip-6.0-24.el7_9.x86_64: [Errno 256] No more mirrors to try.
 


What repositories do you currently see on your system. What's the output of the following?
Code:
yum repolist
ls /etc/yum.repos.d
 
All that information is in the original post.

Ran yum clean all and yum repolist returns with :
[root@test ~]# yum repolist
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
repo id repo name status
baseos Red Hat Enterprise Linux - BaseOS 32,907
repolist: 32,907

[baseos]
name=Red Hat Enterprise Linux - BaseOS
baseurl=http://192.168.166.13/rhel-7-server-rpms/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
 
All that information is in the original post.
I was on my phone when replying to your topic...

I'm assuming the other system where you have a repo has an subscription, I tried the following with Rhel8 system without a subscription.
1. mv /etc/yum.repos.d/redhat.repo /etc/yum.repos.d/redhat.disabled
2. yum remove subscription-manager
3. After that I copied over Rocky-BaseOS.repo, Rocky-AppStream and RPM-GPG-KEY-rockyofficial to my Rhel8 system.
4. I imported the key: rpm --import RPM-GPG-KEY-rockyofficial
Then I was able to install unzip from the Rocky repos on my Rhel8 system as well as update it with the most recent packages from the Rocky repos. So all you have to do is step 2, which removes the subscription-manager from your system which keeps asking you for a subscription.
 
Last edited:

Members online


Latest posts

Top