Skip to end of metadata
Go to start of metadata

Available in Nexus Repository OSS and Nexus Repository Pro


Yum or "Yellowdog Updater, Modified" is a command line package management utility for Linux distributions using the RPM package manager. It allows for many commonly used Linux packages to be easily installed on to distributions such as RedHat, CentOS and Fedora.

Nexus Repository Manager OSS and Nexus Repository Manager Pro support the Yum repository format for proxy repositories. This allows the repository manager to take advantage of the packages in public Yum repositories without incurring repeated downloads of packages. This will also allow you to perform offline installs, for example allowing you to install CentOS without a connection to the internet.


Upgrading Yum repositories from version 2 to version 3 is currently not supported.

Proxying Yum Repositories

You can set up a Yum proxy repository to access a remote repository location.

To proxy a Yum repository, you simply create a new yum (proxy) as documented in Repository Management.

Minimal configuration steps are:

  • Define Name e.g. yum-proxy
  • Define URL for Remote storage, e.g.
  • Pick a Blob store for Storage

We do not create a default Yum proxy repository as there are many. Determine which repositories are appropriate for your environment.

Hosting Yum Repositories

A hosted repository for Yum can be used to upload your own RPMs as well as third-party RPMs. To host a Yum RPM, create a new yum (hosted) repository as documented in Repository Management.

When creating a Yum Hosted repository, you'll need to pick a Repodata Depth. This sets the level that the repodata metadata folder will be created initially as well as the expected folder depth that the rpms can be at (or deeper than) to match. Rpms with less depth will be rejected by Nexus Repository Manager.

For example, if your package is created at /games/lol/ashe.rpm then the Repodata Depth would be 2 and when pushing the rpm in the metadata would be created at that level. However, if you also had /games/poker.rpm then you'd want to have Repodata Depth equal to 1, which would account for both the poker.rpm and the ashe.rpm in this example.  If you had Repodata Depth as 2 and tried to push /games/poker.rpm it'd be rejected. In either case, pushing /games/wow/horde/thrall.rpm would be fine, it having a depth more than both 1 and 2.

It is possible to configure a Deploy Policy which defaults to Strict. When this is set to Strict, only yum-specific files (rpm, comps.xml) can be uploaded. When this is set to Permissive, any file of any type can be uploaded.

Deploy Policy of Permissive is required to use the Maven deploy plugin with a Yum Hosted repository.

Minimal configuration steps for creating a Yum Hosted repository are:

  • Define Name - e.g. yum-hosted
  • Select a value for Repodata Depth
  • Pick a Blob store for Storage

(warning) Repodata Depth is an editable field after repository creation, however, it is not a recommended practice.  Adjusting it to a value that's deeper than you have existing data will cause issues with your repository which would need to be resolved by a Rebuild Yum Metadata task run, after the value is corrected.

Deploying Packages to Yum Hosted Repositories

The Yum client does not come with a method for uploading RPMs however many other tools can be used to upload files to a hosted Yum repository using a simple HTTP PUT. The following example uses the curl command and the default credentials of the admin user to upload a test.rpm file to a hosted Yum repository with the name test.rpm:

curl -v --user 'admin:admin123' --upload-file ./test.rpm http://localhost:8081/repository/yum-hosted/test.rpm

When an RPM is uploaded, the Yum metadata will be generated after the configured value (default 60 seconds).

The task Rebuild Yum metadata can also be configured to create the metadata. Further information about tasks can be found in Configuring and Executing Tasks.

Yum Package Groups

Yum package groups are supported by uploading a comps.xml file or a comps.xml.gz file (the exact filename must be used for it to be detected by the repository manager and included in the repomd.xml file):

curl -v --user 'admin:admin123' --upload-file ./b686d3a0f337323e656d9387b9a76ce6808b26255fc3a138b1a87d3b1cb95ed5-comps.xml http://localhost:8081/repository/yum-hosted/repodata/comps.xml
curl -v --user 'admin:admin123' --upload-file ./b686d3a0f337323e656d9387b9a76ce6808b26255fc3a138b1a87d3b1cb95ed5-comps.xml.gz http://localhost:8081/repository/yum-hosted/repodata/comps.xml.gz

Installing Yum

Yum should come pre-installed with RedHat, CentOS, Fedora and a long list of Linux flavors. If your system does not have Yum preinstalled, you may have larger problems that cannot be solved in these docs.

Fedora users are encouraged to use as of Fedora version 20. DNF is currently backwards compatible and should work with Nexus Repository Manager 3, but is not explicitly supported.

Configuring Yum Client

Create a nexus.repo file in /etc/yum.repos.d/ that looks similar to the following:

name=Nexus Repository

If you have set gpgcheck to enabled, you'll want to provide the location of the gpgkey, replacing the value we've shown in the example above.

Browsing Yum Repositories and Searching Packages

You can browse Yum repositories in the user interface inspecting the components and assets and their details, as described in Browsing Repositories and Repository Groups.

Searching for Yum packages can be performed in the user interface, too. It finds all packages that are currently stored in the repository manager, as described in Searching for Components.

  • No labels