Install LAMP ubuntu 16.04

Install and configure LAMP

Install apache2:

Set Global ServerName to Suppress Syntax Warnings. Append in /etc/apache2/apache2.conf (bottom of the file):

Launch the command:

you should receive the message Syntax OK.

Restart Apache to implement the changes:

Adjust the Firewall to Allow Web Traffic

http://your_server_IP_address to see the welcome page from apache.

Install MySQL

Set a secure password for the root user and launch the script to remove some dangerous defaults and lock down access to our database system

try the connection to the db with:

Install PHP

Modify the way that Apache serves files when a directory is requested serving php file before instead of html edit the file:

And insert the php index file before:

restart apache: sudo /etc/init.d/apache2 restart

test php with a phpinfo page.

Resources:

DB dump

myslqdump (mysql – mariadb)

EXPORT

export an entire database

export an entire database using gzip compression

export from a remote database (presuming the MySQL server is on port 3306)

IMPORT

import sql data file

DROP

Drop a database