Apache source code compilation tutorial, apache source code compilation
I. Install the dependency package in yum
Yum-y install gcc autoconf automake makepcre pcre-devel openssl-devel expat-devel
Ii. decompress the apr, apr-util, and httpd packages.
Tar-zxf apr-1.6.3.tar.gz-C/usr/src/
Tar-zxf apr-util-1.6.1.tar.gz-C/usr/src/
Tar-zxf httpd-2.4.29.tar.gz-C/usr/src/
Cd/usr/src/apr-1.6.3/# compile into apr package
./Configure
Make & make install
Cd/usr/src/apr-util-1.6.1/# compile the package into apr-util
./Configure -- with-apr =/usr/local/apr/
Make & make install
Cd/usr/src/httpd-2.4.29/# Enter httpd package Compilation
. /Configure -- prefix =/usr/local/apache2 -- enable-so -- enable-ssl -- enable-rewrite -- with-mpm = worker -- with-suexec-bin -- with-apr = /usr/local/apr/
Make & make install
/Usr/local/apache2/bin/apachectl start # start the service
Done