How To Install XAMPP On CentOS/RHEL 7.0

September 5, 2019


The XAMPP stack is a platform that developers use as a local host, giving them a suitable environment for testing software and webpages before transferring data to remote servers.

As an open-source Apache distribution of a PHP development environment, it consists of cross-platform software (X): Apache (A), MariaDB (M), PHP (P) and Perl (P).

Learn how to install XAMPP on your CentOS system, how to verify the installation and uninstall the XAMPP package.

For Ubuntu systems, refer to our guide on installing XAMPP on Ubuntu 18.04.

tutorial guide on installing the xampp stack on centos


  • CentOS operating system
  • A user with sudo privileges
  • Access to a terminal/command line

6 Steps For Installing XAMPP On CentOS

Step 1: Download XAMPP Package

1. Start by downloading XAMPP from the official Apache Friends webpage.

2. Find and click on the XAMPP for Linux button on the homepage. Save the file on your CentOS system.

downloading xampp for linux from apache friends

Step 2: Give the Package Executive Permission

Before you can run the installation process, you need to modify the file permission and make it executable.

1. Open the terminal (Ctrl+Alt+F2) and change the directory to the Downloads folder where the XAMPP package is located:

cd Downloads
move to downloads directory in centos

2. Use the chmod command to make the file executable with the following command:

chmod +x [package_name]

To find the full package name, navigate to the Downloads folder where you downloaded the XAMPP installation package. Copy and paste the name into the command above.

xampp package in downloads folder

To make the latest XAMPP installation package executable, enter the command:

sudo chmod +x
example of making xampp package executable

Bear in mind the terminal won’t give any output confirming you have successfully performed the previous step.

Step 3: Run the Installation Wizard

1. Next, run the installer and launch the graphical setup wizard with the command:

sudo ./[package_name]

For the latest XAMPP stack available, use the command:

sudo ./
run xampp installation wizard

2. When prompted, supply the password to verify the command.

3. A new XAMPP Setup Wizard window will open, on top of the terminal:

xampp setup wizard

Step 4: Install XAMPP on CentOS

After the XAMPP welcome screen opens, proceed through the installation configuration.

1. Click on the Next button. In the following Select Components dialogue, decide which components to install. We recommend keeping the default settings and continuing with Next.

setup select components

2. Then, the wizard displays the directory where the software will be installed. To continue, click Next.

setup of the installation directory

3. The package offers to install sponsored applications (WordPress, Joomla, Drupal, and others) on top of the XAMPP installation. You can opt-out of installing additional software by unchecking the Learn more about Bitnami for XAMPP box.

setting up bitnami for xampp

4. Once everything is set, the wizard prompts ready to install XAMPP on your CentOS. Click on Next to launch installation.

screenshot showing ready to install

5. The installation process starts and a dialogue box displaying the progress bar will appear on your screen.

installing xampp stack

6. Complete the process by clicking on Finish.

xampp installation is sucessfull

Step 5: Launch XAMPP

XAMPP will launch its control panel. Open the Manage Servers tab to see the available services and check their status.

xampp control panel with manage servers tag selected

In it, you will see the MySQL Database, ProFTPD, and Apache Web Server. In the example below, two out of three of the servers aren’t running.

Select a server and click on Start to enable it.

To check whether you have successfully set up the stack, power all the available servers.

change server status

Step 6: Verify XAMPP is Running

Make sure XAMPP stack running smoothly on your CentOS system in the following two steps.

1. Enter the following URL in a browser to check if the localhost is working:


If the XAMPP dashboard page appears, you have successfully installed the stack.

xampp dashboard

2. Verify MariaDB service is running, by opening the URL:


The phpMyAdmin homepage will display as in the image below:

phpmyadmin dashboard with general setting and apperance

Once the XAMPP installation is complete, using the XAMPP control panel you can start and stop each module for testing purposes. For example, when testing PHP applications, you can start the two modules Apache and MySQL allowing PHP programs to run on your computer.

This XAMPP software emulates a remote-server-like environment, so when you need to test applications often, to fix bugs, it allows you to speed up your development process.

How to Uninstall XAMPP

1. To uninstall the XAMPP stack, return to the terminal (Ctrl+Alt+F2) and move to the opt/lampp directory by typing:

cd /opt/lampp

2. Next, use the following command to uninstall XAMPP:

sudo ./uninstall

3. A dialogue box will appear asking you whether you want to remove XAMPP and all of its modules. Click on Yes to confirm.

confirming yes when uninstalling xampp stack

Lastly, the output will show you: Uninstallation completed.

uninstallation completed pop up box

4. Finally, remove the specified directory with:

sudo rm –r /opt/lamp


This article has shown you how to successfully install the XAMPP stack on a CentOS system. You also learned how to launch XAMMP, verify installation and uninstall XAMPP.

You can also explore similar alternatives such as the LAMP stack or the MEAN stack.

Was this article helpful?
Sofija Simic
Sofija Simic is an experienced Technical Writer. Alongside her educational background in teaching and writing, she has had a lifelong passion for information technology. She is committed to unscrambling confusing IT concepts and streamlining intricate software installations.
Next you should read
How to Install MariaDB on CentOS 7
July 14, 2019

For CentOS 7 users, MariaDB is the default database system as it replaced MySQL as the default database...
Read more
How to Install XAMPP on Ubuntu 18.04
February 22, 2024

The XAMPP stack is an open-source Apache distribution of a PHP development environment consisting of...
Read more
How to Install the LAMP Stack on CentOS 7
May 14, 2019

The LAMP stack is a bundle consisting of a Linux operating system, an Apache server, a MySQL database, and...
Read more
How To Install MySQL 8.0 In Ubuntu 18.04
December 12, 2018

MySQL is an open-source relational database server tool for Linux operating systems. It is widely used in...
Read more