5

I want to create a package repository for my packages in ubuntu and this repository will be using in multiple Ubuntu systems to install and update packages.

Charly
  • 311
  • 4
  • 6
  • 16
  • Could you clarify what you mean a little - we seem to be answering two different questions in the responses below! Are you looking to cache the official packages you install so that other machines can get them locally rather than redownloading over the public internet, or are you looking to create a repository of packages that you have created yourself? – David Spillett Jun 26 '09 at 12:58
  • yes, I planing to create a my own package repository in ubuntu – Charly Aug 13 '09 at 15:01

6 Answers6

4

Here's a wiki page about personal repositories, i think you'll have to share it with http or nfs for example. For information, here 's another guidelines article, maybe it is somehow outdated now.

Maxwell
  • 5,026
  • 1
  • 25
  • 31
3
  1. Create a directory for your debs
  2. Put them in there
  3. Share it via a web server (eg, apache)
  4. Install the "dpkg-dev" package
  5. In the directory run this:

    dpkg-scanpackages . /dev/null > Packages

  6. Add this repository to your clients with a sources.list line like this:

    deb http:/// ./

An alternative is the mini-dinstall package, which is more work to set up, but less to maintain, especially for multiple users.

LapTop006
  • 6,466
  • 19
  • 26
3

This is already answered over on askubuntu: https://askubuntu.com/questions/170348/how-to-create-a-local-apt-repository/772636#772636

The basic steps are:

  1. create a directory for the repo
  2. copy in the package files
  3. Generate Release and Packages files
  4. (optional but much better for security since it means you won't have to use --allow-unauthenticated ever when using apt-get) sign the Release file with gpg

See my answer over there on askubuntu for a little script that automates this. There's also a program called reprepro that does this too, however I found that it no longer works in Ubuntu Xenial (YMMV).

happyskeptic
  • 131
  • 2
1

The apt-cacher package (see here fro the Ubuntu package description and here for a tutorial) offers the facility to create a local cache of packages that can be used by all the machines on your network.

There is also apt-proxy which performs a similar core function but there are people who suggest it is less stable/reliable, and approx which again seems to perform the same main task. All these options are also available in the Ubuntu "universe" repos, at least for Jaunty.

Note: I've not yet got round to trying any of these packages (I keep meaning too as it would save time/bandwidth when-ever I setup a new VM for testing stuff...)

David Spillett
  • 22,534
  • 42
  • 66
1

I've used approx before to simply cache and mirror upstream packages locally to my main test machine that I tested packages on before updating the entire network. Then all my local machines would be set to update from the test machines approx repo cache.

There are also packages like reprepro which can handle much of the repo management tasks for you and even properly GPG sign the repo files so that apt/dpkg/etc don't complain when people update packages from your repo.

Jeremy Bouse
  • 11,241
  • 2
  • 27
  • 40
0

You can also use Ubuntu PPA's (Personal Package Archive) to store your own software. Canonical, the company behind Ubuntu, will store it and serve it out for free over the internet to anyone

Amandasaurus
  • 30,211
  • 62
  • 184
  • 246