Learn the commands to install XAMPP on Ubuntu 22.04 LTS Jammy JellyFish Linux using the terminal for setting up Apache web server and MySQL environment quickly.
With the free software collection XAMPP, preconfigured web servers based on Apache can be conveniently set up. For this purpose, the open-source package also includes the database program MariaDB as well as the scripting languages PHP and Perl combined in one installation routine
Also on board are useful tools such as the FTP server FileZilla, the mail server Mercury Mail Transport System, Tomcat for Java applications, phpMyAdmin, the analysis tool Webalizer, the mail tester Fake Sendmail and OpenSSL encryption. The modules are conveniently operated via the XAMPP Control Panel.
requirements
- Graphical Ubuntu 22.04 LTS Linux
- A non-root user with
sudo
rights.
Steps to install Xampp on Ubuntu 22.04 LTS Linux
Well, when it comes to Linux such as Ubuntu, we can easily set up Apache, MySQL, and other tools available through the XAMPP using just a few commands. However, many users don’t want to mess with their system for testing some web applications. If you are one of those then XAMPP is a good option to go without interfering with any local installed Apache or MySQL instances.
1: Download XAMPP Linux
The first thing we need in this tutorial is the executable binary of XAMPP on our Ubuntu 22.04 LTS. For that, we simply visit the official website of this tool. Here is the link.
Scroll down to the section where the XAMPP Linux packages are available to download. You will see three versions there:
Expect the PHP version, the rest of the tools in all three versions will be the same. Thus, as per the requirement of the PHP version for your project download the one.
For example:
Here while doing this article the latest version of PHP was 8.1.6, hence we are downloading the XAMPP with it, however, you can go for any of them. Click on the Download button.
2: Open Command Terminal
You can either use the shortcut- CTRL+ALT+T or simply go to the Applications from Show Applications option and search for the Terminal to run it.
3: Run the XAMPP installer on Ubuntu 22.04
By default, whatever we are downloading from the internet using the browser on Linux systems, goes into the Downloads folder, thus first switch to that.
cd Downloads
Change the permission of the installer. 755 means read and execute access for everyone and write access to the owner of the file
chmod 755 xampp-linux-*-installer.run
Run the installer
sudo ./xampp-linux-*-installer.run
4: Setup Installer Wizard
The moment you run the installation command, a XAMP setup wizard will open. Click on the Next button.
Select both the components “XAMPP Core files” and XAMPP Developer files and then NEXT.
By default, all the files will unpack under /opt/lampp.
Click on the Finish and the XAMPP will be on your Ubuntu 22.04 LTS Linux system.
5: Start Apache and MySQL server
Go to the Manage Server Tab and corresponding to Web server and Database click on the Start button. To change their running ports select the Configure one.
If you have closed the GUI of XAMPP and want to run it again then in your command terminal type –
sudo /opt/lampp/./manager-linux-x64.run
6. XAMPP Desktop Shortcut
We need to create a file that will use as a Desktop shortcut in which add some entries that will let the system execute and launch the XAMPP application.
nano Desktop/XAMPP.desktop
Add Lampp server and icon path
Inside the above-created launcher file, copy and paste the below entries which define the type of the shortcut, and the path to execute along with the icon.
[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
Save the file using Ctrl+O, hit the Enter key, and then exit the file – Ctrl+X.
Now give sudo permission to your desktop shortcut.
sudo visudo
Scroll to the end of the file and past the given line:
your-user ALL = NOPASSWD: /opt/lampp/manager-linux-x64.run
Note: Don’t forget to replace the your-user with your current user that you are using to run XAMPP on your Ubuntu 22.04 LTS system.
Save the file using – Ctrl+O, hit the Enter key, and then exit- Ctrtl+X.
Next, right-click on the Desktop icon and select Allow launching.
Now, double-click on your Desktop icon to run the XAMPP. Those who also want to create an Application launcher for it, need to just copy the created desktop icon in the Applications directory of the system.
sudo cp ~/Desktop/XAMPP.desktop /usr/share/applications/
7: Stop or Start the XAMPP server
In the future, if you want to stop or start the service of this tool using the command line, simply use the following command with sudo
.
To stop all Xampp running services:
sudo /opt/lampp/lampp stop
And if you want to start them again via command line:
sudo /opt/lampp/lampp start
8. Uninstall Xampp from Ubuntu 22.04
To completely uninstall or remove the XAMPP server from your system, let’s see the command that you can use.
sudo /opt/lampp/./uninstall
To remove shortcuts:
sudo rm ~/Desktop/XAMPP.desktop
sudo rm /usr/share/applications/XAMPP.desktop
Other Articles:
How to install and start the XAMPP server on Kali Linux
How to install XAMPP on Ubuntu 20.04 LTS
How To Install Robo 3T on Ubuntu 22.04…
Install Python 3.9 or 3.8 on Ubuntu 22.04.
I have already run command on 3: Run the XAMPP installer on Ubuntu 22.04 but mine doesn’t show anything like on 4: Setup Installer Wizard.
May I know what is it showing in your case?