XAMPP, XAMPP INSTALLATION

Initially XAMPP stands for X-, A-pache, M-ySQL, P-HP, P-erl. XAMPP may be installed on most of the operating systems namely, Linux, Windows, Mac OS X and Sun Solaris. In Linux XAMPP is called LAMPP but to avoid the misconception it was renamed to XAMPP for Linux. The main feature of XAMPP is its one click server deploy and the easy PHP version switch. XAMPP was initially intended as a web developer tool so it is designed to be free from all restrictions. However, there are ways to secure XAMPP if you are planning to use it in a production environment.

A number of packages are also bundled with XAMPP.
Graphics: libjpeg, libpng, GD, ncurses
Database: SQLite, gdbm, FreeTDS
PHP: Pear, ezpdf, TURCK
XML: xpat, libxml, salbotron
Generic: mod_perl, zlib, IMAP, Ming, mcrypt, gettext, freetype2

Xampp-Step by Step Installation

The installation walk-through in this tutorial only covers Windows. If you find yourself in need of further help, check out the XAMPP documentation page at http://www.apachefriends.org/en/faq-xampp.html.

If you are running Mac OS X, you may prefer to check out MAMP at http://www.mamp.info/en/index.php as an alternative to XAMPP. This application creates an AMP environment just like XAMPP, but is exclusive to the Mac OS environment. The installation and configuration may be a little different, but the end result is an http://localhost environment that you can use.

Download XAMPP

There are multiple ways to download XAMPP. There are four different packages as well as two add-ons:

  • XAMPP Basic Package
  • XAMPP Development Package
  • XAMPP Upgrade Package
  • Perl (add-on for XAMPP)
  • Tomcat (add-on for XAMPP)
  • XAMPP Lite

The packages can be downloaded in multiple ways, through:

  • Installer
  • ZIP Archive
  • Self-extracting ZIP archive

For the purposes of this tutorial, we will be downloading the Installer version of the basic XAMPP package. We do not need the development package or the Perl or Tomcat add-ons. However, if you have a slower internet connection, or if you already have XAMPP installed, you may prefer to choose the Lite or the Upgrade package.

  1. Visit http://www.apachefriends.org/en/xampp.html.
  2. On that page, there will be a link to the XAMPP version for your particular operating system. We are going to select XAMPP for Windows.
  3. Select the Installer version of XAMPP for Windows it will most likely be one of the first options on the page.
  4. Clicking the Installer link takes you to SourceForge where we can download the file. The file download should begin automatically, depending on the security features of your browser. Note - If you have Internet Explorer 7, Internet Explorer may block the site from downloading files to your computer. A warning will appear in a small bar at the top of your browser screen click on it and select Download File.
  5. Finally, we will be prompted to save the file. Save it to your Desktop or My Documents area.

Depending on the speed of your internet connection, the file may take some time to download.

Install XAMPP

Now that we have downloaded the XAMPP file, the next step is to install it.

Note - If you are running the Skype VOIP application, or if you are running IIS Server, you will need to exit them before proceeding. Apache cannot start as a service if Skype or IIS is also running though when XAMPP is not in use, you can exit XAMPP to use Skype or IIS.

  1. Double-click on the file that we downloaded in order to run it.
  2. Select the language you wish the installation process to use, and click Ok.
  3. A welcome message will display. Click Next.
  4. Next, we have to choose a place to install XAMPP. This book assumes that XAMPP is installed in c:\xampp. Choose a directory and select Next. Note that for Windows Vista, Apache Friends recommends not installing XAMPP into your c:\Program Files\ folder.
  5. In the next screen, we are prompted to install Apache and MySQL as services. Doing this will save us from having to start XAMPP every time we switch on our computer (and will allow other applications you may have, such as Skype, to run simultaneously), so check those boxes (but do leave the FileZilla box unchecked). Then click Install.
  6. XAMPP will then install. At one point, a command-line window will open; do not be alarmed this is normal! After the installation is complete, we will get a message indicating so. Click Finish.
  7. Next, we are prompted to start the XAMPP control panel, which can also be opened by selecting Start | All Programs | XAMPP | XAMPP Control Panel, or by running c:\xampp\xampp-control.exe. Select Yes.

We are now done with the installation.

Using XAMPP

The XAMPP control panel is used to control and monitor the status of services that XAMPP has installed. When the control panel is running, the following icon will be visible in your system tray:

Double-clicking on this icon will bring up the Control Panel.

Allowing .htaccess Files to Be Used

To take advantage of some features (such as removing the index.php from URLs), we need to use a .htaccess file, which requires the Apache module mod_rewrite to be enabled.

  1. First, browse to C:\xampp\apache\conf in Windows Explorer, and open the file httpd.conf in a text editor.
  2. Do a search for the phase mod_rewrite and you should find a line that reads: #LoadModule rewrite_module modules/mod_rewrite.so
  3. Remove the leading # symbol, and save the file. (This uncomments the line in question).

Your .htaccess files should now be recognized.

XAMPP in Action

With Apache and MySQL running, we are ready to go.

  1. Open up a browser and navigate to http://localhost/.
  2. If XAMPP is running, you should see a splash screen as follows. Select English.
  3. We are then brought to the main XAMPP home page.

Now that XAMPP is installed, there is one important folder to note: C:\xampp\htdocs. This is our web server root. A file placed in this folder will be accessible via our http://localhost/ domain. Right now, this folder contains all the files for the web page shown in the previous screenshot. we can remove or backup these files so that they do not conflict in anyway.

Comments

Popular Posts