How to Install XAMPP on Linux (Debian, RedHat, CentOS, Ubuntu, Fedora, Gentoo, Arch, OpenSUSE)

XAMPP  is an easy to install web development distribution for developers on the local machine. It provides Apache, MariaDB, PHP, PERL which are required for web development. You can install all these tools independently, but it not easy.

XAMPP makes your job easy. It bundles all of them together. On top of it, it is free and open source. It Includes Apache 2.4.38, MariaDB 10.1.38, PHP 7.3.2, Perl 5.16.3 and other supporting tools.

Read Also:-

Installing XAMPP on Linux

XAMPP is cross-platform that means it is available for Windows, Linux, and Mac OS. Visit the official download page. This page is updated frequently with the latest version download information. At the time of writing this article XAMPP – 5.6.40, 7.1.26, 7.2.15 & 7.3.2 versions are available.

Not able to download XAMPP from the above link?

The codebase is maintained on SourceForge Site. So visit the SourceForge site. Here you will find the code for all supported operating systems and versions.

Click the download link to download the respective Linux Version.

Change installer permission

Open the terminal and go to the directory where the file is downloaded. The installer is by default read-only. You need to change the permissions to the installer using chmod command as shown below.

chmod 755 xampp-linux-x64-7.3.2-0-installer.run

Run the installer to Start Installation

Next, run the installer using the below command.

sudo ./xampp-linux-x64-7.3.2-0-installer.run

This starts the installation process. This is the wizard-driven installation. Setup/Installer present screen to display information or get inputs from the user. You just need to click Next and install button.

Welcome to the XAMPP Setup Wizard is the first screen click Next button.

Install XAMPP on Ubuntu Setup Welcome Page
Setup Welcome Page

Select Components

Next screen shows you which component to install. You can clear the component if you do not want to install. Let it be the default, do not change anything. Click Next.

install XAMPP On Ubuntu Select Component

Installation Directory

Next screen shows the installation directory. There is no option to change it, just click Next.

install XAMPP on Ubuntu directory

Bitnami for XAMMP provides the free installer for WordPress, Drupal, Joomla and many other open sources CMS. If you want to explore it, just select/unselect the option.

bitnami for xampp

That’s it and you are ready to install. Just hit Next.

install xampp on Unbutu ready to install

This starts the installation and you could see the progress bar.

install xampp on Ubuntu installation started

Completing the XAMPP Setup Wizard

It completes with in seconds and setup confirms you back with the below message. You have the option to launce it from here.

install xampp on Ubuntu installation completed

That’s all.

Starting XAMPP

To start XAMPP simply call this command:

sudo /opt/lampp/lampp start

There is a graphical control panel is also available.

cd /opt/lampp
sudo ./manager-linux.run (or manager-linux-x64.run)

To stop XAMPP simply call this command:

sudo /opt/lampp/lampp stop

Open Chrome or any other browser and enter http://localhost to check if XAMPP started or not.

Linux FAQ – https://www.apachefriends.org/faq_linux.html

Autostart XAMMP when Linux System Boots up

To start XAMMP when Linux Boots up follow below procedure.

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

The main XAMPP configuration files are located as follows:

  • Apache configuration file: /opt/lampp/etc/httpd.conf, /opt/lampp/etc/extra/httpd-xampp.conf
  • PHP configuration file: /opt/lampp/etc/php.ini
  • MySQL configuration file: /opt/lampp/etc/my.cnf
  • ProFTPD configuration file: /opt/lampp/etc/proftpd.conf

That’s all.

Go ahead and install XAMPP on Ubuntu and start your web development work.

 

Share This: