Sunday, January 25, 2015

[Linux] Install Apache 2.4.10 from source package

Requirements:
  1. Centos (any version, but in this case we use 6.3)
  2. APR
  3. APR-UTIL
  4. PCRE
  5. Apache 2.4.10 tarball

1) Create new folder:
       mkdir /etc/httpd-2.4.10

2) Then, install APR:
   download APR from https://apr.apache.org/download.cgi (* in this case we use apr-1.5.1)
   after download, untar the apr-<version>.tar.gz

  •     tar -xzvf apr-<version>.tar.gz <enter>
  •     cd apr-<version> <enter>
  •     ./configure --prefix=/etc/httpd-2.4.10/dep/apr <enter>
  •     make; make install <enter>

3) Install apr-util:
   download apr-util from https://apr.apache.org/download.cgi (* in this case we use apr-util-1.5.4)
   untar the apr-util-<version>.tar.gz

  •     tar -xzvf apr-util-<version>.tar.gz <enter>
  •     cd apr-util-<version> <enter>
  •     ./configure --prefix=/etc/httpd-2.4.10/dep/apr-util --with-apr=/etc/httpd-2.4.10/dep/apr <enter>
  •     make; make install <enter>

4) Install pcre:
   download pcre from http://www.pcre.org/ (* in this case we use pcre-8.36)
   untar the pcre-<version>.tar.gz

  •     tar -xzvf pcre-<version>.tar.gz <enter>
  •     cd pcre-<version> <enter>
  •     ./configure --prefix=/etc/httpd-2.4.10/dep/pcre --enable-utf8 --enable-unicode-properties <enter>
  •     make; make install <enter>

5) Now install httpd-2.4.10:
   download httpd from http://www.apache.org/dyn/closer.cgi
   untar the httpd-2.4.10.tar.gz

  •     tar -xzvf httpd-2.4.10.tar.gz <enter>
  •     cd httpd-2.4.10 <enter>
  •     ./configure --prefix=/etc/httpd-2.4.10 --enable-mods-shared="all" --enable-so --with-apr=/etc/httpd-2.4.10/dep/apr --with-apr-util=/etc/httpd-2.4.10/dep/apr-util --with-pcre=/etc/httpd-2.4.10/dep/pcre --enable-ssl <enter> (* ./configure --help   to see the option)
  •     make; make install <enter>

TQVM
MJMZ