Open In App

How to Install Xampp in Linux

Last Updated : 16 Jan, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

Xampp is a free and open-source platform that is highly used for PHP development but also comprises a suite of tools like Apache Web Server, MysqlDB, Perl, Filezilla, and much more. This package made it easier to install and set up the Xampp software. It is also available for every major platform like Windows, Linux, and MacOS.

In this article, we will discuss about 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 for Installing Xampp in Linux

Step 1: Download the 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_xampp_webpage_install_xampp_in_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
  • +x is the flag used to make the file executable for everyone, if you need to restrict the permission use “u+x” so that only the current user can execute it.
chmod_installer_install_xampp_in_linux

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.

gui_installer_1_xampp_install_xampp_in_linux

  • 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.

gui_installer_2_xampp_install_xampp_in_linux

  • 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.

gui_installer_3_xampp_install_xampp_in_linux

  • 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.

gui_installer_4_xampp_install_xampp_in_linuxNow 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.

gui_installer_6_xampp_install_xampp_in_linux

Step 4: 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
starting_lampp_cmd_install_xampp_in_linux

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

running_lampp_help_install_xampp_in_linux

Using GUI Xampp Manager

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

sudo ./manager-linux-x64.run

running_lampp_gui_install_xampp_in_linux

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_1_install_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.

uninstalling_xampp_2_install_xampp_in_linux

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.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads