Yum repositories configuration

Good afternoon.
Maybe someone can help me here.
I created a yum repository in Sonatype Nexus Repository ManagerOSS 3.34.0-01, and filled it with packages as shown in the attached screenshot.

also i created a file /etc/yum.repos.d/Nexus.repo on the client machine:

[root@repo0 yum.repos.d]# cat Nexus.repo
[nexusrepo]
name=Nexus - Repository
#baseurl=http://localhost:8081/repository/RedHat-based/packages/m/mc/
baseurl=http://localhost:8081/repository/RedHat-based/
gpgcheck=0
repo_gpgcheck=0
priority=1
enabled=1

When i trying to access the repository, yum get error at missing of the repodata/repomd.xml file:

[root@repo0 yum.repos.d]# yum update
Загружены модули: fastestmirror
Loading mirror speeds from cached hostfile
http://localhost:8081/repository/RedHat-based/repodata/repomd.xml: [Errno 14] HTTP Error 404 - Not Found
Пробуем другое зеркало.
To address this issue please refer to the below wiki article

If above article doesn’t help to resolve this issue please use https://bugs.centos.org/.

No packages marked for update

I want to understand how can I generate a repomd.xml file that will be common for all packages in the repository? Or is it not possible and I have to place all packages in one directory?

I think what you’d like to do here is set the repodepth=0 if you want the repository metadata generated for everything.

Setting a non-zero depth is a way to have multiple yum repositories within a single hosted repository. (e.g. for different distributions).

1 Like