Apache Webserver - Installation from source (tar.gz and tar.bz2)

    Installing from source used to be very common and also quite simple. You would download the source file, unpack it (with either zip or tar), then issue the commands to the the directory you want to install it.

Crons:
  1. Allows us to install required version.
  2. Customizing Modules.
  3. To configure and integrate with other source packages.

    In this articles we gonna install the Apache through source file on /usr/local/ directory.

Get the source file for the desired version from the official website of Apache, where you can find the latest version. click here to download latest package

You can either download or wget the file (tar.gz and tar.bz2 are available).



Untar the package,



On default apache the portable runtime libraries are installed by default, when it comes to source installation you have to install it manually. To know more about APR click here

Download the apr and apr-util,

APR:



APR-UTILS:



Untar the packages,




Rename the packages to apr and apr-utils,






Move the directories to the the source library of the extracted apache directory,



In Source installation there are 3 necessary commands to be used ./confgiure, make and make install.

On source installation apache should met some dependencies to be installed,

For Centos,



For Ubuntu,



Run the below ./configure command which installs apache on the desired path with the modules enabled for a basic installation.


    You can also add modules according to your setup, the above command enables basic modules for apache.

    Run make and make install once the configure is completed,





The default conf file will be  /usr/local/apache-2.4.37/conf/httpd.conf

Now start the customized installed apache installed on your /usr/local/ directory.


To test your configuration you can use the below command,



Enter the browser and enter the IP of the system or 127.0.0.1 if it is installed in local system. You can view the test page as It works on your browser.


Now you have successfully installed and configured customized apache on your system.

For older versions click Older Version


Feel free to ask if you have any questions.


Comments

Popular Posts on this blog

How to Install LAMP Stack on Linux - Ubuntu 17.04

Creating and Running Virtual Machines in LINUX - KVM - Cli Mode

Replacing Commands for Linux Files - Using Perl and Sed

How to install Docker on Ubuntu-17.04

Setting up a Mail server using Roundcube - Part-3 - Centos 7

Blog Top Sites

Blog Log