0

I'm trying to upgrade httpd 2.4.6 to 2.4.25 with http/2 enabled on my CentOS 7.2. Since 2.4.6 is the latest version available on the yum repository, I understood that I must compile it myself.

By default, the freshly-complied httpd is being installed to a different path than the default package shipped with the yum repository.

How can I configure, compile and install it with exactly the same settings like the stock CentOS official version, effectively upgrading the current version?

My apachectl -V output is:

Server version: Apache/2.4.6 (CentOS)
Server built:   Jul 18 2016 15:30:14
Server's Module Magic Number: 20120211:24
Server loaded:  APR 1.4.8, APR-UTIL 1.5.2
Compiled using: APR 1.4.8, APR-UTIL 1.5.2
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -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=256
 -D HTTPD_ROOT="/etc/httpd"
 -D SUEXEC_BIN="/usr/sbin/suexec"
 -D DEFAULT_PIDLOG="/run/httpd/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"
  • 1
    Have you consider to get the source package for apache, change the archive and SPEC file and recompile it? – Romeo Ninov Apr 26 '17 at 13:47
  • when you say "install it with exactly the same settings", did you really mean "configure, compile, and install ..."? – Jeff Schaller Apr 26 '17 at 13:47
1

The "right" way to do it is build or adapt an rpm package. On top of making sure that you get the same configuration, you avoid breaking future updates.

I usually start my rpm work based on the closest version I can find for the target platform. In your case I have found an rpm of the same exact version:

https://codeit.guru/en_US/2017/01/apache-httpd-2-4-25-built-against-openssl-1-0-2j-with-http2-for-red-hat-enterprise-linux-and-centos/

With minimal edits you should be able to adapt the SRPM provided by codeit to suit your needs

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.