Tuesday, March 23, 2010

How to start web development with XAMPP

 If you are planning to learn web development using  LAMP environment , and find it difficult to set up various component required,  XAMPP  can come to your rescue.   In fact, XAMPP is a prebuilt package with following componets, Apache,MySQL, PHP and Perl.
 You can download the XAMPP package from Apache Friends website. The present release is available for a variety of operating systems.

Installation

   For installation on Ubuntu I downloaded the tar.gz archive from Apache Friends
 I decided to install xampp into /opt . Untar the downloaded file using the following command.
sudo tar -xzvf xampp-linux-1.7.3a.tar.gz -C /opt
Earlier,  the name of XAMPP project was LAMPP . Hence a folder named LAMPP will be created under /opt with all necessary files.

Start/Stop XAMPP
  You  can start XAMPP using the following command from a terminal

sudo /opt/lampp/lampp start
 Similarly you can stop xampp using

sudo /opt/lampp/lampp stop

Look for any error messages while running the commands.

Using XAMPP to write your web application
 
  Now open up a browser and browse http://127.0.0.1 The following screens will appear .





You can access phpmyadmin from the tools section and work with mysql.

Now you can create a folder named public_html in your home directory.

mkdir ~/public_html

Now you can link this folder to your apache document root as below.


sudo ln -s ~/public_html /opt/lampp/htdocs/$USER

 You can write your HTML/php code using any editor and save it under public_html folder in your home directory. You can test your code by browsing to http://127.0.0.1/yourusername. ( Replace yourusername with your actual user name).

Security issues
  It is not advisable to set up XAMPP to a machine directly connected to internet.   The XAMPP is designed as a beginners platform to learn LAMP. If you want to run a production system look else where for a secure installation of LAMP.

2 comments:

web hosting said...

You gave me some good information about the "How to start web development with XAMPP". thanks keep on updating.

Linda Grase said...

You provided for me some great data about the "How to begin web advancement with XAMPP". much appreciated continue upgrading.



Web Designers London//Apps And Webs Development