Install Apache on Ubuntu

Apache HTTP Server is usually installed on a Linux distribution, although it has been ported to other operating systems as well. In this section we will describe a how to install Apache on Ubuntu, one of the most popular Linux distributions out there. The process is really simple and involves just two commands.

First, update the packages on your Ubuntu installation by running the sudo apt-get update && sudo apt-get upgrade command:

upgrade ubuntu

After the upgrade process finishes, run the sudo apt-get install apache2 command to install Apache. Press Y when prompted:

ubuntu install apache

Apache should automatically start. To verify that, run the service apache2 status command:

ubuntu apache status

To verify that Apache web server is working, go to your browser and simply type localhost in the address bar. You should get the Apache2 Ubuntu Default Page.

Geek University 2021