How to install an Apache Server on ubuntu machine(A debian system)?

Step1 : Check if the package is installed or not

#dpkg -l | grep apache

This dpkg -l command is similar to rpm -qa command in Redhat linux to list all the applications installed in your system.

Step2 : Install the package if you did not get any output

#apt-get install apache*

Step3 : Now start the apache service

#service apache2 restart

Step4 : On the service at booting time

#chkconfig apache2 on

Step5 : Check if the web server is running or not by accessing local host

#elinks localhost

Or

Access localhost from browser

Here is the screen shot showing the test web page when apache is installed