This is an up-to-date guide to how to install and configure XAMPP on GNU / Linux, with a detailed step-by-step.
What is XAMPP?
XAMPP is a completely free and easy to install Apache distribution that contains MariaDB, PHP, and Perl. The XAMPP installation package has been designed to be incredibly easy to install and use. Completely free and easy to install Apache distribution containing MariaDB, PHP, and Perl.
How to install and configure XAMPP?
Installing Xampp
1.- Download XAMPP for Linux from https://www.apachefriends.org/es/index.html
2.- At the end of the download we have a archive .run, which we must install in the following way:
- We open a Terminal with Control + T, or from our menu.
- We log in as root:

- We proceed to give execution permissions to the .run and to install XAMPP
$ sudo su $ chmod + x xampp-linux-x64-5.6.28-0-installer.run $ ./xampp-linux-x64-5.6.28-0-installer.run



- We accept everything and wait for the installation to finish.
Setting up XAMPP
3.- We proceed to configure XAMPP
- MySQL Configuration (MariaDB)
$ ln -s / opt / lampp / bin / mysql / usr / bin / $ which mysql $ type mysql $ ls -lart / usr / bin / mysql
- Setting up the rule com.ubuntu.pkexec.xampp.policy for the graphical panel to run with administrator permissions this will generate a bash file that runs xampp-linux-x64-5.6.28-0-installer.run. For this we go to the route / usr / share / polkit-1 / actions and we execute:
$ touch com.ubuntu.pkexec.xampp.policy $ nano com.ubuntu.pkexec.xampp.policy
Inside the file com.ubuntu.pkexec.xampp.policy we paste the following code:
Authentication is required to run XAMP Control Panel xampp auth_admin auth_admin auth_admin /opt/lampp/manager-linux-x1.0.run true
- Creating the script responsible for executing the graphical panel of XAMPP in the path / usr / bin / . We must create the script with name xampp-control-panel:
touch xampp-control-panel nano xampp-control-panel
#! / bin / bash $ (pkexec /opt/lampp/manager-linux-x64.run);
- Setting up a .desktop to launch the XAMPP graphical service manager, run the following commands, in the path / usr / share / applications:
touch xampp-control-panel nano xampp-control-panel
- After running nano application.desktop enter the following code
[Desktop Entry] Comment = Start / Stop XAMPP Name = XAMPP Control Panel Exec = xampp-control-panel Icon = xampp Encoding = UTF-8 Terminal = false Type = Application
- Now we have an icon that when pressed will execute the PKEXEC, which asks us for a login to assign execution permissions to the XAMPP graphical panel. It should look something like this:
- To use mysql, if you did the previous configuration you no longer need to go to the directory / opt / lampp / bin / mysql -u root -p to log in now you just need to open a terminal and run
mysql -u root -p.
Now we can graphically manage our XAMPP and access mysql normally without going to the / opt / lampp / bin directory.
This is all the guide, I hope you liked it and do not forget to leave your comments.