Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 want to upgrade Apache from 2.2.15 to 2.4.4 in CentOS. Do I need to download update files to a folder and update Apache? Is this even possible?

share|improve this question
have you read : httpd.apache.org/docs/2.4/upgrading.html – Rahul Patil Mar 23 '14 at 10:49
Take a look at this tutorial on how to build your own 2.4 binaries on CentOS 6.x. jasonpowell42.wordpress.com/2013/04/05/… – slm Mar 23 '14 at 12:38
for detailed up-gradation process Install Apache 2.4, MySQL 5.5, PHP 5.5 on CentOS/RHEL 6/5 – user77182 Jul 11 '14 at 6:52

CentOS 6.x does not provide 2.4.x, only 2.2.x versions of Apache. CentOS like the Red Hat OS it derives from, RHEL are geared towards stability and so tend to lag behind what's cutting edge. So you'll need to either:

  1. compile it yourself
  2. find source RPMs and rebuild/recompile them
  3. find a repository that already has it pre-built in RPM form
  4. find pre-built binaries not in an RPM (often installed to /opt)

Rolling it yourself

There are numerous tutorials online for compiling Apache 2.4.x from scratch yourself on CentOS 6.x, here's one such: Install Apache 2.4.4 on CentOS 6.4, that shows how.

You can also try downloading the .tar.gz file directly, it includes a RPM .spec file so you can rebuild it like so:

$ rpmbuild -ts httpd-2.4.x.tar.bz2

I wouldn't expect to get too far with that approach however, since you'll likely need several other packages which are a bit tricky to come by on CentOS 6.x, without rebuilding them too.

Finding a repo

I would likely encourage you to not try and build it yourself unless you're really curious how to do it. I've done it and it's doable but can take some time and can be a bit frustrating at times. Rather I'd encourage you to simply use the Remi Collet Repository that has it already built for EL6 (That's RHEL 6 & CentOS 6).

Remi's site provides software collections, and you'll want to use the httpd24 one. All that's needed is to install the .repo file from that URL and do a yum update. This will bring your stack up from 2.2 to 2.4.

NOTE: The software collections (SC's) provided by Remi Collet's site are somewhere between options #3 & #4. I say this because they're distributed as RPMs but the software is installed into the directory /opt. So you'll be able to migrate your sites to 2.4, rather then just jumping directly to it, which IMO is a good thing. However you'll have to reconfigure things in order to make use of the installed version of Apache 2.4!

share|improve this answer
You end up dual stacked as the SC httpd24 gets installed to /opt and the standard httpd 2.2.x is not removed. – Iain Mar 24 '14 at 7:45
+1 - upgraded the answer: unix.stackexchange.com/a/138903/11085 – YumYumYum Jun 24 '14 at 9:11

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.