Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 have an increasing number of servers running Debian or Ubuntu with customized versions of Apache, PHP, etc.
I thought I might be able to save time by creating my own APT source and putting already-compiled copies of these packages that all my servers can use. This way, I can also upgrade them all at once.
I have been able to find several sets of instructions for creating deb repositories (1, 2, 3 for example), but I have not yet found the best way to actually compile and package the software.
Any tutorials or suggestions for how to compile and package Apache HTTPD, PHP (and software in general) for a custom DEB repository?

share|improve this question
up vote 5 down vote accepted

If you want to just get something built quickly for internal use only on your own systems, then you might want to take a pretty good look at FPM - Effing Package Management (wiki). Creating a package with this is pretty easy.

The binary package HOWTO also works and is pretty easy to follow. Just put the files in a directory, build your control file, and put in the right directory and run a command to build the archive.

If you ever plan on sharing your packages, or becoming a Debian/Ubuntu developer though you should take a strong look at the Debian Policy Manual. Everything you need to know is there with a lot of detail.

share|improve this answer
I will try it out. Thanks. – yakatz Apr 19 '12 at 0:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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