Open In App

How to Install Xampp in Linux

Last Updated : 30 Sep, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

XAMPP is a popular and free open-source platform primarily used for PHP development. It comes bundled with essential tools like Apache Web Server, MySQL (MariaDB), PHP, Perl, and more, making it a one-stop solution for web development. Installing and setting up XAMPP is streamlined, and the package is available for all major operating systems, including Windows, Linux, and macOS.

In this article, we will discuss the step-by-step procedure to install Xampp in Linux-based Operating Systems.

Note: In Linux, xampp is named as lampp denoting "linux" in the starting character so it will be used interchangeably down the article.

Steps to Install XAMPP on Linux

Step 1: Download the XAMPP Installer for Linux

Open a new browser window and go to the Official Apache downloads webpage.

  • Move to the Linux download links sections and download the latest installer package.
  • Xampp uses ".run" shell script files to make it easy to automatically install the package without much manual intervention.
  • It also supports every major distribution like Debian, Arch, Redhat, Ubuntu, and Manjaro.
Download the XAMPP Installer for Linux
download installer for linux

Step 2: Make the installer executable

  • Once the installed is downloaded, we need to run the installer, by default no file will be given the executable permission.
  • Open a new Terminal and go to the location of the installer file, most likely it is Downloads.
  • Use the chmod command with x flag to give the executable permission for the installer using the below command.
sudo chmod +x xampp-linux-x64-8.2.12-0-installer.run

Here, +x adds executable permission to the file for everyone. If you prefer restricting the permission to the current user, replace +x with u+x.

Make the installer executable
make the installed executable

Step 3: Run the Installer

  • After providing the executable permission, run the installer to install the software in the system.
  • Run the installer from the same terminal with Sudo permission using the below command.
  • Sudo permission is required as by xampp uses the "/opt" directory to write down the files.
sudo ./xampp-linux-x64-8.2.12-0-installer.run
  • A new Graphical window will be popped front, we can continue the installation process from there.
  • In the below image we can see that it is requesting for further process, to proceed with the installation click on the Forward button in the bottom of the window.

Run the Installer

Step 4: Configure Components

  • Here we need to select the components needs to be installed along with Xampp. There are different components like,
    • Core files
    • Developer files
  • If its your development machine check the developer files also, I am going with the default options that is checked both the files.
  • Click on the Forward button to proceed with the installation.

Click on the Forward button to proceed

  • Xampp alerting us it will install the modules and files under the "/opt/lampp" directory. It is the intended folder for software that is not part of the core linux system.
  • We can't change the installation folder, so click on Forward button to accept the installation directory for Xampp.

click on Forward button to accept the installation directory

  • Now we have configured the installation and we can write the changes, so it prompts us for final question whether it can install Xampp on the System for the configuration.
  • Click on Forward to accept the changes, in case you need to change anything cancel it and start from the beginning.

Click on Forward to accept the changesNow the installer is writing the files of the Software to our system. It may take a couple of minutes based on your Hardware configuration, sit back and relax until the installation is complete.

gui_installer_5_xampp_install_xampp_in_linux

Feel free to uncheck the Launch Xampp checkbox, we will see how we can start Xampp in the next step. Finally Click on Finish to complete the Setup process.

Click on Finish

Step 5: Start Xampp Program

  • To start Xampp, either use the command line tool or the GUI manager.
  • First of all move into the xampp installation folder using cd command.
cd /opt/lampp

Using Command Line tool

Use the below command to start Xampp. This will start entire Xampp program including Apache, MysqlDB and others.

sudo ./lampp start
command to start Xampp
starting lampp with terminal
  • To just start the required services refer to the help page of Xampp. It includes options like
    • startapache -> starts only apache server
    • startmysql -> starts mysql
./lampp help

Help page

Using GUI Xampp Manager

To start the GUI Xampp manager, run the following command.

sudo ./manager-linux-x64.run
GUI Xampp manager
running gui manager

Checking Xampp Server

  • Once Xampp is started, open your browser and go to the `http://localhost/` url.
  • A welcome page of Apache server will be displayed.
final_output_install_xampp_in_linux
final output after installation

Uninstalling Xampp in Linux

  • To Uninstall Xampp, open a new terminal window and move into the installation folder, here the "/opt/lampp" folder.
  • Xampp tool ships with beginner friendly uninstaller executable, so that you don't have to mess with manual deletion of files and folders.
  • Run the uninstall executable with sudo privilege to initiate the uninstallation process.
  • Use the below command to uninstall the program, make sure you are in the intended directory.
sudo ./uninstall

Provide your super user password to start the process, double check you have backed up important data before proceeding with the uninstallation.

Uninstalling Xampp in Linux
running uninstall xampp

Click on "Yes" in the Question dialog box to proceed wit uninstallation. This will remove entire modules of the Xampp like Apache Server, Maria DB, etc. So, think before you act.

Click on "Yes"
uninstalling xampp

In the above image, you can refer that its being uninstalled. Once the progress is over, you can close the terminal window.

Conclusion

In this article we have seen step by step procedure of installing Xampp, a easy to install suite of software that comes as a single package for Apache server, Maria DB, PHP. We have also seen how to uninstall it incase we need to completely remove the software from the System.


Next Article

Similar Reads