-
Notifications
You must be signed in to change notification settings - Fork 56
Building Apache HTTP Server
Below versions of Apache HTTP Server are available in respective distributions at the time of creation of these build instructions:
- RHEL 6.9 has
2.2.15
- RHEL (7.3, 7.4, 7.5) has
2.4.6
- SLES 11 SP4 has
2.2.12
- SLES (12 SP2, 12 SP3) has
2.4.23
- Ubuntu 16.04 has
2.4.18
- Ubuntu 17.10 has
2.4.27
- Ubuntu 18.04 has
2.4.29
The instructions provided below specify the steps to build Apache HTTP Server version 2.4.33 on Linux on IBM Z for following distributions:
- RHEL (6.9, 7.3, 7.4, 7.5)
- SLES (11 SP4, 12 SP2, 12 SP3)
- Ubuntu (16.04, 17.10, 18.04)
General Notes:
- When following the steps below please use a standard permission user unless otherwise specified.
- A directory
/<source_root>/
will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it
-
RHEL 6.9
sudo yum install git openssl openssl-devel gcc autoconf make pcre pcre-devel libxml2 libxml2-devel expat-devel which wget tar
-
RHEL (7.3, 7.4, 7.5)
sudo yum install git openssl openssl-devel gcc libtool autoconf make pcre pcre-devel libxml2 libxml2-devel expat-devel which wget tar
-
SLES 11 SP4
sudo zypper install git gcc autoconf make pcre pcre-devel libxml2 libxml2-devel libexpat-devel wget tar awk
-
SLES (12 SP2, 12 SP3)
sudo zypper install git openssl openssl-devel gcc libtool autoconf make pcre pcre-devel libxml2 libxml2-devel libexpat-devel wget tar
-
Ubuntu (16.04, 17.10, 18.04)
sudo apt-get update sudo apt-get install git python openssl gcc autoconf make libtool-bin libpcre3-dev libxml2 libexpat1 libexpat1-dev wget tar
cd /<source_root>/
wget ftp https://www.openssl.org/source/old/1.0.2/openssl-1.0.2l.tar.gz
tar zxf openssl-1.0.2l.tar.gz
cd openssl-1.0.2l
./config --prefix=/usr --openssldir=/etc/ssl --libdir=lib shared zlib-dynamic
make
sudo make install
export PATH=/usr/local/ssl/bin:$PATH
cd /<source_root>/
wget http://ftpmirror.gnu.org/libtool/libtool-2.4.6.tar.gz
tar -xvf libtool-2.4.6.tar.gz
cd libtool-2.4.6
./configure
make
sudo make install
Note: RHEL 6.9 and SLES 11 SP4 has an older version of libtool available. Apache HTTP Server needs a later version of libtool.
cd /<source_root>/
git clone git://github.com/apache/httpd.git
cd /<source_root>/httpd
git checkout 2.4.33
cd /<source_root>/httpd/srclib
git clone git://github.com/apache/apr.git
cd /<source_root>/httpd/srclib/apr
git checkout 1.6.3
cd /<source_root>/httpd/srclib
git clone git://github.com/apache/apr-util.git
cd /<source_root>/httpd/srclib/apr-util
git checkout 1.6.1
cd /<source_root>/httpd
./buildconf
./configure --with-included-apr --prefix=<build-location>
make
sudo make install
Note: Skipping the --prefix
results in Apache httpd being installed in the default location.
Note: All the following commands may require sudo
depending on the <build-location>
specified.
To update configuration you may modify <build-location>/conf/httpd.conf
file.
<build-location>/bin/apachectl configtest
<build-location>/bin/apachectl -k start
Note: If <build-location>
is the prefix you specified, ensure that in /conf/httpd.conf file, values for User
and Group
fields are same as that of <build-location>
. Else, it will display forbidden(403) error in the browser.
<build-location>/bin/apachectl -k stop
Note: <build-location>
is the prefix you specified, if you didn't specify a prefix it should be installed to /usr/local/apache2
.
The information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.