How To Install LAMP Stack Web Server on Ubuntu 22.04

XAMPP stands out as a seamless and user-friendly solution, offering a hassle-free installation process. This all-in-one package features Apache, MariaDB, PHP, and Perl, making it an ideal choice for Windows users. However, XAMPP has evolved to cater to Linux distributions as well. It presents itself as the simplest alternative for those who wish to bypass the complexities of configuring a LAMP Stack on their Ubuntu 22.04 system.

This article shows users how to install a LAMP stack web server (Apache, MySQL, PHP) on the Ubuntu 22.04 Linux system in 5 Minutes.

Installing XAMPP on Ubuntu 22.04​

Step 1: Update system​

Ensure your Ubuntu system is updated.

sudo apt -y update

sudo apt -y install libnsl

Step 2: Download XAMPP on Ubuntu 22.04​

Install wget on Ubuntu 22.04:

sudo apt -y install wget

Choose and Download the XAMPP installer that matches the PHP version you want.

### PHP 8.2 ###
wget https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/8.2.0/xampp-linux-x64-8.2.0-0-installer.run

### PHP 8.1 ###
wget https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/8.1.12/xampp-linux-x64-8.1.12-0-installer.run

### PHP 8.0 ###
wget https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/8.0.25/xampp-linux-x64-8.0.25-0-installer.run

The binary installer should be executable.

chmod a+x xampp-linux-x64-*-installer.run

Then run the XAMP installer:

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

You will get to Setup Wizard where you follow installation prompts.
----------------------------------------------
----------------------------------------------------------------------------
Welcome to the XAMPP Setup Wizard.
----------------------------------------------------------------------------
Select the components you want to install; clear the components you do not want
to install. Click Next when you are ready to continue.

XAMPP Core Files : Y (Cannot be edited)

XAMPP Developer Files [Y/n] : y

Is the selection above correct? [Y/n]: y

----------------------------------------------------------------------------
Installation Directory

XAMPP will be installed to /opt/lampp

Press [Enter] to continue:

----------------------------------------------------------------------------
Setup is now ready to begin installing XAMPP on your computer.

Do you want to continue? [Y/n]: y

----------------------------------------------------------------------------
Please wait while Setup installs XAMPP on your computer.
Follow installation screens.
  1. Accept setup wizard.
  2. Select the components to install
  3. Choose a location where XAMPP packages will be installed.
  4. Agree to install XAMPP on Ubuntu 22.04
Wait for the installation of XAMPP on Ubuntu 22.04 to complete.
----------------------------------------------------------------------------
Please wait while Setup installs XAMPP on your computer.

Installing
0% ______________ 50% ______________ 100%
#########################################

----------------------------------------------------------------------------
Setup has finished installing XAMPP on your computer.

Step 3: Start and use XAMPP on Ubuntu 22.04​

XAMPP is installed to /opt/lampp/. To start XAMPP services, run:

<span>$ sudo /opt/lampp/lampp start</span> Starting XAMPP for Linux 8.0.19-0... XAMPP: Starting Apache...ok. XAMPP: Starting MySQL...ok. XAMPP: Starting ProFTPD...ok.

To verify the installation of XAMPP on Ubuntu 22.04 visit the Apache web page:

Accessing phpMyAdmin:

Stopping XAMPP on Ubuntu 22.04​

To stop XAMPP services running:

<span>$ sudo /opt/lampp/lampp stop</span> Stopping XAMPP for Linux 8.0.19-0... XAMPP: Stopping Apache...not running. XAMPP: Stopping MySQL...ok. XAMPP: Stopping ProFTPD...ok.

Uninstalling XAMPP on Ubuntu 22.04​

To uninstall XAMPP on Ubuntu 22.04, run:

cd /opt/lampp sudo ./uninstall sudo rm-rf /opt/lampp

Enjoy using XAMPP on the Ubuntu 22.04 Linux system.
 

About us

  • oDiscuss Community provides a forum platform for discussing, sharing resources and ideas, and finding answers on various topics, including technology, IT, IT systems, networking systems, computers, servers, blogging, digital marketing, SEO, web design, web development, and more.

Quick Navigation

User Menu