Upgrading to httpd 2.2.4 on RHEL and CentOS
Well, a new version of httpd was just released the other day. I kind of expected this to open a flood of people requesting a how-to on upgrading to the newest release of Apache's httpd 2.2.4 on RHEL & CentOS 4 and I wasn't wrong. I've had a few people searching for "apache 2.2.4" and "httpd 2.2.4" on my site search today so I figured, "Hey? Why not give the masses what they want?"
As it turns out, if you followed my how-to on upgrading to httpd 2.2.3 then this is going to be a pretty easy upgrade for you. If not, don't worry, I'm going to start including pre-modded SRPMS and occasionally complete RPMs (x86 only) at the bottom of these tutorials. That should give some of you that have had problems an easier time with the upgrade.
In any case, let's get down to it! As already mentioned, you'll want to start by reading my how-to on upgrading to 2.2.3 because the files you'll need if you are going to do this yourself are the same as the ones from that article. Keep in mind though that that article was written a month and a half ago, so there may be newer versions of those packages available.
As with the 2.2.3 guide, once you've upgraded 'apr', 'apr-util', and 'pcre' to the required versions you'll need to make the init file and spec file changes. However, don't close that spec file just yet. There are three more changes you'll need to make in order to get the package to build correctly. The changes you'll want to make are as follows:
- Change line 9 to "Version: 2.2.4" and line 10 to "Release: jason.2"
- Search for "Patch6" and remove BOTH lines that start with that text (the second one will actually be lower-case and preceded by a "%").
- Search for "Patch50" and remove BOTH lines that start with that text (the second one will actually be lower-case and preceded by a "%").
- Search for "openssl >= 0.9.7", remove the version suffix and replace it with "a" (the line should end up reading "Requires(post): openssl >= 0.9.7a, /bin/cat").
Once you've finished that you can save the file, exit your editor, and then build your RPMs with 'rpmbuild -bb httpd.spec'. It's going to take a while to finish but when it's done you should have some new RPMs in the /usr/src/redhat/RPMS/i386 folder. Install them as usual with 'rpm -Uvh filename'.
Once they're installed you're basically done. If you're upgrading from my 2.2.3 tutorial and you also followed one of my PHP upgrade tutorials then you won't need to rebuild PHP. If you are upgrading from httpd 1.3.x or 2.0.x (or possibly if you didn't follow my PHP how-to's) then you should be prepared to spend some more of your time recompiling PHP.
UPDATE (1/24/2007): It was brought to my attention that there was a glitch in the SPEC file that caused you to not be able to install mod_ssl. I have updated the src.rpm as well as the binaries to fix that issue. You do not need to upgrade if you do not use SSL.
UPDATE (2/6/2007): If you use mod_ssl then you should know that a default certificate is NOT included when you install the RPM. In order to generate one you should run the following as 'root':
openssl genrsa -out server.key 1024
openssl req -new -key server.key -out server.csr
openssl rsa -in server.key -out signingkey.key
openssl x509 -in server.csr -out selfsigned_digicert.crt -req -signkey signingkey.key -days 3650
chmod 600 server.key
chmod 600 selfsigned_digicert.crt
mkdir -p /etc/pki/tls/private
mkdir -p /etc/pki/tls/certs
cp server.key /etc/pki/tls/private/localhost.key
cp selfsigned_digicert.crt /etc/pki/tls/certs/localhost.crt
UPDATE (3/13/2007): I've updated the packages again in order to automatically apply the above process. If you've done it on your own or don't use SSL then you don't need to upgrade.
Update (9/24/2009): Packages deleted, use the yum repository instead.
Digg this story