How to installXAMPP on Ubuntu

0

XAMPP stands for cross-platform(X), Apache(A) server, MariaDB(M), PHP(P) and Perl(P). It is built by Apache Friends and basically serves as a local host or a local server. Through this local server, you can install this software on your system and test the clients or your website before uploading it to the remote web server or computer. XAMPP is most widely known by Windows users, but there are XAMPP packages for Ubuntu Linux as well. In this article, we will describe a step-by-step method for installing this application stack on your system. You can then verify the installation by using a few URLs. You can also go through the uninstall process that will help you in uninstalling the software if the need arises. The commands and procedures described in this article have been run on an Ubuntu system.

Installing XAMPP on Ubuntu

Please follow the following steps in order to download, install and configure XAMPP on your system:

Step 1: Download the installation package

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

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

Click on the XAMPP for Linux option after which you will be prompted to Run the package or Save it to your system. We recommend downloading the package by clicking the Save File option. After which, your downloaded file will be saved to the Downloads folder by default.

Step 2: Make the installation package executable

We will install the package through the Ubuntu command line, The Terminal. In order to open the Terminal, either use the Dash or the Ctrl+Alt+T shortcut. After the Terminal is open, you need to move to your Downloads folder to access the file.

Move to the Downloads folder by using the following command:

$ cd /home/[username]/Downloads
Click on the XAMPP for Linux option after which you will be prompted to Run the package or Save it to your system. We recommend downloading the package by clicking the Save File option. After which, your downloaded file will be saved to the Downloads folder by default.
Step 2: Make the installation package executable
We will install the package through the Ubuntu command line, The Terminal. In order to open the Terminal, either use the Dash or the Ctrl+Alt+T shortcut. After the Terminal is open, you need to move to your Downloads folder to access the file.
Move to the Downloads folder by using the following command:
$ cd /home/[username]/Downloads
The installation package you downloaded needs to be made executable before it can be used further. Run the following command for this purpose:
$ chmod 755 [package name]
Example:
$ chmod 755 xampp-linux-*-installer.run
Now the install package is in an executable form.
Step 3: Confirm execute permission
It is important to verify if the package can be executed by the current user. The execute permission can be checked through the following command:
$ ls -l [package name]
Example:
$ ls -l xampp-linux-x64-8.0.3-0-installer.run
The -rwxr output shows that the file can be executed by the user whose name is also mentioned in the output.
Step 4: Launch the Setup Wizard
As a privileged root user, run the following command in order to launch the graphical setup wizard.
$ sudo ./[package name]
Example:
sudo ./xampp-linux-x64-8.0.3-0-installer.run
This will launch the Setup wizard that will direct you with the rest of the installation procedure.
Step 5: Work through the graphical setup wizard
Now that the Setup Wizard for XAMPP by Bitnami is launched as follows, click the Next button to start the installation process:

Start XAMPP installer
The following dialog lets you choose XAMPP components that you want to install.
Choose which XAMPP components to be installed

Keep the default settings intact and then click Next. The following dialog will inform you about the location where XAMPP will be installed.

Select installation directory
Click Next to begin the installation process:
Installing XAMPP
When the installation is complete, click the Next button. The following dialog indicates the completion of the installation process.
Setup completed
If you do not want to Launch XAMPP at this moment, uncheck the Launch XAMPP option. Also, click Finish to close the Setup dialog.

Step 6: Launch XAMPP through the Terminal

In order to launch XAMPP through your Ubuntu Terminal, enter the following command as root:

$ sudo /opt/lampp/lampp start

Step 7: Verify Installation
After you have installed XAMPP on your Ubuntu system, it is good practice to verify the installation. To do so, enter the following URL in your Firefox browser:
http://localhost