How To Install XAMPP on AlmaLinux 9

In this guide, we want to teach you How To Install and Configure XAMPP on AlmaLinux 9.

XAMPP is a short form for Cross-Platform, Apache, MySQL, PHP, and Perl. XAMPP is a popular cross-platform web server that allows programmers to write and test their code on a local webserver. It was created by Apache Friends, and the public can revise or modify its native source code. It includes MariaDB, Apache HTTP Server, and interpreters for PHP and Perl, among other computer languages. 

Steps To Install and Configure XAMPP on AlmaLinux 9

to complete this guide, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide on Initial Server Setup with AlmaLinux 9.

Install XAMPP Server on AlmaLinux 9

First, you need to update your local package index with the following command:

sudo dnf -y update

Then, install the required packages by using the following command:

sudo dnf install libnsl wget

Download XAMPP for Linux

At this point, you need to visit the XAMPP Downloads page and get the latest release of XAMPP matching desired PHP version for your application requirements.

sudo wget https://sourceforge.net/projects/xampp/files/XAMPP%20Linux/8.1.10/xampp-linux-x64-8.1.10-0-installer.run

When your download is completed, set the correct permissions for it with the following command:

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

Run XAMPP Installer Script

At this point, use the following command to run the XAMPP script installer on AlmaLinux 9:

sudo ./xampp-linux-x64-8.1.10-0-installer.run

Select components to install:

Output
----------------------------------------------------------------------------
Welcome to the XAMPP Setup Wizard.
----------------------------------------------------------------------------
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.

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

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

Configure XAMPP on AlmaLinux 9

At this point, you need to allow everyone to access the XAMPP server on AlmaLinux 9.

Open the /opt/lamp/etc/extra/httpd-xampp.conf file and add a line ” Require all granted” and comment out or delete the line “Require local“.

sudo vi /opt/lampp/etc/extra/httpd-xampp.conf
<Directory "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
    Require all granted
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>

When you are done, save and close the file.

Installation files of XAMPP are inside the /opt/lampp directory on AlmaLinux 9:

cd /opt/lampp

To list the usage options, run the command below:

sudo ./xampp --help
Output
Usage: xampp <action>
start Start XAMPP (Apache, MySQL and eventually others)
startapache Start only Apache
startmysql Start only MySQL
startftp Start only ProFTPD

stop Stop XAMPP (Apache, MySQL and eventually others)
stopapache Stop only Apache
stopmysql Stop only MySQL
stopftp Stop only ProFTPD

reload Reload XAMPP (Apache, MySQL and eventually others)
reloadapache Reload only Apache
reloadmysql Reload only MySQL
reloadftp Reload only ProFTPD

restart Stop and start XAMPP
security Check XAMPP's security

enablessl Enable SSL support for Apache
disablessl Disable SSL support for Apache

backup Make backup file of your XAMPP config, log and data files

oci8 Enable the oci8 extenssion

panel Starts graphical XAMPP control panel

If you get the following error:

XAMPP is currently only availably as 32 bit application. Please use a 32 bit compatibility library for your system.

You can fix it by installing the following package:

sudo dnf install libxcrypt-compat

Then re-run the ./xampp --help command, and it will work.

Start XAMPP Server

Now from your XAMPP directory, run the following command to start your service:

# cd /opt/lampp 
# sudo ./xampp start
Output
Starting XAMPP for Linux 8.1.10-0...
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.

Access XAMPP Web Interface

At this point, you can access your XAMPP on AlmaLinux 9 through the web interface. Type your server’s IP address in your web browser:

http://server-ip_address

You will see your XAMPP welcome page:

XAMPP Web Interface

To see your PHP information, you can click on the PHPInfo at the top of the screen.

Also, to access the phpMyAdmin page you can click on the phpMyAdmin at the top of the screen.

Or you can type the URL with /phpmyadmin in the address bar:

http://server_ip_address/phpmyadmin

Conclusion

At this point, you have learned to Install and Configure XAMPP on AlmaLinux 9.

Hope you enjoy it.

You may be like these articles:

How To Install XAMPP on Ubuntu 22.04

Install and Configure XAMPP on Debian 11

How To Install and Use XAMPP on Centos 7

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!