Introduction
XAMPP is a cross-platform used as a local host, providing them a suitable environment for developers to test web applications before transferring data to remote servers.
XAMPP is an open-source Apache distribution of a PHP development environment. It consists of the cross-platform software Apache, Maria DB, PHP, and Perl.
Download XAMPP
- Start by downloading XAMPP from the official Web Page. (https://www.apachefriends.org/index.html).
- Navigate to XAMPP for Linux as shown in the figure:
![](http://unixcop.com/wp-content/uploads/2021/07/1-13.png)
XAMPP Installation on Ubuntu
So Open up the terminal and navigate to (Downloads).
Replace <filename> with the name of the xampp file that you downloaded in all commands below.
Use the chmod command to make them executable with the following command:
$ chmod a+x <filename>
$ chmod a+x xampp-linux-x64-8.0.8-0-installer.run
The next step is to run the installer and launch the graphical setup wizard with the following command:
![](http://unixcop.com/wp-content/uploads/2021/07/1-12.png)
$ sudo ./<filename>
$ sudo ./xampp-linux-x64-8.0.8-0-installer.run
![](http://unixcop.com/wp-content/uploads/2021/07/2-12.png)
The XAMPP Setup Wizard opens in a new window on top of the terminal that will appear as in the following image:
Click next to start installation:
![](http://unixcop.com/wp-content/uploads/2021/07/3-12.png)
This will launch the installation process and a dialogue box showing the progress will appear on your screen.
![](http://unixcop.com/wp-content/uploads/2021/07/4-11.png)
After installation verify XAMPP is Running
Make sure you have successfully installed the XAMPP stack, and everything is running smoothly.
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.
![](http://unixcop.com/wp-content/uploads/2021/07/5-8.png)
By default, XAMPP us install under /opt/lampp/ directory.
After the installation is completed, start the XAMPP by typing the following command:
$ sudo -i
$ /opt/lampp/lampp start
![](http://unixcop.com/wp-content/uploads/2021/07/6-10.png)
So Now visit http://locahost/ for XAMPP output.
To visit PHPMyAdmin follow http://locahost/phpmyadmin/ link.
![](http://unixcop.com/wp-content/uploads/2021/07/7-8.png)
Uninstalling XAMPP
To uninstall the XAMPP navigate to the /opt/lampp directory, as shown in the figure.
$ cd /opt/lampp
Now type the following command to uninstall it.
$ sudo ./uninstall
![](http://unixcop.com/wp-content/uploads/2021/07/8-7.png)
Now it will prompt you to confirm Uninstalling XAMPP. Just enter YES.
After successfully uninstall the XAMPP remove the directory by typing the following command:
$ sudo rm –f /opt/lamp
Conclusion
So We learned how to Install and uninstall XAMPP on Ubuntu 21.04. I hope this tutorial will help to set up XAMPP on Ubuntu 21.04.