Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 use Puppet to automate setting up servers for work. The only problem with this is that installing the specific version of the software in my stack is a bit tricky as dependencies are sometimes not met. For example, I use Apache 2.2.25 but Ubunu 12.04 currently has 2.4 as the base.

Since I didn't want to upgrade right away, I setup Puppet to compile and install Apache from source. Since this generally takes awhile I was wondering whether I could build and compile Apache and keep reusing the built version?

What folders, binaries, files would I need to copy and is this even possible?

Alternatives to what I'm trying out are welcome as well.

share|improve this question
up vote 1 down vote accepted

First off, you need to be absolutely certain you need the older version of apache, they can be insecure and cause other issues.

See if the older version is still in your repository, and use that with apt-get install apache2=[version].

Yes you can backup a compiled version of apache, but i wouldn't suggest it as an appropriate route.

Finally you could use this:, to create a debian package appropriate your system.(you'd want the binary, any config files common to all servers and any required scripts)

share|improve this answer
I just need the old version of apache2 installable through Puppet until I can take time to update the production server. Just making sure our backup scripts will always work. I will check out specifying the version via apt, I think that might be a better option than what I'm doing now. Thank you. – JohnP Aug 22 '13 at 11:21
Apache 2.2.x is still maintained, I would not say that it is more or less secure than 2.4.x. – faker Aug 22 '13 at 11:22
@faker right now it happens to be, but it appears he intends to standardise on it, and i can't see it being maintained for all that long (maybe another 18 months). – Aaron Tate Aug 22 '13 at 11:27
@fenix I will be updating within a couple of months. Just wanted my puppet scripts to work properly in case I use it on my production server during that time. Decided to go with the apt-get version method, thanks. – JohnP Aug 22 '13 at 12:11

Best way is to create/download replacement deb packages so you can rollback/upgrade apache anytime you want, also you must satisfy dependencies. You can create local repository and easily manage updates/downgrades with puppet.

share|improve this answer

A standard makefile should honor DESTDIR environment variable. So you can set it before running make install and have all files installed in $DESTDIR path. Usually I use it when do some testing with software compiled from source.

For the software in production use it's better to make your own package, deb, rpm or whatever your distro use.

share|improve this answer
So it would be possible to backup the $DESTDIR and use it in other environments if they are the same? – JohnP Aug 22 '13 at 11:50
Most of the times, yes - it contains all the file that make install copies during installation process. Just make sure you back up all the configuration files as well. – DukeLion Aug 22 '13 at 15:00

I think you have the versions wrong. Apache 2.2.22 is the version in 12.04. The first version to get 2.4 will be the upcoming 13.10 release.

share|improve this answer
I think you're right. The reason Apache got updated to 2.4 was because I was using this package - . Earlier this used to be PHP 5.4, but it got updated to 5.5 and the old package moved. I suspect this is how my Apache got updated as well. Found this out a couple of hours later. Switching packages to /php5-oldstable seems to keep the older versions for me. – JohnP Aug 23 '13 at 4:14

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.