Choose your flavor for your linux OS, the 32-bit or 64-bit version.
Change the permissions to the installer
chmod 755 xampp-linux-*-installer.run
Run the installer
sudo ./xampp-linux-*-installer.run
That's all. XAMPP is now installed below the /opt/lampp directory.
Since XAMPP 5.5.30 and 5.6.14, XAMPP ships MariaDB instead of MySQL. The commands and tools are the same for both.
To start XAMPP simply call this command:
sudo /opt/lampp/lampp start
You should now see something like this on your screen:
Starting XAMPP 1.8.2...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP started.
Ready. Apache and MySQL are running.
If you get any error messages visit our community pages for help.
Also, note that there is a graphical tool that you can use to manage your servers easily. You can start this tool with the following commands:
cd /opt/lampp
sudo ./manager-linux.run (or manager-linux-x64.run)
To stop XAMPP simply call this command:
sudo /opt/lampp/lampp stop
You should now see something like this on your screen:
Stopping XAMPP 1.8.2...
LAMPP: Stopping Apache...
LAMPP: Stopping MySQL...
LAMPP stopped.
If you get any error messages visit our community pages for help.
Also, note that there is a graphical tool that you can use to start/stop your servers easily. You can start this tool with the following commands:
cd /opt/lampp
sudo ./manager-linux.run (or manager-linux-x64.run)
Type in the following URL at your favourite web browser:
http://localhost
Now you should see the XAMPP start page.
XAMPP is not meant for production use but only for development environments. The way XAMPP is configured is to be open as possible to allow the developer anything he/she wants. For development environments this is great but in a production environment it could be fatal.
Here a list of missing security in XAMPP:
To fix most of the security weaknesses simply call the following command:
sudo /opt/lampp/lampp security
It starts a small security check and makes your XAMPP installation secure. For example this protects the XAMPP demo pages by a username ('lampp') and password combination.
You may get several error messages while starting XAMPP:
LAMPP-Apache is already running.
An Apache daemon is already running.
The LAMPP startup script did not start XAMPP-Apache because there is an Apache instance already running. To start XAMPP properly, first you have to stop this daemon.
LAMPP-MySQL is already running.
A MySQL daemon is already running.
Mostly due to the same reasons as the above error, the LAMPP startup script found a MySQL daemon already running on your system. To start LAMPP properly, you have to stop this daemon first.
This error can exist for multiple reasons. Apache displays this error under several circumstances. To find the exact reason we have to do some research:
tail -2 /opt/lampp/logs/error_log
If you get any error messages visit our community pages for help.
Some Linux distributions have SELinux activated by default and this is preventing the successful start of XAMPP. You should disable it in order to start the XAMPP servers:
sudo /usr/sbin/setenforce 0
Now XAMPP should work fine again.
Correct. That's normal Linux behaviour (which applies to any other Unix-like system). It's the admin's job to make sure a particular application is started at bootup.
There is no real standard way to configure the boot process of a Linux system, but most of them should allow you to start XAMPP at boot time using the following steps.
Debian, Ubuntu.
sudo ln -s /opt/lampp/lampp /etc/init.d/lampp
sudo update-rc.d lampp start 80 2 3 4 5 . stop 30 0 1 6 .
RedHat, Fedora, CentOS. If your Linux distro uses "chkconfig" tool to install the services you can run the following commands:
sudo ln -s /opt/lampp/lampp /etc/init.d/lampp
sudo chkconfig --add lampp
SUSE
sudo ln -s /opt/lampp/lampp /etc/init.d/lampp
sudo chkconfig lampp 2345
In the default installation, XAMPP has no passwords set and it is not recommended to run XAMPP with this configuration accessible by others.
Simply type the following command (as root) to start a simple security check:
sudo /opt/lampp/lampp security
Now you should see the following dialog on your screen:
XAMPP: Quick security check...
XAMPP: Your XAMPP pages are NOT secured by a password.
XAMPP: Do you want to set a password? [yes] yes (1)
XAMPP: Password: ******
XAMPP: Password (again): ******
XAMPP: Password protection active. Please use 'lampp' as user name!
XAMPP: MySQL is accessable via network.
XAMPP: Normaly that's not recommended. Do you want me to turn it off? [yes] yes
XAMPP: Turned off.
XAMPP: Stopping MySQL...
XAMPP: Starting MySQL...
XAMPP: The MySQL/phpMyAdmin user pma has no password set!!!
XAMPP: Do you want to set a password? [yes] yes
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] yes
XAMPP: Write the passworde somewhere down to make sure you won't forget it!!!
XAMPP: Password: ******
XAMPP: Password (again): ******
XAMPP: Setting new MySQL root password.
XAMPP: Setting phpMyAdmin's root password to the new one.
XAMPP: The FTP password for user 'nobody' is still set to 'lampp'.
XAMPP: Do you want to change the password? [yes] yes
XAMPP: Password: ******
XAMPP: Password (again): ******
XAMPP: Reload ProFTPD...
XAMPP: Done.
(1) Setting a password will protect the XAMPP demo pages (http://localhost/xampp/) using this password. The user name is 'lampp'!
After calling this command your XAMPP installation should be more secure.
To activate eAccelerator simply find the following lines in your /opt/lampp/etc/php.ini:
;extension="eaccelerator.so"
;eaccelerator.shm_size="16"
;eaccelerator.cache_dir="/opt/lampp/tmp/eaccelerator"
;eaccelerator.enable="1"
;eaccelerator.optimizer="1"
;eaccelerator.check_mtime="1"
;eaccelerator.debug="0"
;eaccelerator.filter=""
;eaccelerator.shm_max="0"
;eaccelerator.shm_ttl="0"
;eaccelerator.shm_prune_period="0"
;eaccelerator.shm_only="0"
;eaccelerator.compress="1"
;eaccelerator.compress_level="9"
Remove the semicolon at the beginning of each line and restart XAMPP. eAccelerator is now active. For more information about eAccelerator, check the eAccelerator home page: http://eaccelerator.net.
To activate the OCI8/Oracle extension for PHP please execute the following command:
sudo /opt/lampp/lampp oci8
The following dialog will start:
Please enter the path to your Oracle or Instant Client installation:
[/opt/lampp/lib/instantclient-11.2.0.3.0]
installing symlinks...
patching php.ini...
OCI8 add-on activation likely successful.
LAMPP: Stopping Apache with SSL...
LAMPP: Starting Apache with SSL...
Now the extension should be active.
That's a special problem with some Linux systems. Please open your /opt/lampp/etc/httpd.conf and look for these two lines:
#EnableMMAP off
#EnableSendfile off
Remove the # in both lines and restart your Apache. Your images should be back.
In the basic configuration of XAMPP, phpMyAdmin is accessible only from the same host that XAMPP is running on, at http://127.0.0.1 or http://localhost.
IMPORTANT: Enabling external access for phpMyAdmin in production environments is a significant security risk. You are strongly advised to only allow access from localhost. A remote attacker could take advantage of any existing vulnerability for executing code or for modifying your data.
To enable remote access to phpMyAdmin, follow these steps:
Alias /phpmyadmin "/opt/lampp/phpmyadmin/"
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig
Require local
Alias /phpmyadmin "/opt/lampp/phpmyadmin/"
<Directory "/opt/lampp/phpMyAdmin">
AllowOverride AuthConfig
Require all granted
Warning: The backup and restore functionality is still under development and may not work correctly.
You can create the backup by calling:
sudo /opt/lampp/lampp backup
or
sudo /opt/lampp/lampp backup secret
Where "secret" is your MySQL root password. This command will create the following output:
Backing up databases...
Backing up configuration, log and htdocs files...
Calculating checksums...
Building final backup file...
Backup finished.
Take care of /opt/lampp/backup/xampp-backup-22-01-14.sh
The file /opt/lampp/backup/xampp-backup-22-01-14.sh (in the example above) contains your backup data. Store this file in a safe place.
On the new machine you need the same version of XAMPP as on your original/source machine.
sudo sh xampp-backup-22-01-14.sh
You should see something like this:
Checking integrity of files...
Restoring configuration, log and htdocs files...
Checking versions...
Installed: XAMPP 1.4.2
Backup from: XAMPP 1.4.2
Restoring MySQL databases...
Restoring MySQL user databases...
Backup complete. Have fun!
You may need to restart XAMPP to complete the restore.
That's all. Keep in mind that it's a beta feature.