Ubuntu – How to host a repository in the own site like a PPA

repository

As launchpad does not support binary uploads, I want to make .deb packages and host them in My own Github website.

  1. How to do it?
  2. When done, how to install packages from it?

Best Answer

A Ubuntu/Debian repository at the minimum consists of a web server directory containing some .deb packages and an index file which apt-get reads to know which packages and versions are available.

You can read Debian's documentation on how a repository is structured here. You can also try just navigating a simple PPA repository with your web browser to see how it looks in practice. (Example link: pypy ppa).

If you're planning on updating it only rarely, it is possible to set up the necessary directories and index files by hand, but probably not recommended. A tool like debarchiver should help you (although I have not used it personally).

You then just add a new file in /etc/apt/sources.list.d corresponding to your new repository. Eg, a new file /etc/apt/sources.list.d/myrepo.list containing:

deb http://mysite.com/myrepo precise main
Related Question