How to: Setup an Apache Web Server and Database

created by BasicSysAdmin

Tags: Linux, Ubuntu, Ubuntu 15.04, Ubuntu 16.04, Debian, Debian 6

May 27, 2016


This tutorial will cover the steps required to setup your own web server using Apache and MySQL.


In order to follow this tutorial, you will need the following

  • A Supported Operating System (See Tags above)

  • Sudo Permissions

  • Update Package list

    Before installing any new packages, it is always good idea to update your package list. You can do this by typing:
    sudo apt-get update

    Installing Packages

    Next, you can install Apache and MySQL using this command:
    sudo apt-get install apache2 mysql-server

    After you have done this, you will eventually receive the following screen asking you if you would like to continue, just press y and then the enter key.

    You will then be prompted to select a password for your mysql root user. Enter this and then confirm it.

    And thats it. You should now have your own web server. You can confirm this is working correctly by going to your ipaddress. You should see a page like this.