Install XAMPP

By admin at 2017-09-29 • 0 collector • 2089 pageviews

centos4-and-5

------

Login as root


### Create a folder `installer` ###

mkdir /installer

cd /installer


### Download the installer from apachefriends usin wget ###

wget http://www.apachefriends.org/download.php?xampp-linux-1.6.8a.tar.gz


### Unpack the tar ball to folder `/opt` and install service ###

tar xvfz xampp-linux-1.6.8a.tar.gz -C /opt


lvl=`egrep :initdefault: /etc/inittab|cut -d: -f2`


cd /etc/rc.d/rc${lvl}.d


ln -s /opt/lampp/lampp S99lampp


ln -s /opt/lampp/lampp K01lampp


### Start Server ###

cd /opt/lampp

./lampp start

./lampp status



/opt/lampp/lampp security ตั้งพาสเวอร์ด


xampp admin Login

lampp 123456

======================================


CentOS 6 x64

----

Steps to Install Xampp/Lampp on CENTOS 6.x



1. Update your CentOS

# yum update


2. Install glibc libraries required for XAMPP.

# yum -y install glibc* libstdc* gcc glibc.i686


3. Download the xampp 1.8.1

# wget http://jaist.dl.sourceforge.net/project/xampp/XAMPP%20Linux/1.8.1/xampp-linux-1.8.1.tar.gz


4. Extract the downloaded archive file to /opt:

# tar xvfz xampp-linux-1.8.1.tar.gz -C /opt


5. XAMPP was designed to run on 32 bit operating systems. The start up script will prevent xampp from starting up if you are running on a 64 bit system which isn’t necessary since you installed 32 bit compatibility libraries in step 1. To get around this restriction, open /opt/lampp/lampp in an editor and comment out the following lines.

# nano /opt/lampp/lampp


# XAMPP is currently 32 bit only

#case `uname -m` in

# *_64)

#   if /opt/lampp/bin/php -v > /dev/null 2>&1

#   then

#      :

#   else

#      $de && echo "XAMPP gibt es zur Zeit nur als 32-Bit Applikation.

#      Bitte verwende eine 32-Bit Kompatibilitaetsbibliothek fuer Dein

#      System."

#

#      $de || echo "XAMPP is currently only availably as 32 bit

#      application. Please use a 32 bit compatibility library for

#      your system."

#

#   exit

#   fi

#   ;;

#esac


5. Now start lampp

# /opt/lampp/lampp start


6. Now type http://localhost in browser and hit enter. Now we will see "XAMPP" welcome page.


7.  For accessing website from outside/external network we have set port forwarding to our local server IP. For example, our Server (XAMPP) IP is listening on Port no.92. Now we have to edit our Xampp httpd.conf file configuration.


# nano /opt/lampp/etc/httpd.conf


Go to line no.52  change "Listen 80" to "Listen 92".


8. For opening port 92 in firewall we have to type the following commands:

                /* Open or create  file /etc/sysconfig/iptables */

 # nano /etc/sysconfig/iptables

                /* Append firewall rule  in iptable as follows */

                -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 92 -j ACCEPT

                /* Save & close the file. Restart iptables */

                # /etc/init.d/iptables restart


Now we can access XAMPP from remote PC's.


9. Edit /opt/lampp/etc/extra/httpd-xampp.conf and adding Require all granted line at bottom of  block<Directory "/opt/lampp/phpmyadmin"> to have the following code:

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


<Directory "/opt/lampp/phpmyadmin">

  AllowOverride AuthConfig Limit

  Order allow,deny

  Allow from all

  Require all granted

</Directory>


And also edit “New XAMPP security concept” <LocationMatch> block and change “Deny from all” to “Allow from all”   



10. Now we will add password to the /xampp/,Phpmyadmin,mysql and FTP for security purpose.

# /opt/lampp/lampp security



11. Now we will move our website pages under “/opt/lampp/htdocs” directory and edit “/opt/lampp/htdocs/index.php” page.

# nano /opt/lampp/htdocs/index.php


Go to line no. 8 of /opt/lamp/htdocs/index.php and change the following

 header (‘Location:  ‘.$uri.’/YOUR WEBSITE FOLDER LOCATION/’);



12.  Add the following line in “/opt/lampp/etc/my.cnf” file for increasing maximum number of connection pool to MySQL server.  Also change the “user” parameter of [mysqld] from “nobody” to “root”.

# nano /opt/lampp/etc/my.cnf

max_connections = 1000



13. Restart XAMPP/LAMPP server

# /opt/lampp/lampp restart


14. ทำให้ xampp  autostart


# nano /etc/rc.local


add  บรรทัดนี้เข้าไป

/opt/lampp/lampp start


# reboot


จบ

=====================================


Requires Login

Loading...