The XAMPP stack is an open-source Apache distribution of a PHP development environment consisting of cross-platform software (X): Apache (A), MariaDB (M), PHP (P) and Perl (P).
Developers use the platform as a local host for testing software and webpages before transferring the data to a remote online server.
In this guide, you will find simple instructions on how to install XAMPP on Ubuntu 18.04. We also dive into verifying a successful installation and uninstalling the XAMPP package.
- Ubuntu 18.04 Bionic Beaver
- A user with sudo privileges
- Access to a terminal/command line
apttool, pre-loaded in Ubuntu and other Debian-based distros
Step 1: Download Installation Package
Before you can install the XAMPP stack, you need to download the package from the official Apache Friends webpage.
Click the XAMPP for Linux link and Save the file.
Step 2: Make Installation Package Executable
To run the installation process, the file permissions require modification.
To execute a program, you need to make the file executable. Open the terminal (Ctrl+Alt+T) and follow these instructions to do so:
1. Move into the folder where your installation package is located. By default, the system stores it in the Downloads folder. Navigate to Downloads using the command:
2. Now make the file executable by running a
sudo chmod 755 [package_name]
If you navigate to the Downloads folder, you can find the complete package name. You need to copy and paste the name into the command above.
To make the latest XAMPP installation package executable, use the command:
sudo chmod 755 xampp-linux-x64-126.96.36.199-installer.run
3. The terminal does not give any confirmation nor output that you have successfully performed the previous step. However, verify you have executed the permission with the command:
ls –l xampp-linux-x64-188.8.131.52-installer.run
The output should include
rwxr –xr –x 1 followed by the name of the user who can now execute the file, as in the image below:
Step 3: Launch Setup Wizard
1. Now, you can run the installer and launch the graphical setup wizard with the following command:
In this example, the command is:
2. The XAMPP Setup Wizard opens in a new window on top of the terminal that will appear as in the following image:
Step 4: Install XAMPP
1. Click Next and in the following Select Components dialogue, choose the components you want to install. We recommend keeping the default settings and continuing with Next.
2. After selecting the components, the setup wizard will show you the location where it will install the software. To proceed, click Next.
3. The following dialogue box offers to install sponsored applications on top of the XAMPP installation. These include packages such as WordPress, Joomla, Drupal, and others. You can deny installing additional software by unchecking the Learn more about Bitnami for XAMPP box.
4. Next, the wizard will notify you that it is ready to install XAMPP on your system. Click Next to start.
5. This will launch the installation process and a dialogue box showing the progress will appear on your screen.
6. The final dialogue box should display that the setup has finished installing. You can complete the process and launch XAMPP by clicking Finish.
Step 5: Launch XAMPP
By clicking Finish in the previous step, XAMPP launches its control panel that will appear as in the image below.
Open the Manage Servers tab to see all the available services and their status. You can change their status by selecting Start or Stop.
Step 6: Verify XAMPP is Running
Make sure you have successfully installed the XAMPP stack, and everything is running smoothly.
1. Verify localhost is working by entering the following URL in a browser:
If the XAMPP dashboard page displays as in the image below, you have successfully installed the stack.
2. Next, verify whether the MariaDB service is working. To do so, open the URL:
The output screen for a properly working database service should appear as:
1. To uninstall XAMPP, return to the terminal and navigate to the
opt/lampp directory with the command:
2. Once you are in the appropriate directory, you can uninstall XAMPP by typing the following command:
3. The command will prompt a dialogue box asking you whether you want to uninstall XAMPP and all of its modules. Confirm by clicking Yes.
After the process is complete, the output will confirm that XAMPP has been uninstalled.
4. Finally, remove the specified directory with:
sudo rm –r /opt/lamp
After reading this article, you will know how to install XAMPP in Ubuntu 18.04.
This Apache software allows you to set up a free localhost on your system. You can also explore alternative stacks such as the LAMP stack or the MEAN stack.