XAMPP is a LAMP development environment, ideal for use locally. It can be downloaded from:
https://apachefriends.org
The recommended version is xampp-linux-x64-7.4.6-0-installer.run (NOTE: the version of this file has surely changed since the time this guide was created), as it is the most compatible for the most common WordPress or Prestashop developments, to name a few. Once downloaded, we give execute permission to the downloaded file. To do this, from the terminal:
chmod 755 xampp-linux-x64-7.4.6-0-installer.run
Now comes the time for installation. Two different cases are presented: One, is that we are in an x11 environment. If so, the installation will be graphic, and we will see the screens that will be presented below. A second case is that we find ourselves installing XAMPP in Wayland. In this case, the installation will be by the terminal and in text mode. Here we will explain the case of the installation under Xorg.
We begin to install it from the terminal (and inside the folder where the file is located). In this example, the file is located in the user's folder:
sudo ./xampp-linux-x64-7.4.6-0-installer.run
We will see the following screen:
We begin the installation with a click on Next:
On this screen we are asked to select the components that we want to install. Leave everything as it is, and click on Next:
Here, it indicates that the destination of the installation will be /opt/lampp, click on Next again:
On this screen it gives us the option to inform us about XAMPP. Remove the mark, and click again on Next:
We are one step away from starting the installation. To do this, click on Next:
Now, just click Next and the installation will begin:
Wait until it finishes (the installation will take a while, so don't be impatient), which will happen when you see the following screen:
At this point, uncheck Launch XAMPP to prevent it from running, and then click Finish.
We could use pkexec to create the shortcut to run XAMPP graphically. This procedure is applicable to any other Linux distribution. First of all, we must have a user daemon belonging to the group daemon. This is true in RebornOS. How can we verify this? Viewing the file passwd, for example:
cat /etc/passwd
We would see something like this:
root:x:0:0::/root:/bin/bash
bin:x:1:1::/:/usr/bin/nologin
daemon:x:2:2::/:/usr/bin/nologin
mail:x:8:12::/var/spool/mail:/usr/bin/nologin
ftp:x:14:11::/srv/ftp:/usr/bin/nologin
http:x:33:33::/srv/http:/usr/bin/nologin
nobody:x:65534:65534:Nobody:/:/usr/bin/nologin
dbus:x:81:81:System Message Bus:/:/usr/bin/nologin
systemd-journal-remote:x:982:982:systemd Journal Remote:/:/usr/bin/nologin
systemd-network:x:981:981:systemd Network Management:/:/usr/bin/nologin
systemd-resolve:x:980:980:systemd Resolver:/:/usr/bin/nologin
systemd-timesync:x:979:979:systemd Time Synchronization:/:/usr/bin/nologin
systemd-coredump:x:978:978:systemd Core Dumper:/:/usr/bin/nologin
uuidd:x:68:68::/:/usr/bin/nologin
avahi:x:976:976:Avahi mDNS/DNS-SD daemon:/:/usr/bin/nologin
colord:x:975:975:Color management daemon:/var/lib/colord:/usr/bin/nologin
cups:x:209:209:cups helper user:/:/usr/bin/nologin
dhcpcd:x:974:974:dhcpcd privilege separation:/var/lib/dhcpcd:/usr/bin/nologin
dnsmasq:x:973:973:dnsmasq daemon:/:/usr/bin/nologin
flatpak:x:972:972:Flatpak system helper:/:/usr/bin/nologin
gdm:x:120:120:Gnome Display Manager:/var/lib/gdm:/usr/bin/nologin
geoclue:x:971:971:Geoinformation service:/var/lib/geoclue:/usr/bin/nologin
git:x:970:970:git daemon user:/:/usr/bin/git-shell
polkitd:x:102:102:PolicyKit daemon:/:/usr/bin/nologin
rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/usr/bin/nologin
rtkit:x:133:133:RealtimeKit:/proc:/usr/bin/nologin
usbmux:x:140:140:usbmux user:/:/usr/bin/nologin
rafa:x:1000:1000:Rafael Costa Rega:/home/rafa:/bin/bash
jackett:x:969:969:Jackett daemon:/var/lib/jackett:/usr/bin/nologin
deluge:x:968:968:Deluge BitTorrent daemon:/srv/deluge:/usr/bin/nologin
transmission:x:169:169:Transmission BitTorrent Daemon:/var/lib/transmission:/usr/bin/nologin
spamd:x:182:182::/var/lib/spamassassin:/usr/bin/nologin
mysql:x:967:1001::/home/mysql:/bin/bash
Here what we have is a list of the users of the system. And daemon is present. Right. In order to run the manager-linux-x64.run file (which is in charge of the graphical handling of XAMPP) using pkexec, we must first create a rule, which we will save in /usr/share/polkit-1/actions/. It is generated in the following way:
sudo nano /usr/share/polkit-1/actions/com.ubuntu.pkexec.xampp.policy
Inside copy (all this is a single line):
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE policyconfig PUBLIC "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN" "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd"> <policyconfig> <action id="com.ubuntu.pkexec.xampp.policy"> <message>Authentication is required to run XAMP Control Panel</message> <icon_name>xampp</icon_name> <defaults> <allow_any>auth_admin</allow_any> <allow_inactive>auth_admin</allow_inactive> <allow_active>auth_admin</allow_active> </defaults> <annotate key="org.freedesktop.policykit.exec.path">/opt/lampp/manager-linux-x64.run</annotate> <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate> </action> </policyconfig>
Save (Ctrl S), and exit(Ctrl X). The file can be run as administrator, using the following line:
pkexec /opt/lampp/manager-linux-x64.run
To create a desktop shortcut,
sudo nano /usr/share/applications/XAMPP.desktop
Inside paste:
[Desktop Entry]
Version=1.0
Name=XAMPP
Name[ca]=XAMPP
Name[cs]=XAMPP
Name[da]=XAMPP
Name[de]=XAMPP
Name[en]=XAMPP
Name[es]=XAMPP
Name[eu]=XAMPP
Name[fa]=XAMPP
Name[fr]=XAMPP
Name[gl]=XAMPP
Name[hu]=XAMPP
Name[it]=XAMPP
Name[ja]=XAMPP
Name[ko]=XAMPP
Name[nb]=XAMPP
Name[nl]=XAMPP
Name[nn]=XAMPP
Name[pl]=XAMPP
Name[pt]=XAMPP
Name[pt_BR]=XAMPP
Name[ro]=XAMPP
Name[ru]=XAMPP
Name[sk]=XAMPP
Name[uk]=XAMPP
Name[zh_CN]=XAMPP
Comment=Web Development Editor
Comment[ca]=Entorn local de desenvolupament LAMP
Comment[cs]=Místní vývojové prostředí LAMP
Comment[da]=Lokalt udviklingsmiljø LAMP
Comment[de]=Lokale Entwicklungsumgebung LAMP
Comment[en]=Local development environment LAMP
Comment[es]=Entorno local de desarrollo LAMP
Comment[eu]=Tokiko garapen ingurunea LAMP
Comment[fa]=محیط توسعه محلی LAMP
Comment[fr]=Environnement de développement local LAMP
Comment[gl]=Ambiente de desenvolvemento local LAMP
Comment[hu]=Helyi fejlesztési környezet LAMP
Comment[it]=Ambiente di sviluppo locale LAMP
Comment[ja]=ローカル開発環境LAMP
Comment[ko]=웹 개발 편집기
Comment[nb]=Lokalt utviklingsmiljø LAMP
Comment[nl]=Lokale ontwikkelingsomgeving LAMP
Comment[nn]=Skriveprogram for nettsideutvikling
Comment[pl]=Lokalne środowisko rozwoju LAMPA
Comment[pt]=Ambiente de desenvolvimento local LAMP
Comment[pt_BR]=Ambiente de desenvolvimento local LAMP
Comment[ru]=Локальная среда разработки LAMP
Comment[uk]=Середовище місцевого розвитку LAMP
Comment[zh_CN]=网页开发编辑器
Keywords=programming;code;web;editor;development;html;php;python;
Keywords[ca]=programació;codi;web;editor;desenvolupament;html;php;python;
Keywords[cs]=programování;kód;kódování;web;www;editor;vývoj;html;php;python;
Keywords[da]=programmering;kode;web;editor;udvikling;html;php;python;
Keywords[de]=Programmierung;Code;Web;Editor;Entwicklung;HTML;PHP;Python;
Keywords[es]=programación;código;web;editor;desarrollo;html;php;python;
Keywords[fa]=برنامه نویسی; کد; وب; ویرایشگر; توسعه; اچ تی ام ال ; پی اچ پی; پایتون;
Keywords[fr]=programmation;code;web;éditeur; développement;html;php;python;
Keywords[hu]=programozás;kód;web;szerkesztő;fejlesztés;html;php;python;
Keywords[it]=programmazione;codice;web;editor;sviluppo;html;php;python;
Keywords[nb]=programmering;kode;web;editor;utvikling;html;php;python;
Keywords[nl]=programming;code;web;ontwikkeling;development;html;php;python;
Keywords[nn]=programming;code;web;editor;development;html;php;python;
Keywords[pl]=programowanie;kod;sieć;edytor;rozwój;html;php;python;
Keywords[uk]=programming;code;web;editor;development;html;php;python;програмування;код;редактор;веб;інтернет;розробка;пітон;
Exec=pkexec /opt/lampp/manager-linux-x64.run
Icon=xampp_icon_flat_circle.png
Terminal=false
Type=Application
StartupNotify=true
Categories=GTK;GNOME;Development;WebDevelopment;
MimeType=
Te line:
Icon=xampp_icon_flat_circle.png
use the xampp_icon_flat_circle.png icon. Does not have it? We leave it to you below.
NOTE: The browser will show you the icon image (it will be large). Right click, download the image, and go back to this publication with the browser.
Download XAMPP icon
When executing it by using this created shortcut (it will ask us for the administrator password first), we will see the following screen:
Click on the tab that says Manage Servers:
In this case, we see that the three services (MySQL, ProFTPD, and Apache Web Server, are stopped. In case any of them were active (instead of the circle in red, we would see some in green), you have to stop that service (mark it with the mouse and click on Stop, or simply press the Stop All button) Then start all services by clicking on the Start All button:
Once everything is activated, XAMPP security will have to be configured. XAMPP initially has the following default values:
(1). MySQL administrator (root) has no password.
(2). The MySQL process is accessible through the network.
(3). ProFTPD uses the password xampp for the user daemon.
(4). PhpMyAdmin is accessible through the network.
(5). The examples are accessible via the network.
Execute from the terminal:
sudo /opt/lampp/lampp security
The following message will be displayed:
XAMPP: Quick security check...
XAMPP: MySQL is accessable via network.
XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes]
It indicates that MySQL can be accessed over the network. This is not recommended. What you have to do is disable it, which is done by answering yes with y or Enter.
Then, the following message will be displayed:
XAMPP: Turned off.
XAMPP: Stopping MySQL...ok.
XAMPP: Starting MySQL...ok.
XAMPP: The MySQL/phpMyAdmin user pma has no password set!!!
XAMPP: Do you want to set a password? [yes]
In this case, after disabling MySQL access by network, it tells us that it does not have a password for its user pma. We will create one for you then, answering yes with y or Enter. We will be asked to enter the password twice, to confirm it:
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Setting new MySQL pma password.
XAMPP: Setting phpMyAdmin's pma password to the new one.
XAMPP: MySQL has no root passwort set!!!
XAMPP: Do you want to set a password? [yes]
Here we are told that the MySQL user pma has a new password, but that the administrator user does not. We will then create one for him, answering yes with y or '''Enter**, (same procedure as the previous case):
XAMPP: Write the password somewhere down to make sure you won't forget it!!!
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Setting new MySQL root password.
XAMPP: Change phpMyAdmin's authentication method.
XAMPP: The FTP password for user 'daemon' is still set to 'xampp'.
XAMPP: Do you want to change the password? [yes]
It tells us that the password for the MySQL administrator user has been created, and that ProFTPD can be run, with the user daemon and the password xampp. It tells us if we want to change this password, and we answer yes with y or Enter:
XAMPP: The FTP password for user 'daemon' is still set to 'xampp'.
XAMPP: Do you want to change the password? [yes]
Here it tells us if we want to change the default password for FTP (user daemon and password xampp), we recommend changing it. Respond with Enter and type the new one:
XAMPP: Password:
XAMPP: Password (again):
XAMPP: Reload ProFTPD...ok.
XAMPP: Done.
All ready. Security is ready. All passwords must be kept in a safe place. Next, we recommend some changes to be able to work properly with Prestashop or with WordPress. Normally there will be databases to import that will be large, and the waiting time assigned by XAMPP is small for them, so errors will occur when working with them. We will indicate these changes below.
Edit the php.ini:
sudo nano /opt/lampp/etc/php.ini
At the end of the file, add the following line:
max_input_vars = 17000
In the same file:
(1). Look for max_size it will have a value of 40M change it to 800M
(2). Look for upload_max_filesize it will have a value of 40M change it to 800M
(3). Look for memory_limit it will have a value of 512M change it to 800M
(4). Look for max_execution_time it will have a value of 120 change it to 1700
(5). Look for max_input_time it will have a value of 60 change it to 1700
Save the changes (Ctrl O & Ctrl X). Now edit the phpmyadmin configuration file:
sudo nano /opt/lampp/phpmyadmin/config.inc.php
For security, it would be convenient to modify the blowfish secret of the file, which by default is xampp ( line: $cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH!):
/**
* This is needed for cookie based authentication to encrypt password in
* cookie. Needs to be 32 chars long.
*/
$cfg['blowfish_secret'] = 'xampp'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
To obtain a more secure password, it is best to use Blowfish secret generator.
Where at each access you get a new randomly generated password; copy it to replace xampp (pay attention to leave the quotation mark of beginning and end: ' ), for example:
* This is needed for cookie based authentication to encrypt password in
* cookie. Needs to be 32 chars long.
*/
$cfg['blowfish_secret'] = '@R3h3~*VZYYzTl{]zaphSdE3+*uUzS+%jHqoP^fng$_Y|v'; /* YOU SHOULD CHANGE THIS FOR A MORE SECURE COOKIE AUTH! */
Then remove the comment from the last 8 lines (i.e. remove the //):
/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
// $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
// $cfg['Servers'][$i]['users'] = 'pma__users';
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
/**
So, it will look like this:
/* Storage database and tables */
$cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
$cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
$cfg['Servers'][$i]['relation'] = 'pma__relation';
$cfg['Servers'][$i]['table_info'] = 'pma__table_info';
$cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
$cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
$cfg['Servers'][$i]['column_info'] = 'pma__column_info';
$cfg['Servers'][$i]['history'] = 'pma__history';
$cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
$cfg['Servers'][$i]['tracking'] = 'pma__tracking';
$cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
$cfg['Servers'][$i]['recent'] = 'pma__recent';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_coords'] = 'pma__designer_coords';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['favorite'] = 'pma__favorite';
$cfg['Servers'][$i]['users'] = 'pma__users';
$cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
$cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
$cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
$cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
$cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
$cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
/**
Save and exit (Ctrl O & Ctrl X). Restart all services by clicking the Restart All button. Start phpmyadmin from the browser, specifying the address:
http://localhost/phpmyadmin
Access with the user root and the password that you have indicated.
To use XAMPP, the user must be in the daemon group. The default directory for local installations is /opt/lampp/htdocs
. You could create a folder inside it, named webs for example, to have everything more organized:
sudo mkdir /opt/lampp/htdocs/webs
Assuming that the name of our user was user, we would assign to that folder the group daemon and write permissions for our user with:
sudo chown -R pepe:daemon /opt/lampp/htdocs/webs/
chmod -R 777 /opt/lampp/htdocs/webs/
Remember to change user for your username. When we work with our developments, when we want to make a backup, it is recommended to repeat the previous commands to avoid problems when copying them to another location.
(1). Autostart on boot
In order to start Xampp at boot, create a systemd service for it (/etc/systemd/system/xampp.service
):
sudo nano /etc/systemd/system/xampp.service
Inside we paste:
[Unit]
Description=XAMPP
[Service]
ExecStart=/opt/lampp/lampp start
ExecStop=/opt/lampp/lampp stop
Type=forking
[Install]
WantedBy=multi-user.target
Then activate xampp.service:
sudo systemctl enable xampp.service
(2). Use from terminal
Use the following commands to control XAMPP (this would be the method to use XAMPP under Wayland):
To start XAMPP:
sudo /opt/lampp/lampp start
To stop XAMPP:
sudo /opt/lampp/lampp stop
To restart XAMPP:
sudo /opt/lampp/lampp restart
If the following error is observed when trying to run XAMPP:
Starting XAMPP for Linux 1.7.7...
/opt/lampp/lampp: line 21: netstat: command not found
/opt/lampp/lampp: line 21: netstat: command not found
XAMPP: Starting Apache with SSL (and PHP5)...
/opt/lampp/lampp: line 241: /bin/hostname: No such file or directory
/opt/lampp/lampp: line 21: netstat: command not found
XAMPP: Starting MySQL...
/opt/lampp/bin/mysql.server: line 263: hostname: command not found
/opt/lampp/lampp: line 21: netstat: command not found
XAMPP: Starting ProFTPD...
XAMPP for Linux started.
Then install net-tools
and inetutils
from the official repositories.