Thursday, January 24, 2013

XAMPP for Linux On Centos 6.3

Setup steps for XAMPP for Linux On Centos 6.3

a. This tutorial is based on VirtualBox Image of Centos 6.3 downloadable from
b. This image uses Italian Keyboard Layout. It is recommended that you change the layout to United States. Otherwise, you may have problem such as vi commands not getting through the system.
c. The steps below were adapted from

1. Run Centos 6.3.
a. Log in as Centos.
b. Run Terminal.
c. Change user to root. Enter password "reverse".

[centos@localhost ~]$ su

2. Update system using yum
[root@localhost centos]# yum update

3. Get the latest version of XAMPP Linux
[root@localhost centos]# wget

4.  Extract it to /opt/ folder
[root@localhost centos]# tar xvfz xampp-linux-1.8.1.tar.gz -C /opt

5.after you run the xampp be sure you stop the httpd service(in case it is pre-installed)
[root@localhost centos]# service httpd stop

6.add password to the /xampp/,Phpmyadmin,mysql and FTP
[root@localhost centos]# /opt/lampp/lampp security
you will asked to add password. be sure you will remember the password. the password in mysql is not recoverable.

The Virtual Image that we are using is currently using centos/reverse and root/reverse for username/password. To make it easy, set all passwords to 'reverse'. Remember that username for XAMPP is 'lampp'.

7.Edit the httpd-xampp.conf
[root@localhost centos]# vi /opt/lampp/etc/extra/httpd-xampp.conf

8. Remove the following line(end of the file):
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 \
fc00::/7 \
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
useful vi commands:
[alt]+i = INSERT mode
[esc] = shift from INSERT mode to COMMAND mode
dd = delete a line
zz = save
:wq = save before quit
:q = quit without save

9. Run XAMPP
[root@localhost centos]# /opt/lampp/lampp start

10. The XAMPP is now working. if you don't know the username this is the default username:
/xampp/ - lampp
PhpMyAdmin - root
MySql - root
ProFTP - nobody

11. Useful Paths:
/opt/lampp/bin/ - The XAMPP commands home. /opt/lampp/bin/mysql calls for example the MySQL monitor.
/opt/lampp/htdocs/ - The Apache DocumentRoot directory.
/opt/lampp/etc/httpd.conf - The Apache configuration file.
/opt/lampp/etc/my.cnf - The MySQL configuration file.
/opt/lampp/etc/php.ini - The PHP configuration file.
/opt/lampp/etc/proftpd.conf - The ProFTPD configuration file. (since 0.9.5)
/opt/lampp/phpmyadmin/ - The phpMyAdmin configuration file.

1 comment: