}

Ubuntu 18.04: Installing Apache2 + PHP5 + MySQL + phpMyAdmin

Created:

Step1: Install Apache2

    sudo apt-get update
    sudo apt-get install apache2

Step 2: Change DocumentRoot (optional)

    sudo vi /etc/apache2/sites-available/default

Update /var/www to your path in line:

    DocumentRoot /var/www

and repeat it in line:

    <Directory /var/www/>
    sudo service apache2 restart

Step 3: Install PHP5

``` bash sudo apt-get install php5 libapache2-mod-php5 php5-mysql


#Step 4: Install MySQL and phpMyAdmin

``` bash
    sudo apt-get install mysql-server
    sudo apt-get install phpmyadmin