0

Good morning all. I am trying to figure out how to properly upgrade httpd on our Linux servers from 2.2.14 to 2.2.34. Here's the details:

BACKGROUND INFO: Our servers are all running RHEL 5.11, and are located in a DMZ that has no access to the general internet. (It's unlikely that we could get the firewall opened up to upgrade online, but that may be a moot point.) After a lot of reading, it appears that at the time of installation, the community version of httpd was installed, not the version that Red Hat packages with their distros. From what I understand from this article, this means that we can't use "yum update httpd". The support vendor that our parent company hired for our Linux servers had no idea how to upgrade this for us either, so it's on me now.

WHAT HAS BEEN TRIED SO FAR: Lacking any other good ideas, the support vendor tried building 2.2.34 locally on a dev server. This was successful in that 2.2.34 seems to be installed, but it's not currently serving the application running on the server--that's still being delivered using 2.2.14.

POSSIBLY HELPFUL INFO: Right now, the httpd binaries are installed at /usr/sbin, with the config and libraries located at /etc/httpd. This is what I see when I run httpd -V:

Server version: Apache/2.2.14 (Unix)
Server built:   Oct 14 2009 13:20:11
Server's Module Magic Number: 20051115:23
Server loaded:  APR 1.3.8, APR-Util 1.3.9
Compiled using: APR 1.3.8, APR-Util 1.3.9
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

The newer version was built at /etc/httpd/httpd-2.2.34/. This is what httpd -V looks like when run in that directory:

Server version: Apache/2.2.34 (Unix)
Server built:   Nov 14 2017 09:46:53
Server's Module Magic Number: 20051115:43
Server loaded:  APR 1.5.2, APR-Util 1.5.4
Compiled using: APR 1.5.2, APR-Util 1.5.4
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=128
 -D HTTPD_ROOT="/usr/local/apache2"
 -D SUEXEC_BIN="/usr/local/apache2/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_LOCKFILE="logs/accept.lock"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

It looks to me like it was built correctly, but I don't know how to see if it actually works.

QUESTIONS I NEED ANSWERED:

1) If indeed the new version was built correctly and could run if made to do so, how do I force the system to use the newer version? (I can figure out the configuration changes to make it load the application, but ps aux | grep "httpd" shows it's not even running.)

2) Is there an easier way to do this? I read the "upgrade" instructions on the Apache site, but there is no config.nice file anywhere that I can find on the system.

I appreciate any help offered. I can provide additional information as needed.

2

You have built httpd correctly but the default directory for the version built from source is /usr/local/apache2 and if you have done make && make install as root it will be installed there. The usual approach is to symlink /usr/local/apache2 to /etc/httpd for consistency. Looking at the initial install, moving /etc/httpd and creating a symlink to /usr/local/apache2 should work with your init file, but you could also check that that matches your installation.

If you need to do this again you could also consider building an RPM, the apache source comes with a build file that will do it, and it can be run on a VM running CentOS 5.11.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.