Requirement: We have customized rocky 8.7 vm and it will be in air gapped environment, where it will not connect to outside internet So we want to configure a reposerver on the different vm on the same network with the rocky vm only.
Steps Taken:
- on the reposerver added the entry in the hosts file so that it will resolve with hostname as well “rocky.reposerver.com”
- Installed nginx and yum utisl
- mounted customized rocky iso to reposerver vm and copied the BaseOS and AppStream folders to /usr/share/nginx/html/repos/
- In the /etc/nginx/conf.d/repo.conf file added below entry
vi /etc/nginx/conf.d/repos.conf
server {
listen 80;
server_name “address of reposerver”;
root /usr/share/nginx/html/repos;
index index.html;
location / {
autoindex on;
}
}
- restarted nginx
- now on http://rocky.reposerver.com both the BaseOS and AppStream are visible
- now went to the client rocky vm and moved all repo files from yum.repos.d folder
- created localrepo.repo inside it
[localrepo-base]
name=RockyLinux Base
baseurl=http link with reposerver address with BaseOS at the last
gpgcheck=0
enabled=1
[localrepo-appstream]
name=RockyLinux AppStream
baseurl=http link with reposerver address with AppStream at the last
gpgcheck=0
enabled=1
- now done dnf clean all and ran dnf repolist both the repos are visible
10 But while installting any package it is giving error pakcage not found.
Request you to let me know if any other things need to be done so that i can install packages, i have just copied the BaseOS and AppStream folders from my customized iso that is already a working iso