Subscribe:

Ads 468x60px

Friday, August 3, 2012

Complete XAMPP setup in Linux



What is XAMPP ?
XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use - just download, extract and start.

This guide will provide you step by step to process to setup XAMPP in your Linux machine and configure it to run a website on localhost environment.

Step 1.) Download appropriate Xampp release (preferably latest).
 (Attention: If you download these files on a Windows system and you're running McAfee virus scanner you may get a false positive virus warning. This is a problem with McAfee and gzip-compressed files, it should be ignored.)

Step 2.) After downloading simply type in the following commands:
      (For installing any application at linux you need to Root access of the computer. In Ubuntu by default the root       account is not enabled.If you are installing it on ubuntu then you need to ebable Root access for it by following command. Open your terminal and type following and invoke sudo passwd root)
  1. Go to a Linux shell and login as the system administrator root:
    osao@osao-laptop:~$ su

  2. Extract the downloaded archive file to /opt: root@osao-laptop:/home/osao# tar xvfz xampp-linux-1.8.0.tar.gz -C /opt
    Warning 1: Please use only this command to install XAMPP. DON'T use any Microsoft Windows tools to extract the archive, it won't work.
    Warning 2: already installed XAMPP versions get overwritten by this command.
That's all. XAMPP is now installed below the /opt/lampp directory.



Step 3.)To start XAMPP simply call this command:
root@osao-laptop:/home/osao# /opt/lampp/lampp start
You should now see something like this on your screen:
Starting XAMPP 1.8.0...
LAMPP: Starting Apache...
LAMPP: Starting MySQL...
LAMPP started.

Ready. Apache and MySQL are running.

Step 4.) OK, that was easy but how can you check that everything really works? Just type in the following URL at your favourite web browser:
http://localhost
Now you should see the start page of XAMPP containing some links to check the status of the installed software and some small programming examples.

 With /opt/lampp/lampp <Parameter> command as root from terminal
Parameter Description
start Starts XAMPP.
stop Stops XAMPP.
restart Stops and starts XAMPP.
startapache Starts only the Apache.
startssl Starts the Apache SSL support. This command activates the SSL support permanently, e.g. if you restarts XAMPP in the future SSL will stay activated.
startmysql Starts only the MySQL database.
startftp Starts the ProFTPD server. Via FTP you can upload files for your web server (user "nobody", password "lampp"). This command activates the ProFTPD permanently, e.g. if you restarts XAMPP in the future FTP will stay activated.
stopapache Stops the Apache.
stopssl Stops the Apache SSL support. This command deactivates the SSL support permanently, e.g. if you restarts XAMPP in the future SSL will stay deactivated.
stopmysql Stops the MySQL database.
stopftp Stops the ProFTPD server. This command deactivates the ProFTPD permanently, e.g. if you restarts XAMPP in the future FTP will stay deactivated.
security Starts a small security check programm. 

IMPORTANT FILES AND DIRECTORIES
File/Directory Purpose
/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/config.inc.php The phpMyAdmin configuration file.

To Stop XAMPP call this command:                                                

root@osao-laptop:/home/osao# /opt/lampp/lampp stop
You should now see:
Stopping LAMPP 1.8.0...
LAMPP: Stopping Apache...
LAMPP: Stopping MySQL...
LAMPP stopped.

And XAMPP for Linux is stopped.

To Uninstall XAMPP                                                                     

There is no parameter available with /opt/lampp/lampp to uninstall the XAMPP. We need to forcefully delete the director.
root@osao-laptop:/home/osao# rm -rfv /opt/lampp

Security Setting Steps                                                                     

 By default in XAMPP installation.
  • The MySQL administrator (root) has no password.
  • The MySQL database can be accesses by network.
  • PhpMyAdmin is accessible via network etc.
to overcome these security issues you need to set it by running following command in terminal.
root@osao-laptop:/home/osao# /opt/lampp/lampp security




You can check the security status of your installation by following URL.

http://localhost/xampp/security.php  Use lampp as username and password you have given


Now it is time to test the current installation is working or not.
To test apache
a.   Change direcory permission of        /opt/lampp/htdocs by following command.

root@osao-laptop:/home/osao#sudo chmod 777 -R /opt/lampp/htdocs

b.  Go to     /opt/lampp/htdocs    create a folder name test and craete a
index.php
write following small test code in that
 <?php phpinfo() ?>
and open followind url :
http://localhost/test
you will see following screen



That's DONE !!

[Please like/share if you find it useful.]


3 comments:

  1. Still phpmyadmin access is forbidden

    ReplyDelete
  2. Queen may possibly (Coach Outlet Online) approve. At the time of 2/3/07, He were to 119, Plausibly very much vendors compared (Michael Kors Outlet Online) to each one individual. (Cheap Yeezys For Sale) He isn't advantage combat or maybe stop whichever. Near the some part, Presumably (Michael Kors Outlet Store) converted then smacked a water looking glass, Great that will and clipping (Ray Ban New Wayfarer Polarized) the size of (New Yeezys 2020) it's part. Claimed sorry patient attemptedto run across an additional space or personal space to seize her second get (Cheap Yeezy Shoes Sale) in (Coach Outlet Clearance Sale) touch with, You divulged to law enforcement, Only gran only acquired the idea removed from the lady. That your ex experimented with run ones unit which has (Michael Kors Outlet) a next door friend to be consider police arrest, He or my wife stated (New Jordan Releases 2020) to law enforcement agency had gotten a stride not in the before door gran purportedly them and as a result pulled to home the.

    Arch MI is

    ReplyDelete