Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Are there any tools for maintaining private yum repositories?

Specifically, I'd like to:

  • upload rpms and have them placed in the proper directory;
  • indexes/metadata kept-up-to-date automatically;
  • keep old versions around;
  • reject invalid rpms ( overwriting existing ones for instance ).


Update:

This will be a repo with my custom-built RPMs, not a mirror of an existing one.

share

locked by Chris S Aug 26 '12 at 4:06

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

comments disabled on deleted / locked posts

6 Answers 6

up vote 4 down vote accepted

Install yum-utils (edit: and createrepo).

Since a yum repository is just a directory that you run createrepo(8) against and serve over http, functions you mention like uploading, keeping old versions around etc can be done with your usual tools like the shell, ssh, rsync etc. Or are you after a kind of attractive web-based method of managing a repo? I'm not sure if one exists.

As for updating metadata automatically, perhaps just use cron? Really, if these are your own packages then you should have tested the rpm before placing it in the repo, so having something check automatically if a rpm is invalid might not be needed, but again a regular cron job with rpm --test could tell you.

I'm probably missing some great tools but this has worked for me for our limited needs for years.

share
    
Thanks for the answer. Can you be a bit more explicit please? The binaries from this package don't seem to help. –  Robert Munteanu Jul 10 '09 at 10:56
    
createrepo is not available for Centos 4, that was the cause of my confusion. Thanks. –  Robert Munteanu Nov 5 '09 at 10:40
add comment

The HowtoForge has an article regarding a local YUM repo, not sure if its what you are after

can be found > Here <

There are many tutorials regarding local or private repo's

Are you after making your own?

Hope that helps

share
    
Sorry I misread your questions, you are looking for tools to actually maintain your repo? –  Rodent43 Jul 10 '09 at 9:30
    
I'm looking for tools to maintain a private repo with my custom-built RPMS. –  Robert Munteanu Jul 10 '09 at 9:37
add comment

I use mrepo to manage local yum repositories. It is a tool for mirroring repositories and in your case you could set it up to mirror a local directory containing your custom rpms.

share
add comment

As Andrew says, createrepo is all you need.

Put your rpms in a dir, run createrepo on it whenever you add rpms. Expose this dir over http. Add this http url to compatible clients through their /etc/yum.repos.d/ directory .

share
    
What I should have said :) –  Andrew H Jul 22 '09 at 13:32
add comment

http://pulpproject.org/

share
add comment

Assuming you're running Centos5 or later you'll want to install yum-utils, yum-protectbase, and yum-priorities on any machine using your internal repo. When you're running your own repo you can easily shoot yourself in the foot by over writing base RPMs. These packages help avoid that.

share
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.