paint-brush
How to Install XAMPP on Linux: A Quick Step-by-Step Guideby@sajerestan
48,712 reads
48,712 reads

How to Install XAMPP on Linux: A Quick Step-by-Step Guide

by Stanley SajereNovember 21st, 2023
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Effortlessly set up XAMPP on Linux with our step-by-step guide, creating an optimal environment for PHP and Perl development.
featured image - How to Install XAMPP on Linux: A Quick Step-by-Step Guide
Stanley Sajere HackerNoon profile picture



XAMPP, an acronym for Cross-Platform (X), Apache (A), MariaDB (M), PHP (P), and Perl (P), is a versatile web server solution that facilitates the development and testing of dynamic web applications. This guide will walk you through the step-by-step process of installing XAMPP on Linux, catering to users across different Linux operating systems.


Prerequisites:

  1. Kali Linux system
  2. Internet connection
  3. A non-root user account with sudo privileges

Installing XAMPP on Linux:

  1. Download the XAMPP installer package:



  1. Change file permissions:
    • Open the terminal and navigate to the directory containing the downloaded package.
    • Execute the command sudo chmod +x xampp-linux-*-installer.run to make the installer executable.


  1. Run the XAMPP installer:
  • Run the installer using the command sudo ./xampp-linux-*-installer.run.


  1. Follow the installation wizard:
  • The wizard will guide you through language selection, installation location, and component choices.


  1. Start the XAMPP server:
    • After installation, initiate the server with sudo /opt/lampp/lampp start.



  1. Verify the installation:
    • Open a web browser and go to http://localhost to confirm the successful installation by viewing the XAMPP welcome page.

The default installation directory for XAMPP depends on the operating system:

  • Windows: C:\xampp
  • macOS: /Applications/XAMPP/
  • Linux: /opt/lampp or /usr/local/xampp

To access XAMPP without reinstalling it, you can simply start the XAMPP server. The specific steps for starting the XAMPP server.


Linux:

  1. Open a terminal window.
  2. Navigate to the XAMPP installation directory (e.g., /opt/lampp).
  3. Run the following command:
sudo /opt/lampp/lampp start
  1. Verify that the XAMPP server is running by opening a web browser and navigating to http://localhost.

Once the XAMPP server is started, you can access it by navigating to http://localhost in your web browser. You can also access specific XAMPP components by navigating to the following URLs:

  • Apache: http://localhost/xampp/
  • PHPMyAdmin: http://localhost/phpmyadmin/
  • MariaDB: http://localhost:3306/
  • FTP Server: ftp://localhost/


To start XAMPP from the current directory, you can use the following command:

./lampp start

This command will start all of the XAMPP components, including Apache, MySQL, and PHP.

If you want to start only specific components, you can use the following commands:

  • To start Apache:
./apachectl start
  • To start MySQL:
./mysql.server start
  • To start PHP:
./php-fpm start


To start Xampp from the home directory.

sudo /opt/lampp/lampp start


You can create a custom launcher for the XAMPP start and XAMPP Control Panel on Kali Linux using the following steps:

  1. Right-click on the desktop and select "Create Launcher".
  2. In the "Create Launcher" window, type the name for your launcher, such as "XAMPP Start" or "XAMPP Control Panel".
  3. For the command to start XAMPP, type the following:
sudo /opt/lampp/lampp start


  1. For the command to open the XAMPP Control Panel, type the following:
sudo /opt/lampp/./manager-linux-x64.run

  1. Save the launcher.
  2. To start XAMPP, double-click the launcher you created.
  3. To open the XAMPP Control Panel, double-click the launcher you created.

The start launcher will allow you to type your admin password, start XAMPP, and disappear. The XAMPP Control Panel launcher will open the XAMPP Control Panel.


I hope this helps!