XAMPP is a popular and powerful web development toolkit that allows you to create a full web development environment on Ubuntu operating system. In this article, we will learn how to install XAMPP on Ubuntu 22.04 and 20.04 LTS.
Step-by-step: Install XAMPP on Ubuntu 20.04 and 22.04 LTS
XAMPP is available on Windows, Linux, and macOS platforms. However, unlike Windows, Linux does not have a default keyboard shortcut to open XAMPP. This can be challenging for new users after installing XAMPP, but don’t worry. ItsmeIT will guide you step by step and help you create a symlink (shortcut) to easily start and use this application.
Step 1: Update the system and download XAMPP
First, before starting to install XAMPP on Ubuntu 22.04 or 20.04, make sure you have your Ubuntu system up to date. You can do this using the commands below in terminal:
sudo apt update; sudo apt upgrade
Next, click to download the latest XAMPP from the official Apache Friends website, select the version of XAMPP suitable for your Ubuntu operating system, and download the installation file. If you want to choose the version, you can open this link to download Xampp.
After downloading, open the terminal (Ctrl +Alt + T) and navigate to the folder containing the XAMPP installation file. (usually ~/Downloads). You can use the “cd” command to do this. For example:
cd ~/Downloads
Step 2: Install Xampp on Ubuntu 22.04 or 20.04
The downloaded file will normally be in the “~/Downloads” folder, now you will need to grant the XAMPP installation file execute permission with the following command:
chmod +x xampp-linux-x64-xx-installer.run
Where “xx” is your downloaded version. In this tutorial ItsmeIT downloaded the latest version “xampp-linux-x64-8.2.4-0-installer.run”. So after granting execute permission, I will run the following command to install Xampp on my Ubuntu 22.04.
chmod +x xampp-linux-x64-xx-installer.run
The installation process will take place, you just need to click “Forward” to default to the “/opt/lampp” folder and click “Next” until “Finish”.
Step 3: How to start Xampp on Ubuntu with terminal
After completing the install Xampp on Ubuntu 22.04 or 20.04 you can start Xampp with the command below and switch to the Manager server tab to start Apache and MYSQL Database.
sudo /opt/lampp/./manager-linux-x64.run
XAMPP will start running and you can access your web browser by typing “http://localhost” in the address bar. You will see the XAMPP management interface where you can manage web services like Apache, MySQL, FileZilla.
Step 4: How to create Xampp shortcut on Ubuntu Desktop
On Ubuntu operating system, when you install XAMPP on Ubuntu 22.04, every time you want to start XAMPP, you will need to open a terminal and run a command, which may seem a bit inconvenient. To simplify this process, you can create a XAMPP shortcut icon, similar to Windows. To achieve this, open a terminal and execute the following command to create the file “‘xampp.desktop”:
sudo nano /usr/share/applications/xampp.desktop
Then copy this code and paste it into the xampp.desktop file, press the “Ctrl + X” key combination and select “Y” to save the file.
[Desktop Entry] Version=1.0 Type=Application Name=XAMPP Exec=sudo /opt/lampp/manager-linux-x64.run Icon=/opt/lampp/htdocs/favicon.ico Terminal=false StartupNotify=false [Desktop Action Manager] Name=XAMPP Exec=sudo /opt/lampp/manager-linux-x64.run
Go ahead, give sudo permission to the “xampp.desktop” shortcut to run on the desktop to open xampp on Ubuntu. To do this run the command “sudo visudo” and add the code “your-user ALL = NOPASSWD: /opt/lampp/manager-linux-x64.run” to the end of the file.
sudo visudo
your-user ALL = NOPASSWD: /opt/lampp/manager-linux-x64.run
Where “ your-user ” is your Ubuntu login account, my example is itsmeit, so I will enter itsmeit like screenshot:
Okay, now you can find “Xampp” in the application list (Menu) and click “Add to Favorites” to add Xampp to the taskbar. From now on you can click on the Xampp icon and open xampp on Ubuntu without having to run a command every time you want to start or shut down/pause.
Xampp used on Windows seems to be very popular because Windows does not install Nginx or Apache separately. To completely uninstall or remove the XAMPP server from your system, see the command you can use. But first stop Mysql and Apache on Xampp.
sudo /opt/lampp/./uninstall sudo rm /usr/share/applications/xampp.desktop
Install Xampp on Ubuntu 22.04 or 20.04 can only be used on localhost, but for the server you cannot use Xampp. Get acquainted with Nginx and Apache on Ubuntu by clicking the search box in the top right corner and opening the link to read the documentation.
– Advertising –