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.