Tuesday, February 28, 2012

Installing XAMPP/LAMPP in Linux

For Ubuntu:

Start Terminal.

If you have already updated you apt repository then enter write "apt-get install lampp" in terminal and press enter. XAMPP will be installed automatically.

But, if you don't have updated apt repository, then write "apt-get update" in terminal and press "Enter".

Sometime it becomes difficult to install software from Bangladesh. For solving this problem go to "System Settings" from start menus. Then, go to "Software Sources" from Settings menus. Click "Ubuntu Software" tab. change the source of Download from "Download From" drop-down filed. Choose Main Server to avoid problem of online software installation using "apt-get". Don't forget to update apt by writing "apt-get update" at terminal and pressing enter.

For CentOS:

First check if your "wget" command is installed for the system. If not, login to terminal as root and then write "yum install wget" and press enter. Then press y and enter to approve installation of "wget".

Then, download installation file for XAMPP.
write "wget http://www.apachefriends.org/download.php?xampp-linux-1.6.8a.tar.gz" and press Enter, installation file will be stored in current file directory.

After the download is complete, install XAMPP using the command: tar xvfz xampp-linux-1.6.8a.tar.gz -C /opt

If you want to start XAMPP at the start of the machine Command the following commands:

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


Starting, Restarting or Stopping XAMPP Server:

First go to root directory: cd /

Then for starting XAMPP server: opt/lampp/lampp start

for re-starting XAMPP server: opt/lampp/lampp restart

for starting XAMPP server: opt/lampp/lampp stop