
Download the latest stable release of Apache from https://httpd.apache.org.
Download the latest stable Apache Portable Runtime (APR) and APR Utilities archives from https://apr.apache.org.
This will download files such as:
- httpd-2.4.54.tar.gz
- apr-1.7.0.tar.gz
- apr-util-1.6.1.tar.gz
Use the tar command to extract the archives to the /tmp directory.
tar -zxpf httpd-2.4.54.tar.gz --directory /tmp
tar -zxpf apr-1.7.0.tar.gz --directory /tmp
tar -zxpf apr-util-1.6.1.tar.gz --directory /tmp
Move the extracted APR and APR Utilities directory into the HTTPD srclib directory, ensuring that when the directories are moved, they are named "apr" and "apr-util".
mv /tmp/apr-1.7.0 /tmp/httpd-2.4.54/srclib/apr
mv /tmp/apr-util-1.6.1 /tmp/httpd-2.4.54/srclib/apr-util
Use dnf install or yum install to ensure the pcre and expat packages are installed.
dnf install pcre
dnf install expat-devel
Issue the following command to install Apache. In this example, the binaries used to install apache will be placed in the /tmp/apache_install_binaries directory.
/tmp/httpd-2.4.54/configure --prefix=/tmp/apache_install_binaries --with-included-apr
If you get an libpcre error, try including the --with-pcre option. Typically, libpcre is located at /usr/lib64.
/tmp/httpd-2.4.54/configure --prefix=/opt/apache --with-included-apr --with-pcre=/usr/lib64
If you want to install the Proxy Pass Load Balancer modules, include the --enable-proxy and --enable-proxy-balancer flags.
/tmp/httpd-2.4.54/configure --prefix=/opt/apache --with-included-apr --enable-proxy --enable-proxy-balancer
Run the make commands.
/tmp/apache_install_binaries/make
/tmp/apache_install_binaries/make install
Did you find this article helpful?
If so, consider buying me a coffee over at