How to install XAMPP on CentOS/RHEL 6.5

In this tutorial we will learn,how to install XAMPP in CentOS/RHEL 6.5.We will install XAMPP version 1.8.3. XAMPP is a open source cross platform software stack package mainly used for web server solution. XAMPP is available for Windows,MAC OSX,Solaris and Linux(WAMP, MAMP, SAMP, LAMP).

XAMPP stands for
X = Cross Platform (Windows,MAC OSX,Solaris and Linux)
A = Apache
M = MySQL
P = PHP
P = Perl

NOTE: SELINUX is in Enforcing mode

Install XAMPP on CentOS/RHEL

Follow the given below steps to install XAMPP on CentOS/RHEL 6.5

Step 1: Download the XAMPP
We suggest you to download latest stable XAMPP package for Linux.You can download the XAMPP from this URL.

We have downloaded the XAMPP package version 1.8.3-3

You can download the XAMPP package from sourceforge.net

Step 2: Transfer the file to Server

After downloading the XAMPP package into your system,transfer the file by using scp command

Alternatively, directly in Server terminal,you can use wget command to download the package if you have downloading URL address.
Example:

yum install wget
wget http://downloads.sourceforge.net/project/xampp/XAMPP%20Linux/1.8.3/xampp-linux-x64-1.8.3-3-installer.run 

Step 3 : Give executable permission to downloaded XAMPP script
Give executable permission to downloaded XAMPP script.In our case, we have downloaded the file xampp-linux-x64-1.8.3-3-installer.run (The file name may be different in your case depends upon latest package and architecture of Operating system)


chmod +x xampp-linux-x64-1.8.3-3-installer.run

Step 4: Run XAMPP installer script
Run the XAMPP installer script.While script is running,it will ask some question.Give the answer as per your requirement. The script will install the XAMPP stack in /opt/lampp directory. You can change this path at the time of installation.


./xampp-linux-x64-1.8.3-3-installer.run 

----------------------------------------------------------------------------
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.

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

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


Step 4: Allow ALL network to access XAMPP Server

I did troubleshooting after installing XAMPP,hence directly writing solution in this step.You can read about the Error and its solution from this post.

Edit the last section of file called httpd-xampp.conf.Add new line Require all granted and comment the line Require local by using # sign

vi /opt/lampp/etc/extra/httpd-xampp.conf

    # Require local
    Require all granted
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var

Step 5 : Restart all services by using lampp script
Restart all the services by using below given command

/opt/lampp/lampp restart

Below given is the reference from my system

[root@localhost ~]# /opt/lampp/lampp restart
Restarting XAMPP for Linux 1.8.3-3...
XAMPP: Stopping Apache...ok.
XAMPP: Stopping MySQL...ok.
XAMPP: Stopping ProFTPD...not running.
XAMPP: Starting Apache...ok.
XAMPP: Starting MySQL...ok.
XAMPP: Starting ProFTPD...ok.
[root@localhost ~]# 

Step 6: Now open the XAMPP in Web browser

Now open the web browser and type the URL or ip-address in address bar
The XAMPP dashboard will be open

Install XAMPP

Step 7: Open phpmyadmin

To open phpmyadmin of XAMPP,simply type URL of server with /phpmyadmin in address bar

Example : Replace 192.168.56.102 with your XAMPP server ip address(run ifconfig command to get your server ip)

http://192.168.56.102/phpmyadmin

xampp phpmyadmin

28 thoughts on “How to install XAMPP on CentOS/RHEL 6.5”

  1. I have a problem with installation. I type “chmod +x xampp-linux-x64-1.8.3-3-installer.run” and bash says: i cannot start this binnary file. What i need to do?

    Reply
    • Hello Jone,

      You have done restart of service. Probably at that time MySQL service was in stopped state.
      To confirm, run the command ps-ef|grep -i mysql . Check if it is running or not.

      Regards
      Sharad

      Reply
  2. “NOTE: SELINUX is in Enforcing mode”
    Thanks god somebody is “security-aware”, so tired of all this lamers writing “Disable SELinux” as first step!!!!

    Reply
  3. There might be a typo in step 2. Had to point to root first before accessing the xamp installer with the ‘/’

    chmod +x /xampp-linux-x64-1.8.3-3-installer.run

    Reply

Leave a Comment

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