A quick guide to learn how to install Apache HTTP Server on Linux environment

Apache is the most popular web servers and if you are working as System Administrator then it’s very likely that you will not cross the path to Apache HTTP.

This is not typical yum installation instead download the source code and compile on your Linux environment. Let’s get it started with download and installation procedure.

Download Apache HTTP

  • Once downloaded, you should have httpd-2.4.6.tar.gz as shown below

Installing Apache HTTP

We will install Apache under /opt/apache directory with mod_ssl enabled.


  • ANSI-C compiler and Build system – ensure you have GCC or CC compiler installed on your server and set in PATH. You can install GCC with yum as following.
# yum install gcc
  • Apr/apr-util – ensure you have apr/apr-util 1.2 installed on your server.
  • OpenSSL – ensure you have the latest OpenSSL version on your server. You can install OpenSSL with yum as following.
# yum install openssl
  • Let’s extract the downloaded file under /opt/apache by executing below command
# gunzip –c httpd-2.4.6.tar.gz | tar xvf –
  • Now you could see it has extracted everything into new folder httpd-2.4.6

  • Go to httpd-2.4.6 folder
  • Let’s compile and install the Apache source code
[/opt/apache/httpd-2.4.6] # ./configure --with-apr=/usr/local/apr/bin/apr-1-config --prefix=/opt/apache/ --enable-ssl --enable-so
[/opt/apache/httpd-2.4.6] # make
[/opt/apache/httpd-2.4.6] # make install

Let’s understand the configured syntax in the better way.

  • –with-apr=
  • –prefix=Provide location where you wish to install, in this example apache, will be installed under /opt/apache
  • –enable-ssl this will compile apache with SSL enabled so can secure apache web server with SSL cert.
  • –enable-so

Upon successful compilation, you could see Apache is installed under /opt/apache as following.

Now, we can delete httpd-2.4.6.tar.gz and httpd-2.4.6 folder from this location, as these are no longer required.

# rm –rf httpd-2.4.6.tar.gz httpd-2.4.6

I hope this helps with the installation and now it’s your turn to play around and get familiar with it.

Reader Interactions


  1. Hi. I’m interesting in the reverse prozy installations and secure it. For example, i want use a reverse proxy (apache) and the back end apaxhe tomcat. I want to connect it by ajp or proxy pass. And the most important is the secure it (owasp, mod_evasive, xss, sql injection,…..)
    Thanks you very much!!!


Your email address will not be published. Required fields are marked *