Sunday, June 27, 2010

How to install XAMPP and troubleshoot for problems?

These articles written by me are meant for absolute beginners in web development and if you are an expert, you may benefit as well if you read on. In this article I will explain about how to set up a web server in your desktop to create and test a website locally.

The open source web services software bundles are LAMP, WAMP, SAMP, MAMP and XAMPP. Sorry if I have missed out some. I will write about XAMPP in detail because it can be used universally across all operating systems.

In the other software packages keeping AMP(Apache, MySql and PHP) the same L stands for Linux which is for Linux Operating System, WAMP stands for Windows Operating System, S stands for Sun Solaris OPerating System and M stands for Macintosh Operating System.

XAMPP is an abbreviation. It denotes an assembly of services which help you build dynamic web pages and run them on a server.
X-Universal or Cross Platform i.e. it runs across all operating systems.
A-Apache is a Linux based web server
M-MySql is a database technology
P-PHP is an extensible language which supports dynamic web development
P-Perl is a high level language

XAMPP is an Open Source software bundle with a GPL(General Public License) developed and distributed by the Apache Friends.

Now how do you install XAMPP and get started with it?

1. Go to the apache friends website and download it. This is the link as on today but someday it may change so its always better to search for the keyword download XAMPP in Google before to go to the link in case you dont find it here - http://www.apachefriends.org/en/xampp.html

2. Now go ahead and download the .exe(executable) file of XAMPP by selecting the operating system in which you are working with. The current version of XAMPP for Windows, Mac and Linux is 1.7.3. XAMPP is always updated by a group of active and experienced developers and therefore to be abreast with the latest technology download the latest stable version. Do not download a beta version if you are not an experienced developer to ensure hassle free development.

3. On downloading the executable file just double click to install it just like you do for any other software. Follow the simple instructions on screen to complete the installation. At the end of the installation a window will open up in command prompt(CMD) if you are in windows. There will be certain options which you need to select. Let the default options be selected and just press the return/ enter key for a few times to end the installation process.

4. At the end of the installation process you will find around 7 options and x for exit. Choose X to exit or 1 to open the control panel. If you have chosen all the default options a shortcut to the control panel would also be installed in your desktop. You can also find the control panel inside the XAMPP folder in the directory/ drive in which you have installed XAMPP.

5. Once the Control Panel is opened Click on Port-Check button to check whether the ports which are necessary for Apache, MySql and other services are free or not. The ports 80, 81 and 443 are required for Apache to work properly whereas the port 3306 is required for MySql to work properly. If any of these ports are occupied by another program you gotto do the trouble shooting.

6. The common culprits which interfere with XAMPP are other web servers like IIS(Internet Information Services) Server etc or some applications like Skype. In case any other web server is interfering please go to the control panel of the particular web server and stop all the services. If Skype is interfering Select Tools Menu - Click on Options Sub Menu - Select
Advanced Tab and Connections Tab thereon. In the connection tab you will find a checkbox saying Use port 80 and 443 as alternatives for incoming connections. Uncheck this checkbox and log out of skype. Now if you check the ports again you will see they are free and you are ready to go ahead with your real time development.

7. Start the services Apache and MySql by clicking on the start buttons and you will see the text running when they start. This denotes that the services are up an running. Now you can start off your development in the htdocs folder which is inside your XAMPP directory.

In my future blogs you will also learn how to build a real website/ web application in your XAMPP folder which you can later launch in a live web server.

2 comments:

  1. Waiting for post on building our own linux from scratch.

    ReplyDelete
  2. I will definitely write a post on it Harsha. But it will be in a nutshell. To write a complete tutorial, I have to take this as a full time job and 1 article would not be enough. I have to start a new blog only for that which would contain at least 10000 articles. If I start working on it full time I will complete it in a year or two. :)

    ReplyDelete