How to install XAMPP on your Ubuntu 18.04 LTS system

XAMPP stands for Cross-Platform (X), Apache (A), MariaDB (M), PHP (P) and Perl (P). It is built by Apache Friends and mainly serves as a local host or local server. Through this local server, you can install this software on your system and test clients or your website before downloading it to a remote web server or computer. XAMPP is most widely known to Windows users, but there are XAMPP packages for Ubuntu Linux. In this article, we describe a step-by-step method for installing this application stack on your system. You can then verify the installation using several URLs. You can also go through the uninstall process, which will help you uninstall the software if the need arises.

The commands and procedures described in this article ran on the Ubuntu 18.04 LTS system.

Installing XAMPP on Ubuntu 18.04

Please follow the steps below to download, install and configure XAMPP on your system:

Step 1: Download the installation package

The first step is to download the XAMPP Linux package from the official Apache Friends website:

https://www.apachefriends.org/index.html

Click on the XAMPP for Linux option, after which you will be asked to run the package or save it to your system. We recommend downloading the package by clicking the Save file option. After that, the downloaded file will be saved in the “Downloads” folder by default.

Step 2. Make the installation package executable

We will install the package through the Ubuntu command line, Terminal. To open the Terminal, use a dash or Ctrl + Alt + T label. After the Terminal is open, you need to go to the “Downloads” folder to access the file.

Go to the Downloads folder with the following command:

$ cd /home/[username]/Downloads

The downloaded installation package must be made executable before it can be used in the future. To do this, run the following command:

$ chmod 755 [package name]

Example:

$ chmod 755 xampp-linux-x64-7.2.10-0-installer.run

Make the XAMPP Installer Executable

Now the installation package is in executable form.

Step 3: Confirm Execution Permission

It is important to check if the package can be executed by the current user. Execution permission can be checked with the following command:

$ ls -l [package name]

Example:

$ ls -l xampp-linux-x64-7.2.10-0-installer.run

Check if you can run the XAMPP installer

The output of -rwxr indicates that the file can be executed by a user whose name is also specified in the output.

Step 4. Run the installation wizard

As the root root user, run the following command to start the graphical configuration wizard.

$ sudo ./[package name]

Example:

sudo ./xampp-linux-7.2.10-0-installer.run

Run the XAMPP installer

This will launch the installation wizard, which will direct you to the rest of the installation procedure.

Step 5. Working with the graphical wizard

Now that the installation wizard for XAMPP from Bitnami is launched as follows, click the “Next” button to start the installation process:

Welcome to the XAMPP Setup Wizard

The following dialog allows you to select the XAMPP components that you want to install.

Choose which XAMPP components to install

Leave the default settings unchanged, and then click following, The following dialog will tell you where XAMPP will be installed.

Select installation directory

click following continue. In the next dialog box, you can install sponsorship applications such as Drupal, Joomla, WordPress, etc. You can avoid installing these applications in Bitnami by unchecking the “Learn more about Bitnami for XAMPP” box.

Choose if you want to install Bitnami installers.

Press on following button, after which the following dialog box appears:

Start the installation process

Click Next to start the installation process:

Install XAMPP

After installation is complete, click Next. The following dialog indicates the completion of the installation process.

Setup Complete

If you do not want to start XAMPP at the moment, clear the Launch XAMPP checkbox. Also click Finish to close the Preferences dialog box.

Step 6: Launch XAMPP through Terminal

To start XAMPP through an Ubuntu terminal, enter the following command as root:

$ sudo / opt / lampp / lampp start

Launch XAMPP

This output indicates that XAMPP is up and running. Note that you need to manually start XAMPP every time you reboot the system.

If, after starting XAMPP, you get the following output, it means that Net Tools are not installed on your system:

Possible errors when starting XAMPP

To install Net Tools, run the following command as root:

$ sudo apt install net-tools

Install Network Tools

After installing Net Tools, you can successfully start and use XAMPP.

Step 7. Verify Installation

Once you have installed XAMPP on your Ubuntu system, it is recommended that you verify the installation. To do this, enter the following URL in the FireFox browser:

http://localhost

The following web page confirms that XAMPP has been successfully installed and works on your system:

XAMPP Apache Start Page

You can also verify phpMyAdmin installation in a similar way by entering the following URL in your browser:

http://localhost/phpmyadmin

The following web page confirms that phpMyAdmin has been successfully installed and works on your system:

Phpmyadmin

Remove XAMPP

It is also important to learn how to completely remove and remove XAMPP from your Ubuntu system if you ever need to do this.

Open a Ubuntu terminal and navigate to the directory where XAMPP is installed. It:

$ cd /opt/lampp

The next step is to run the uninstall program, which you will find in the lampp folder, using the following command:

$ sudo ./uninstall

The following dialog box appears asking if you want to remove XAMPP and all its modules:

Command to remove XAMPP

click Yes Continue the removal process.

XAMPP Removal

After successfully uninstalling XAMPP, you will receive the following message.

Uninstall Complete

click OK,

Another important step is to manually delete the lampp folder along with all its files and subfolders. The following command will help you with this:

$ sudo rm -r /opt/lampp

Delete remaining files and folders

Now XAMPP and all its modules are logged out of your system. You can also remove the downloaded installation package if you wish.

In this guide, you learned the step-by-step installation of XAMPP on your Ubuntu system. After downloading the installation package, running it and checking the installation, you went through the whole procedure with us. We have also provided enough XAMPP removal information if you ever need to.

How to install XAMPP on your Ubuntu 18.04 LTS system

Sidebar