Apr 18, 2012
tom

Creating custom DEB packages of common programs

Question

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?

Asked by yakatz

Answer

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.

Answered by Zoredache

Related posts:

  1. creating deb package for ubuntu server 9.04 from compiling source
  2. simple-cdd : including custom deb files
  3. Quick Debian server bootstrap using custom built .deb files
  4. Building a custom Debian CD with simple-cdd : rebuild without downloading all the deb files
  5. Install RPM package in Ubuntu as .deb

Leave a comment