Saturday, July 2, 2016

How To Install Apache Web Server On Linux

How To Install
Apache Web Server
On Linux



Apache is an open source Web server developed by a loosely-knit group of programmers released under Apache License. The first version of Apache, based on the NCSA httpd Web server, was developed in 1995.

The original version of Apache was written for UNIX, but there are now versions that run under OS/2, Windows and other platforms.
According to wikipedia and FAQ, The name 'Apache' was chosen from respect for the Native American Indian tribe of Apache (Indé), well-known for their superior skills in warfare strategy and their inexhaustible endurance. A common misunderstanding is that it was called Apache because it was developed from existing NCSA code plus various patches, hence the name a patchy server, or Apache server.

Apache Web Servers are often used in combination with the MySQL database engine, the HyperText Preprocessor (PHP) scripting language, and other popular scripting languages such as Python and Perl. This configuration is termed LAMP (Linux, Apache, MySQL and Perl/Python/PHP) and forms a powerful and robust platform for the development and deployment of Web-based applications.

Here, I'm going to show you how to install Apache web server on different Linux systems..

Install Apache Web Server On Ubuntu Linux

Open terminal and run the following command..

sudo apt-get install apache2

Or, On Newer systems (Ubuntu 16.04 and later versions..)

sudo apt install apache2

You can find information about configuring Apache webserver on Ubuntu wikipage

Install Apache Web Server On CentOS, RHEL and Fedora Linux

For Fedora 22 and Later Releases..

sudo dnf -y install httpd

For CentOS, RHEL, Fedora 21 and earlier versions..

sudo yum -y install httpd

Install Apache Web Server on Arch Linux

First, make sure that your Arch Linux System is up-to-date by running following command

sudo pacman -Syu

Now Install Apache web server..

sudo pacman -S apache

Install Apache Web Server on SUSE Linux

sudo zypper install apache2

Install Apache Web Server on Gentoo Linux

Run the following command to ensure that your Gentoo Linux System is up-to-date..

sudo emerge --sync && sudo emerge --update world

Now run the following command to install apache on Gentoo..

sudo emerge -pv apache

Enabling/starting and testing the apache installation..

Enable the httpd service to start automatically on every reboot and start the service with systemd ...

sudo systemctl enable httpd && sudo systemctl start httpd

After successful installation of Apache web server check whether it's working properly or not.. To do so.. Just visit localhost in your web browser. You should see an Apache Test Page, like one shown in following image...