- The steps in this tutorial require the user to have root permission.
- There are many different ways to achieve the same result but I found the following steps simpler than other methods.
- This tutorial has been tested on a fresh copy of Ubuntu 14.04 on a Virtual Machine (VM)
- To restart apache web server you can run the following command:
sudo /etc/init.d/apache2 restart
- instal Apache2 by running the following command in command line (Ctrl + Alt + T):
- your default browser and navigate to
http://localhost. If Apache is installed correctly you should be able to see “It works!” page which is the content of
index.htmlfile located in
- Install MySql by running the following command in command line (Ctrl + Alt + T):
- Before installation is complete you will be asked to provide the root password:
- Install PHP5 and libapache2-mod-php5 packages:
sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php5 libapache2-mod-php5
Congratulations, you have now installed a fully functional Ubuntu web server!