Install LAMP on Ubuntu 16.04

Download XAMPP/LAMPP (Linux + Apache + MariaDB + PHP + Perl) from Apache Friends:

Change the permissions to the installer
chmod 755 xampp-linux-[your version type and number goes here]

Run the installer
sudo ./xampp-linux-*

To start LAMP
sudo /opt/lampp/lampp start

To stop LAMP
sudo /opt/lampp/lampp stop

Graphical tool to manage your servers
cd /opt/lampp
sudo ./ (or

Check installation
Type http://localhost in your web browser.

Change ownership of htdocs
sudo chown -R username:username /opt/lampp/htdocs [Replace username with your own username]

Update httpd.conf file
sudo gedit /opt/lampp/etc/httpd.conf

In the file, find the following lines:
User nobody
Group nogroup

Replace nobody with your username and save the file.

Now you can create, delete, and manage files / folder in htdocs folder. To test it, open the opt/lampp/htdocs folder and create some files.