How to Install the Apache HTTP Web Server on Linux
The Apache HTTP Server is called Apache, Apache is a Web server application which is suitable for All LINUX and UNIX distribution and also support for windows. Its serving .html, .php, .pl, .cgi, etc ,..Apache is developed and maintained by open community of developers under Apache Software Foundation.
The Apache Software Foundation were pleased to announced the latest version of Apache 2.4.20 on April 11, 2016 with bug fixes. Alternatively you can install Nginx & Lighttpd Web Servers which will give better performance for Dynamic websites compare with Apache. You may also like other Web Servers too.
1) Install Apache2 on Ubuntu & Mint Systems
We can easily install latest version of apache2 by adding below PPA to Ubuntu & Mint systems.
$ sudo add-apt-repository ppa:ondrej/apache2 $ sudo apt-get update $ sudo apt-get install apache2
2) Install Apache2 on Linux Systems
We can easily install apache2 to all Linux distributions from distribution official repository.
[For CentOS/RHEL & upto Fedora 21] # yum install httpd [Fedora 22 & later] # dnf install httpd [For openSUSE/SUSE] # zypper install apache2 [For Ubuntu/Debian/LinuxMint] $ sudo apt-get install apache2 [For Mageia] $ sudo urpmi apache [For Ubuntu/Debian/LinuxMint] $ sudo pacman -S apache
Restart Apache Web Server on SysVinit systems.
# service apache2 restart [Debian/Mint/Ubuntu] # service httpd restart [RHEL/CentOS/Fedora]
Restart Apache Web Server on systemd systems.
# systemctl restart apache2.service [Debian/Mint/Ubuntu] # systemctl restart httpd.service [RHEL/CentOS/Fedora]
[Check Apache version]
$ apache2 -v Server version: Apache/2.4.20 (Ubuntu) Server built: Apr 27 2016 15:59:00