With most web development server stacks, the choice is simple. Just use the defacto standard Apache HTTP server, PHP programming language, and MySql database.
Oh sure some of you reading this will disagree and start talking about your preferred development language like Ruby, Java, ASP.NET, and Python. Then there are some of you that would rather use Microsoft SQL Server, SQL Lite, PostGRE SQL, Oracle, or IBM DB2 on the backend.
Thats all fine.
But this article is about a portable web development stack framework packaged all nice and neat for you called XAMPP.
XAMPP is a good solution for putting on USB flash drive sticks so you can tote them around in your pocket to any Linux, Windows, or Mac OSX computer. That’s the nice part of it. XAMPP is portable.
What I’m going to describe here is a USB Flash Drive install.
You can get XAMPP at Apache Friends download. There are many different versions available but for this discussion, I am using the Windows 32-bit version 5.6.23.
After you download, run the installation program. The first screen that comes up looks like this:
To keep the files stored on the USB flash drive as small as possible, only select the components you need. In my case, Apache, MySql, PHP, phpMyAdmin, and the Fake Sendmail applications.
The Installation folder you install into should be the drive letter and folder name of the target location. Here you can choose to store it on your local desktop hard drive or in another external storage device like a USB flash drive. Here, I have chosen I:\xampp to be this flash drive location.
One of the nice things about XAMPP is that it comes with Bitnami application support. Although I won’t cover installing any of these, its nice to know that you can fire up the installer at any time to add them to your system.
- Tiki Wiki CMS
- many others!
Installing XAMPP on a USB stick will take a while (around 15 minutes).
XAMPP takes up around 500MB of disk storage space. Memory wise, around 70MB of RAM. Of course, the more modules you add, the higher the requirements.
For a 32GB USB flash drive and 4GB Windows system, this is more than sufficient to do web development and hosting of your applications.
The xampp folder layout looks like this:
/ /xampp /apache /cgi-bin /contrib /htdocs /install /licenses /locale /mysql /php /phpmyadmin /sendmail /tmp /webdav
Under the root directory are many batch files and applications to start and stop XAMPP as well as the control panel which we’ll look at next.
The XAMPP Control Panel
Go to your flash drive and look for the program xampp-control. Run it and this should come up:
This is where you start, stop, configure, and administrate the modules you installed. There are other buttons available to quickly launch the DOS console, view with Windows Explorer the XAMPP folder, and configure other features.
If you click on the admin button for MySQL, your default browser will be launched and phpMyAdmin will appear. phpMyAdmin is a great web administration tool for working with you MySQL database.
If you click on the Netstat button, you will be presented with a very handy list of all the TCP sockets, the ports, and the associated applications.
The Services button will launch the Microsoft Services application which will allow you to see all the installed Services and control their running status.
Speed up localhost
If you are running XAMPP on a flash USB stick, you may find that it is slow. To speed things up, change the HTTP port that Apache is set to default. Go into the httpd.conf file with your text editor and change the Listen to port 8080:
Then, whenever you need to access your XAMPP stack, surf with this:
Everything should be much faster now.
XAMPP is a very useful distribution that can help reduce the time and effort to find and install all the components to make a portable web stack. With its convenient control panel, you can quickly start and stop modules, configure, and administrate with the click of your mouse.