How to install Apache (httpd-2.4.25) with Source
Today we will see how to perform source apache (httpd-2.4.25) installation.
Reference:- http://httpd.apache.org/docs/2.4/install.html
Pre-Requisites:
Direct urls to download all pre-requisites
1) APR Download: http://www-eu.apache.org/dist//apr/apr-1.5.2.tar.gz
2) APR-UTIL Download: http://www-eu.apache.org/dist//apr/apr-util-1.5.4.tar.gz
3) PCRE Download: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz
4) PCRE2 Download: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.23.tar.gz
5) OpenSSL Download: ftp://openssl.org/source/openssl-1.0.2k.tar.gz
6) mod_jk Download: http://www-us.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.42-src.tar.gz
7) Apache httpd Download: httpd.apache.org/download.cgi
=====================================================================
Follow below steps to install apache2.4.x.
1) Install C and C++ compilers using yum.
Command: yum install -y gcc*
2) Install/Compile APR. // I have used default installation directory for compilation.
Command: ./configure --prefix=/usr --with-apr=/usr --with-gdbm=/usr --with-openssl=/usr --with-crypto
make
make install // APR is installed sucessfully..
3) Install compile APR-Util. // I have used default installation directory for compilation.
Command: ./configure --prefix=/usr --with-apr=/usr --disable-static --with-installbuilddir=/usr/share/apr-1/build
make
make install //APR-Util is installed sucessfully..
Note: APR and APR-Util can be compiled with apache httpd and reduce above 2nd and 3rd steps.
Command: (Apache_source)./configure --with-apr=/httpd_source_tree_root/srclib/apr
4) Install PCRE. PCRE2 -- // This is optional and // I have used default installation directory for compilation.
Command: ./configure --prefix=/usr --docdir=/usr/share/doc/pcre-8.40 --enable-unicode-properties --enable-pcre16 --enable-pcre32 --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-pcretest-libreadline --disable-static
make
make install //PCRE is installed sucessfully..
5) Install PCRE2 // I have used default installation directory for compilation.
Command: ./configure --prefix=/usr --docdir=/usr/share/doc/pcre2-10.23 --enable-unicode --enable-pcre2-16 --enable-pcre2-32 --enable-pcre2grep-libz --enable-pcre2grep-libbz2 --enable-pcre2test-libreadline --disable-static
make
make install // PCRE2 is installed sucessfully..
6) Apache httpd installation.
Command: ./configure --prefix=/opt/httpd/ (PREFIX can be any directory where you want to install apache).
make
make install
6) mod_jk compilation with apache:
Command: $tomcat-connectors_source/native/./configure --with-apxs=/opt/httpd/bin/apxs //apxs is a script located in /bin directory of compiled apache
make
make install
7) Start/Stop apache.
Command: $APACHE_HOME/bin/./apachectl -k start/stop
8) Apache installation steps and troubleshooting is recorded in video below feel free to question in comments.
Reference:- http://httpd.apache.org/docs/2.4/install.html
Pre-Requisites:
Direct urls to download all pre-requisites
1) APR Download: http://www-eu.apache.org/dist//apr/apr-1.5.2.tar.gz
2) APR-UTIL Download: http://www-eu.apache.org/dist//apr/apr-util-1.5.4.tar.gz
3) PCRE Download: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.gz
4) PCRE2 Download: ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.23.tar.gz
5) OpenSSL Download: ftp://openssl.org/source/openssl-1.0.2k.tar.gz
6) mod_jk Download: http://www-us.apache.org/dist/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.42-src.tar.gz
7) Apache httpd Download: httpd.apache.org/download.cgi
=====================================================================
Follow below steps to install apache2.4.x.
1) Install C and C++ compilers using yum.
Command: yum install -y gcc*
2) Install/Compile APR. // I have used default installation directory for compilation.
Command: ./configure --prefix=/usr --with-apr=/usr --with-gdbm=/usr --with-openssl=/usr --with-crypto
make
make install // APR is installed sucessfully..
3) Install compile APR-Util. // I have used default installation directory for compilation.
Command: ./configure --prefix=/usr --with-apr=/usr --disable-static --with-installbuilddir=/usr/share/apr-1/build
make
make install //APR-Util is installed sucessfully..
Note: APR and APR-Util can be compiled with apache httpd and reduce above 2nd and 3rd steps.
Command: (Apache_source)./configure --with-apr=/httpd_source_tree_root/srclib/apr
4) Install PCRE. PCRE2 -- // This is optional and // I have used default installation directory for compilation.
Command: ./configure --prefix=/usr --docdir=/usr/share/doc/pcre-8.40 --enable-unicode-properties --enable-pcre16 --enable-pcre32 --enable-pcregrep-libz --enable-pcregrep-libbz2 --enable-pcretest-libreadline --disable-static
make
make install //PCRE is installed sucessfully..
5) Install PCRE2 // I have used default installation directory for compilation.
Command: ./configure --prefix=/usr --docdir=/usr/share/doc/pcre2-10.23 --enable-unicode --enable-pcre2-16 --enable-pcre2-32 --enable-pcre2grep-libz --enable-pcre2grep-libbz2 --enable-pcre2test-libreadline --disable-static
make
make install // PCRE2 is installed sucessfully..
6) Apache httpd installation.
Command: ./configure --prefix=/opt/httpd/ (PREFIX can be any directory where you want to install apache).
make
make install
6) mod_jk compilation with apache:
Command: $tomcat-connectors_source/native/./configure --with-apxs=/opt/httpd/bin/apxs //apxs is a script located in /bin directory of compiled apache
make
make install
7) Start/Stop apache.
Command: $APACHE_HOME/bin/./apachectl -k start/stop
8) Apache installation steps and troubleshooting is recorded in video below feel free to question in comments.
Comments
Post a Comment
Please comment