In this tutorial, we will show you how to install XAMPP on Ubuntu 20.04 LTS. For those of you who didn’t know, XAMPP is open-source software that provides users with an out-of-the-box server experience. It is a complex, yet very easy-to-use AMPP (Apache, MySQL, PHP, and Perl) distribution that’s compatible with the Linux, Microsoft Windows, and Mac OS X operating systems. The best tool for those who want to install a fully functional web development environment.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo
‘ to the commands to get root privileges. I will show you the step-by-step installation of XAMPP on Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.
Prerequisites
- A server running one of the following operating systems: Ubuntu 20.04, 18.04, 16.04, and any other Debian-based distribution like Linux Mint.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- A
non-root sudo user
or access to theroot user
. We recommend acting as anon-root sudo user
, however, as you can harm your system if you’re not careful when acting as the root.
Install XAMPP on Ubuntu 20.04 LTS Focal Fossa
Step 1. First, make sure that all your system packages are up-to-date by running the following apt
commands in the terminal.
sudo apt update sudo apt upgrade
Step 2. Installing XAMPP on Ubuntu 20.04.
Now we download XAMPP from the official website:
### For PHP 7.2 ### wget https://www.apachefriends.org/xampp-files/7.2.34/xampp-linux-x64-7.2.34-0-installer.run ### For PHP 7.3 ### wget https://www.apachefriends.org/xampp-files/7.3.23/xampp-linux-x64-7.3.23-0-installer.run ### For PHP 7.4 ### wget https://www.apachefriends.org/xampp-files/7.4.11/xampp-linux-x64-7.4.11-0-installer.run
### For PHP 8.3 ### wget https://www.apachefriends.org/xampp-files/8.0.3/xampp-linux-x64-8.0.3-0-installer.run
Once done, we change the permission of the installer. 755 means read and execute access for everyone and also write access for the owner of the file:
chmod 755 xampp-linux-x64-8.0.3-0-installer.run chmod +x xampp-linux-x64-8.0.3-0-installer.run
Finally, Run the installer:
sudo ./xampp-linux-x64-8.0.3-0-installer.run
The setup wizard will open, follow the installation instruction. Click next.
In the future, if you want to stop the service of this tool, simply use the following command:
sudo /opt/lampp/lampp stop
And if you want to start them again via command line:
sudo /opt/lampp/lampp start
Step 3. Accessing XAMPP on the Ubuntu system.
Once the setup is finished, XAMPP should be available for its usage on your Desktop or open your browser and follow this link: http://localhost/
Congratulations! You have successfully installed XAMPP. Thanks for using this tutorial for installing the XAMPP stack on Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you check the official XAMPP website.