Quick Apache PHP Mysql FTP install
Your development environment is important to match the sort of environment that you wish to deploy on. Often the basic infrastructure of a webdevelopment company would have this sort of simplified deployment server environments:
- Development
Development server is usually either a the workstation locally for a developer or may be a development office server that is setup with the required apache environment. It is used so that developers can independantly develop and test without affecting other developers or destroying a client review version of the project.
- Staging
Staging matches the Live infrastructure/environment as close as possible. It may be used for formal testing (often there is a testing server, but sometimes staging is used) and review by the client. It will represent the version of the project before the project is moved to the live servers.
- Live/production
These host the live project in use for its intended purpose.
Often to achieve this process, installing Apache, PHP, MySQL, PhpMyAdmin etc can be quite a hastle - especially on several different machines and environments.
That may quickly make you think how am I going to quickly get my development and staging servers up? Surely that will take weeks of configurations to achieve? Well you would be right to initially feel that way, but you shouldn’t. There are many ‘quick install’ programs out there that allow us to quickly install and configure and Apache web environment instantly.
I have used variations of xampp and it is available in many different flavours for different operating systems. It is free for use. I have xampp running easily under a Win32 and Linux environment and the process is extremely quick and easy. There are also versions for Solaris and MacOSX. It is provided as a ready to go package that provides everything you need to get your testing/development environment up.
It also is very beneficial to PHP developers as it allows a option to switch between PHP 4 and PHP 5 with a simple script that can be run. Great for testing forward/backward compatibility.
You will need to first visit the Xampp Sourceforge File Listing and choose the packages required for your Operating System.
Windows
For windows this comes in two flavours, and two installation methods. At the time of writing this, xampp windows package was upto version 1.5.1.
The distribution for Windows 98, NT, 2000 and XP. This version contains: Apache, MySQL, PHP + PEAR, Perl, mod_php, mod_perl, mod_ssl, OpenSSL, phpMyAdmin, Webalizer, Mercury Mail Transport System for Win32 and NetWare Systems v3.32, JpGraph, FileZilla FTP Server, mcrypt, eAccelerator, SQLite, and WEB-DAV + mod_auth_mysql.
Xampp Windows is provided in a Lite (basic) version with minimal package configuration and a complete version with all the packages. You can either download the package in a self extracting .exe, a ZIP archive or a .exe style installer.
Installing the packages could not be easier, either extract or use the installer to install the Xampp package onto your computer. I like to use “\server\xampp” as an install location and I try to keep it the same on every workstation.
Once Xampp is installed you will want to go to the installation directory and run the Xampp-control. This control panel allows you to easily start and stop the various installed packages, such as FTP/Apache or MySQL. You can also tick the “svc” tickbox which will install xampp to the windows service list (Control Panel -> Administrative Tools -> Services) which will set the services to start automatically when you boot windows.
Then you need to point your web browser to http://localhost/. At this point you will be able to choose your language and perform various install tests to see if everything is running smoothly.
You will need to run the security recommendations immediately and configure your webserver with a password. This is a very important step.
Linux
Linux is very easy to install. At the time of writeing this, xampp linux was also upto version 1.5.1
The distribution for Linux systems (tested for SuSE, RedHat, Mandrake and Debian) contains: Apache, MySQL, PHP & PEAR, Perl, ProFTPD, phpMyAdmin, OpenSSL, GD, Freetype2, libjpeg, libpng, gdbm, zlib, expat, Sablotron, libxml, Ming, Webalizer, pdf class, ncurses, mod_perl, FreeTDS, gettext, mcrypt, mhash, eAccelerator, SQLite and IMAP C-Client.
You will simply need to download the package to you linux /tmp directory. If you are only accessing your server with Putty, and need a way to download the file directly onto your computer from the command line, connect with SSH and perform the following:
cd /tmp
wget http://nchc.dl.sourceforge.net/sourceforge/xampp/xampp-linux-1.5.1.tar.gz
The location of where you need to download the installation can be found by selecting a mirror to download the file from in Sourceforge.
Once that you have downloaded the package, execute the following under root previledge:
tar xvfz xampp-linux-1.5.1.tar.gz -C /opt
This command extracts a GZip Tar file to the /opt location. You install will now reside under /opt/lampp
Once the package has extracted you can now start the server. If you currently have any other services (such as previous Apache/MySQL services installed, this may fail. Turn them off using the appropriate “apachectl stop” or “/etc/init.d/apache stop” commands.
/opt/lampp/lampp start
Before taking any more steps I would recommend immediately running the security option of Lampp to configure the security of the server. This is highly recommended.
/opt/lampp/lampp security
Now you can point your browser to the IP of your linux box (either localhost if you are running the apache under your local computer or the IP on the network).
If you are having problems with your linux isntallation, checkout the Linux FAQ on Apache Friends.
Mac OSX or Solaris
If you installing xampp follow the appropriate guide below:
- Max OSX install read here.
- Solaris install read here.
Security Note: They do not recommend Xampp to be run for live/production. This is to do with security and takes extra configuration to make is secure enough for a live environment.
Once you have installed these packages successfuly it is very quick and easily to replicate the install across different workstations/server environments.






[…] Quick Apache PHP Mysql FTP install […]
Pingback by apache php mysql » cnet_demo_18 — April 24, 2006 @ 4:47 am
Richard has also posted a note on installing Apache on Windows without all the other bits and pieces. You can read it online here:
http://www.melbournechapter.net/wordpress/system-administration/apache/rich/2006/07/10/setting-up-a-php-development-environment-part-1-installing-apache/
Comment by Cameron Manderson — July 10, 2006 @ 6:02 pm
Just a note on XAMPP Lite, I have noticed quirky behaviour with MySQL whereby I couldn’t get it to start in the XAMPP Panel (even with the correct ports open). I’m not sure on the source of the problem, but the full version worked without a hitch…
Comment by Richard Lee — July 10, 2006 @ 11:14 pm
Apache Friends have just released a new version of XAMPP!
Get XAMPP 1.5.4 for Windows here http://www.apachefriends.org/en/xampp-windows.html#641
Comment by Richard Lee — September 18, 2006 @ 3:38 pm