How to upgrade Apache 2 from 2.2 to 2.4
- by Nina
I was in the process of doing a test upgrade from Apache 2.2 to 2.4.3. I'm using Ubuntu 10.04. I would have upgraded to 12.04 for this to see if the upgrade would go a lot smoother. Unfortunately, I was told it wasn't an option...so I'm stuck using 10.04.
The process I did this was:
Before attempting this, I have managed to upgrade APR from 1.3 to 1.4 as well since apache told me it was a requirement beforehand: http://apr.apache.org/download.cgi
First remove all traces of the current apache:
sudo apt-get --purge remove apache2
sudo apt-get remove apache2-common apache2-utils apache2.2-bin apache2-common
sudo apt-get autoremove
whereis apache2
sudo rm -Rf /etc/apache2 /usr/lib/apache2 /usr/include/apache2
Afterwards, I did the following:
sudo apt-get install build-essential
sudo apt-get build-dep apache2
Then install apache 2.4 with the following:
wget http://apache.mirrors.tds.net//httpd/httpd-2.4.3.tar.gz
tar -xzvf httpd-2.4.3.tar.gz && cd httpd-2.4.3
sudo ./configure --prefix=/usr/local/apache2 --with-apr=/usr/local/apr --enable-mods-shared=all --enable-deflate --enable-proxy --enable-proxy-balancer --enable-proxy-http --with-mpm=prefork
sudo make
sudo make install
After the make install, I ended up getting a series of errors that prevented it from
installing correctly:
exports.c:2513: error: redefinition of 'ap_hack_apr_uid_current'
exports.c:1838: note: previous definition of 'ap_hack_apr_uid_current' was here
exports.c:2514: error: redefinition of 'ap_hack_apr_uid_name_get'
exports.c:1839: note: previous definition of 'ap_hack_apr_uid_name_get' was here
exports.c:2515: error: redefinition of 'ap_hack_apr_uid_get'
exports.c:1840: note: previous definition of 'ap_hack_apr_uid_get' was here
exports.c:2516: error: redefinition of 'ap_hack_apr_uid_homepath_get'
Looking for exports.c only leads me back to the httpd-2.4.3 folder. So I'm not sure what these errors mean...
Thanks in advance for any help you have to offer!