Linux – How to upgrade Apache 2.2.25 to 2.2.xx on the Centos instance

apache-2.2centoslinux

I have a Centos instance with Apache 2.2.25 installed on it as part of the LAMP stack. All I want to do is upgrade to Apache 2.2.xx. I cannot use yum to do this because it asks me to update Apache to 2.4.xx which is not what I want.

What are the commands I need to run to get the Apache 2.2.xx version and how do I install it?

Centos version: centos-release-6-6.el6.centos.12.2.x86_64

Results of rpm -qa | grep httpd: httpd-2.2.25-1.x86_64

Best Answer

I've spent about an hour trying to find a distro you could add to your yum that carries httpd 2.2.x but no such luck. One other alternative would be a fresh install of httpd 2.2.31 by building it yourself from source. You can find it here: http://www.apache.org/dist/httpd/

Downloading the source:

wget http://www.apache.org/dist/httpd/httpd-2.2.31.tar.gz

Building the source

tar zxvf httpd-2.2.31.tar.gz
cd httpd-2.2.31.tar.gz
./configure --enable-so --enable-rewrite=shared
make
make install

I really don't recommend this as it isn't what you originally asked for. Of course, it is an option though so I thought I'd throw it out there for you anyway. Be sure to back up your current apache configuration if you are to take this approach.