Install XAMPP on Ubuntu 22.04 LTS Jammy Linux

0

Learn commands to install XAMPP on Ubuntu 22.04 LTS Jammy JellyFish Linux using terminal to quickly setup Apache web server and MySQL environment.

With the XAMPP freeware collection, pre-configured Apache-based web servers can be easily configured. For this purpose, the open source package also includes the database program MariaDB as well as the scripting languages ​​PHP and Perl combined into a single installation routine.

Also onboard are useful tools such as FileZilla FTP server, Mercury Mail Transport System mail server, Tomcat for Java applications, phpMyAdmin, Webalizer analysis tool, Fake Sendmail mail tester, and OpenSSL encryption. Modules are conveniently controlled through the XAMPP Control Panel.

terms

  • Graphic 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 like Ubuntu, we can easily configure Apache, MySQL, and other tools available through XAMPP using just a few commands. However, many users do not want to mess with their system to test certain web applications. If you are one of those, XAMPP is a good option to not interfere with locally 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 this, just visit the official website of this tool. here is the link.

Scroll down to the section where XAMPP Linux packages are available for download. You will see three versions:

Expect the PHP version, the rest of the tools in all three versions will be the same. So, as per the PHP version requirement for your project, download this one.

For instance:

Here while doing this article, the latest version of PHP was 8.1.6, so we are uploading the XAMPP with it, however, you can opt for any of them. Click on the To download button.

2: Open the command terminal

You can either use the shortcut- CTRL+ALT+T or just go to Applications from Show candidates option and find the terminal to run it.

3: Run the XAMPP installer on Ubuntu 22.04

By default, everything we download from the Internet using the browser on Linux systems, goes to the Downloads folder, so go to this folder first.

cd Downloads

Modify the installer permission. 755 means read and execute access for everyone and write access for the file owner

chmod 755 xampp-linux-*-installer.run

Run the installer

sudo ./xampp-linux-*-installer.run

4: Setup Setup Wizard

The moment you run the install command, a XAMP setup wizard will open. Click on the Next button.

XAMPP Setup Wizard

Select both “XAMPP Core Files” components and XAMPP Developer Files, then NEXT.

Select the components to install on XAMPP

By default, all files will be unzipped as /opt/lampp.

Installation directory for installing XAMPP

Click on the Finish and the XAMPP will be on your Linux Ubuntu 22.04 LTS system.

5: Start Apache and MySQL server

Navigate to the Manage Server tab and corresponding to the web server and database, click on the Begin button. To change their running ports, select the one from Configure.

XAMPP Setup Wizard 1

Install XAMPP Server on Ubuntu 22.04

If you closed the XAMPP GUI and want to run it again, in your command terminal, type –

sudo /opt/lampp/./manager-linux-x64.run

6. XAMPP Desktop Shortcut

We need to create a file that will act as a desktop shortcut in which to add entries that will allow the system to run and launch the XAMPP application.

nano Desktop/XAMPP.desktop

Add Lampp server and icon path

In the launch file created above, copy and paste the entries below that define the type of shortcut and the path to run 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+Opress the Walk in key, then exit the file – CTRL+X.

Now give sudo permission to your desktop shortcut.

sudo visudo

Scroll to the end of the file and go past the given line:

your-user ALL = NOPASSWD: /opt/lampp/manager-linux-x64.run

To note: Do not forget to replace the your-user with your current user that you use to run XAMPP on your Ubuntu 22.04 LTS system.

to safeguard the file using – CTRL+Opress the Walk in key, then exit- CTRL+X.

Now double click on your desktop icon to run the XAMPP. Those who also want to create an application launcher for this, simply copy the created desktop icon to the system’s Applications directory.

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, just use the following command with sudo.

To stop all running Xampp services:

sudo /opt/lampp/lampp stop

And if you want to relaunch them via the 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 you can use.

sudo /opt/lampp/./uninstall

Uninstall XAMPP from Ubuntu 22.04

To delete shortcuts:

sudo rm ~/Desktop/XAMPP.desktop
sudo rm /usr/share/applications/XAMPP.desktop

Other Items:

How to Install and Start XAMPP Server on Kali Linux

How to Install XAMPP on Ubuntu 20.04 LTS

Share.

About Author

Comments are closed.