Install LAMP on Ubuntu 16.04

Download XAMPP/LAMPP (Linux + Apache + MariaDB + PHP + Perl) from Apache Friends: https://www.apachefriends.org.

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

Run the installer
sudo ./xampp-linux-*-installer.run

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 ./manager-linux.run (or manager-linux-x64.run)

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.

Share and Enjoy
  • Facebook
  • Twitter
  • LinkedIn
  • del.icio.us
  • StumbleUpon
  • RSS
  • email
  • PDF

Published by

Samuel

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

Leave a Reply

Your email address will not be published. Required fields are marked *