How To Install XAMPP Server on AlmaLinux or Rocky 8

Let’s quickly set up the LAMP server by installing and setting up the XAMPP application on AlmaLinux or Rocky GUI desktop. 

What is XAMPP?

XAMPP is a compilation of various tools and programs that you need if you want to set up a local test server. Its name XAMPP is the combination of Apache Web server, the database MySQL, and scripting languages Perl and PHP.  The “X” at the beginning refers to the fact that the program can be used on different operating systems such as Windows, Linux, or macOS X.

Instead of setting up a native webserver, the developers and testers use XAMPP  that enables them to install and set up everything they need with just a few clicks. This saves us a lot of time. With this software, you make your work easier because you do not have to install the individual components of your test server configuration yourself.

With XAMPP it is possible to install your own web server with all its components on your local computer in just a few steps; to run and test content management systems (Joomla, Drupal, Typo3, etc.) or your own PHP scripts on your local PC.

Depending on the operating system it includes many other tools such as OpenSSL, phpMyAdmin, and more. The installation is very simple. You download the version provided for your operating system, unpack it if necessary and start the server tools; a complicated configuration is not necessary.


What can you do with XAMPP?

If you have installed XAMPP, you can then work on the local test server, for example, on the PHP scripts of your website. This saves us a lot of time because we can work on the files locally and see the changes in the browser immediately after they have been saved. Without it, we would have to upload the changed files to our web server each time, and that takes up time.

Should you be using XAMPP?

So now to the question of whether you should use XAMPP; the first thing is XAMPP is not there to publicly host a web server. Thus, we recommend that you only use this software if you want to work on your web project locally, as public use can be unsafe. If you are only working on simple web projects for which you only use HTML and CSS, you do not need a local test server. You only need it if you use PHP or a CMS system and need a database.


XAMP installation on AlmaLinux  8 or Rocky

Step 1. Run system update

Let’s run the system update command to first update all the installed packages and refresh the repo cache as well.

sudo dnf update


Step 2: Download XAMPP for AlmaLinux/Rocky

There are three versions of XAMPP available on its official website. The major difference between these versions is the PHP version i.e  PHP 7.3.28, PHP 7.4.19, and PHP 8.0.6.

You can either visit its website to download the versions as per your requirements or use the below-given commands:

sudo dnf install wget

For PHP 7.3.28:


For PHP 7.4.19:


For PHP 8.0.6



Step 3: Make Binary Executable

By default, you won’t be able to run the XAMPP binary downloaded in the above steps. For that, first, we have to change the permission of the file to make it executable. Otherwise, you will get the error “cannot execute a binary file“.

The syntax for that is:

sudo chmod +x

Thus, the commands will be like this:

chmod +x xampp-linux-x64-*


Step 4: Command install XAMPP on Almalinux

Finally, run the setup file using sudo to start a text-based XAMPP installation wizard on your Linux PC or laptop.

sudo ./

So, the command will be-

sudo ./xampp-linux-*


If you have multiple versions of XAMPP then you need to specify the file name or version you want to install.

You can check the available files by typing-


For example, if we want to install PHP 7.4, in our case the downloaded file name was –, thus the command will be

sudo ./

In the same way, you can install other downloaded versions.


The setup wizard will be Text-based, just follow or see the below screenshot to get an idea.

XAMPP AlmaLinux Setup wizard

On more thing install before moving further install  libnsl otherwise you will get an error “Cannot load modules/ into server: cannot open shared object file:”

sudo dnf -y install libnsl


Step 5: Start XAMPP Server

To start the XAMPP server, you have to use the command given below. This will start all the required components of this software.

sudo /opt/lampp/lampp start

Or to get a GUI interface for starting and stopping the Servers, use –

sudo /opt/lampp/./

XAMPP Linux GUI Access to start Apache MySQL and FTP


Step 6: Access Web Server interface

Once the server is started, open your system’s browser and type: or http://localhost you will have the XAMPP interface with phpMyAdmin link to access and create a database.

Interface web

By Default, the phpMyAdmin cannot be accessed remotely, thus to enable remote access edit:

sudo nano /opt/lampp/etc/extra/httpd-xampp.conf

Find the following block of text:

Alias /phpmyadmin "/opt/lampp/phpmyadmin/"
<Directory "/opt/lampp/phpmyadmin">
AllowOverride AuthConfig
Require local

Replace “Require local” with Require all granted 

Save the file – Ctrl+X, press Y, and then hit the Enter key.

enable XAMPP phpmyadmin remote access


Step 7: Learn how to create a Desktop shortcut

Those who don’t want to go through the command line again and again to start the server can learn the way to create a XAMPP desktop shortcut. 


Step 8: Stop and Uninstall XAMPP on Linux (optional)

After some time if you want to uninstall XAMPP from AlmaLinux or Rocky then follow the given commands-

sudo /opt/lampp/lampp stop

Now, remove it:

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

Stop and uninstall XAMPP from AlmaLinux or Rocky



Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.