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.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
Share and Enjoy
  • Facebook
  • Twitter
  • LinkedIn
  • StumbleUpon
  • RSS
  • email
  • PDF

Published by


Ph.D. Student in the Department of Computer and Systems Sciences, Stockholm University.

Leave a Reply

Your email address will not be published.