How to Install XAMPP on Ubuntu 18.04

Introduction

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.

guide for installing xampp stack

Prerequisites

  • Ubuntu 18.04 Bionic Beaver
  • A user with sudo privileges
  • Access to a terminal/command line
  • The apt tool, 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.

Screenshot of the XAMPP download page for Linux

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:

cd /home/[username]/Downloads

cd command

2. Now make the file executable by running a chmod command:

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.

XAMPP installer after being downloaded.

To make the latest XAMPP installation package executable, use the command:

sudo chmod 755 xampp-linux-x64-7.3.5.1-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-7.3.5.1-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:

The command to make the XAMPP installation package executable.

Step 3: Launch Setup Wizard

1. Now, you can run the installer and launch the graphical setup wizard with the following command:

sudo ./[package_name]

In this example, the command is:

sudo ./xampp-linux-x64-7.3.5.1-installer.run

How to launch XAMPP installation wizard.

2. The XAMPP Setup Wizard opens in a new window on top of the terminal that will appear as in the following image:

XAMPP Setup Wizard

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.

select the components you want to install

2. After selecting the components, the setup wizard will show you the location where it will install the software. To proceed, click Next.

XAMPP will be installed in directory /opt/lampp

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.

install sponsored applications on top of the XAMPP installation

4. Next, the wizard will notify you that it is ready to install XAMPP on your system. Click Next to start.

installation wizard ready to install xampp

5. This will launch the installation process and a dialogue box showing the progress will appear on your screen.

xampp installation begins

6. The final dialogue box should display that the setup has finished installing. You can complete the process and launch XAMPP by clicking Finish.

completing the xampp setup wizard

Step 5: Launch XAMPP

By clicking Finish in the previous step, XAMPP launches its control panel that will appear as in the image below.

XAMPP launch screen.Open the Manage Servers tab to see all the available services and their status. You can change their status by selecting Start or Stop.

XAMPP dashboard for managing virtual servers.

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:

http://localhost/dashboard

If the XAMPP dashboard page displays as in the image below, you have successfully installed the stack.

How to verify XAMPP installation.

2. Next, verify whether the MariaDB service is working. To do so, open the URL:

http://localhost/phpmyadmin

The output screen for a properly working database service should appear as:

verify MariaDB service is working

Uninstall XAMPP

1. To uninstall XAMPP, return to the terminal and navigate to the opt/lampp directory with the command:

cd /opt/lampp

2. Once you are in the appropriate directory, you can uninstall XAMPP by typing the following command:

sudo ./uninstall

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.

a dialogue box asking you whether you want to uninstall XAMPP

After the process is complete, the output will confirm that XAMPP has been uninstalled.

he output informs that uninstallation is complete

4. Finally, remove the specified directory with:

sudo rm –r /opt/lamp

Conclusion

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.

Was this article helpful?
YesNo
Sofija Simic
Sofija Simic is an aspiring Technical Writer at phoenixNAP. Alongside her educational background in teaching and writing, she has had a lifelong passion for information technology. She is committed to unscrambling confusing IT concepts and streamlining intricate software installations.
Next you should read
How to Install MariaDB 10.4 on Ubuntu 18.04
July 19, 2019

MariaDB is an open-source, fully compatible, relational database management system. It is commonly used as ...
Read more
How to Install Apache on Ubuntu 18.04
March 22, 2019

This guide will help you install the Apache web server on an Ubuntu Linux 18.04 operating system.
Read more
What is a LAMP Stack?
March 7, 2019

The LAMP stack is a set of open source software used for web application development. For a web application...
Read more
How to Install the LAMP Stack on Ubuntu 18.04
March 6, 2019

A LAMP stack is a set of open-source software used for web application development. For a web application to ...
Read more
  • © 2021 Copyright phoenixNAP | Global IT Services. All Rights Reserved.