Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to make two things:

First of all, I want to have my own repository of ubuntu in my servers to not overload the usage of Internet in my company and to control the updates. I think that I have to use apt-mirror

And also I want to add my own packages to the repository.

What is the best way to do this?

Do I have to have two repositories? One with the mirror and another one with my packages? In case of conflict with my packages how Ubuntu solve this?

Thank you

share|improve this question

closed as off-topic by Chopper3, kce, Katherine Villyard, mdpc, EEAA Feb 12 '14 at 5:05

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – Chopper3, kce, Katherine Villyard, EEAA
If this question can be reworded to fit the rules in the help center, please edit the question.

I had to do something very similar for my AWS based setup. I decided to have one box with aptcacher-ng and dpkg-dev package.

reprepro doesn't support multiple versions of a package so I didnt use it. Since I wanted to keep these boxes as ephemeral as possible with low setup time I did not use apt-mirroring as it can download lot of data depending what you want it to mirror.

Aptcacher-ng caches the packages and this box is contacted by all other boxes for their apt needs so I end up saving lot of time and bandwidth.

share|improve this answer

Yes, you'll want to use two separate repos if you do it this way - the mirror will stay signed by the GPG keys of the distribution, while your repo with custom packages will be signed by a GPG key you generate (and your nodes will need to trust).

An alternative to mirroring is apt-cacher-ng - it's configured as an apt proxy on your nodes, and will handle all package requests. On the first request for a given package, it will download a package from the upstream internet repo; on subsequent requests, it will serve that package from cache. So you get the bandwidth savings of a local mirror without having to keep a copy of the entire repo (80% if which you'll never use).

For your internal repo of custom packages, use reprepro - it'll handle all the file structure and signing, you'll just need to deal with setting up the GPG key and feeding it .deb files.

For package conflicts, the client systems will determine which to use - generally, this is done by comparing the version string on the two different packages, but can also be affected by pinning.

share|improve this answer

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