How to install Apache2 using ubuntu 16.04 - TechBeginner

Welcome to TechBeginner.in, Tech Beginner provides technical blog for Online Linux Tutorials, Ubuntu Tutorials, Redhat Tutorials and CentOS 7, Configuration of server like Web Server, Application server, Database server, Window server, networking, html, css, java script, php, wordpress, opencart, magento, joomla and etc.

How to install Apache2 using ubuntu 16.04

Share This


The Apache is an free and open-source cross-platform HTTP Server, Apache web servers are used to serve Web pages requested by client browser, Developed and maintained by Apache Software Foundation.

Installing Apache

By default, Apache repo is already available in ubuntu repo, To install Apache2 in your machine you need to update the repo and use the following commands to install apache2.

sudo -i
apt-get update
apt-get install apache2 -y

by default apache service will start while installationg apache2 package, To test the apache default web page you need to open the web url http://localhost and you should get the web page like this:-


Controlling Apache service

To get status of the Apache2 service use the following commands.

systemctl status apache2

To stop of the Apache2 service use the following commands.

systemctl stop apache2

To reload of the Apache2 service use the following commands.

systemctl reload apache2

To enabled on boot  of the Apache2 service use the following commands.

systemctl enable apache2

To disabled on boot  of the Apache2 service use the following commands.

systemctl disable apache2

No comments:

Post a Comment