Can anybody tell me how to create my own local package repository for my packages in Ubuntu?
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.
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.
- Create a directory for your debs
- Put them in there
- Share it via a web server (eg, apache)
- Install the "dpkg-dev" package
-
In the directory run this:
dpkg-scanpackages . /dev/null > Packages
-
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.
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:
- create a directory for the repo
- copy in the package files
- Generate Release and Packages files
- (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).
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...)
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.