|
|
Installing the Eddy Framework with XAMPP |
|
|
|
|
Written by Jon Herron
|
XAMPP, a product from Apache Friends, is a preconfigured Apache/PHP/Perl/MySQL distribution that runs on both Linux and Windows. XAMPP is a great way to get a development environment up and running in virtually no time flat. This tutorial will walk you through the steps required to get XAMPP up and running on Windows, installing MOD PERL, extracting the Eddy Framework and running the TechNews example site.
Please note, the Eddy Framework should work out of the box with XAMPP on Linux - but due to lack of a Linux box to test, this tutorial will be limited to the Windows version of XAMPP.
More information on XAMPP can be found at: http://www.apachefriends.org/en/xampp.html
Downloading XAMPP for Windows
Download the Windows version of XAMPP from: http://www.apachefriends.org/en/xampp-windows.html
Make sure you do not download XAMPP Lite, since you can not use addons (MOD PERL) with that version of the distrobution. Personally I use the ZIP version without the installer, so that will be assumed in this tutorial. Downloading XAMPP will take you to their SourceForge page. Please note that if you have a pop up blocker you may need to explicitly allow the download. The ZIP file took about 2 minutes to download on my connection.
Installing XAMPP for Windows
Once the download has completed, extract the ZIP file into the location you wish to run XAMPP from. Personally I chose to install onto one of my USB thumb drives (which is a huge advantage IMHO), which was the I: drive on my machine. Doing so allows me to take my XAMPP development environment with me anywhere I go. The only noted downside is the need to change shebang lines if the thumb drive registers as a different drive name on another machine. But such is life. The unzipping process took me roughly 10 minutes.
Once unzipped, a xampp folder will be created, which contains everything that is XAMPP. Inside that folder is a batch file called setup_xampp.bat. Run this batch file so that all file paths in the various configuration files will reflect the current location of XAMPP.
Installing the Perl Addon for XAMPP
Download the Perl Addon for XAMPP from: http://www.apachefriends.org/en/xampp-windows.html#644
Download the Perl Addon for XAMPP. Once again I prefer to use the ZIP file, so this tutorial will assume its use. Just like with XAMPP itself, the link will open a new window taking you to their SourceForge site. If you have a pop up blocker, you may need to explicitly allow the download. Downloading the Perl Addon took about 1 minute on my connection.
After you have downloaded the Perl Addon, simply extract it into the main xampp folder that was creating during the unzipping of XAMPP. Say Yes to All when you are prompted with a duplicate file found during the unzipping of the Perl Addon. Much like the initial unzipping during the XAMPP install, the Perl Addon took about 10 minutes to extract from my hard drive to thumb drive. Once the installation is complete, rerun the setup_xampp.bat batch file from the XAMPP installation step. This time the batch file takes considerably longer to run, but bear with it as it configures XAMPP with the newly installed Perl Addon.
Change Apache Port from 80 to Avoid Conflicts
If you do not have anything else running on port 80 this step is optional, but on my computer I also have IIS running which locks onto port 80 and will prevent Apache from starting properly. To do this open the httpd.conf file located in xampp\apache\conf, and look for two lines. The first, on line 53 of my httpd.conf file says Listen 80. Change this to the desired port, I chose 8888, so my line 53 now reads Listen 8888. The second, on line 169 of my httpd.conf file reads ServerName localhost:80. Change this to the same port that was used for the previous step. In my config file, line 169 now reads ServerName localhost:8888.
Once you have updated the httpd.conf file, you will need to update the httpd-ssl.conf file as well. This file tells Apache what port to listen on for SSL connections. It uses the default port of 443, which is also what IIS will lock onto, preventing Apache from starting properly. In httpd-ssl.conf, which is located inside the xampp\apache\conf\extra folder, there are three references to port 443, all of which you will need to change to a port of your choosing. This port needs to be different from the port selected for the previous step. In my httpd-ssl.conf file I used port 8889, and had to change lines 37, 74 and 78.
Starting Apache for the First Time
Inside the xampp folder there is an application called xampp-control, run the application to bring up the control panel. Right beside the Apache label is a start button, click that and if all goes well a green label will appear to let you know Apache is running. Bring up your web browser of choice, and navigate to http://localhost:8888 (or which ever port number you chose), and after a moment while Apache warms up, you should see the default XAMPP page. Once you see this page, click on your desired language and select Perl from the left orange menu. Click on the various Perl example links to make sure the Perl Addon was properly installed. After you have verified XAMPP and the Perl Addon are properly installed, its time to move onto downloading and installing the Eddy Framework.
Download and Install the Eddy Framework
Inside the xampp folder is a folder called htdocs, which is the current web root for Apache. Inside the htdocs folder, create a sub folder called eddy_tutorial.
Navigate to the Eddy Framework page on LeftTurnSolutions.com - http://www.leftturnsolutions.com/products/eddy/default.cgi.
Click on the link in the left hand menu for the latest version of the Eddy Framework for Windows. At the time of writing this was version 0.2, however a new version may be available at the time of reading.
Once the zip of the Eddy Framework has been downloaded, unzip it into the eddy_tutorial folder that was just created. The extraction should take about a minute to complete. Once unzipped, an eddy folder will be created that holds the framework code, as well as a child folder called public where your web site will reside. In order to do this, we will need to modify httpd.conf once again to point to the eddy\public folder.
Update httpd.conf (Again)
Return to the xampp-control application and stop Apache from running. This is required since Apache only reads the httpd.conf at start up, for performance reasons. Once Apache has been stopped, open up the httpd.conf file, located in xampp\apache\conf. Two lines need to be modified, the first is the DocumentRoot, located on line 176 in my httpd.conf file. Change the value in quotes to be the full folder path to eddy_tutorial\eddy\public that you just installed. On my machine for example the new value is I:\windows\xampp_tutorial\xampp\htdocs\eddy_tutorial\eddy\public. The second is the Directory tag located on line 203 of my httpd.conf file. Once again change the value in quotes to point to the eddy_tutorial\eddy\public full folder path.
Once those two changes have been made, close the httpd.conf file and once again return to the xampp-control application. Start up Apache again and use your browser of choice to point to http://localhost:8888 (or the port you chose).
Running the TechNews Example Site
After Apache warms up again and reads in the new values from httpd.conf, you should be presented with a directory browsing of the eddy/public folder. Click on the technews folder, and then the technews.cgi file. If everything went well you should be presented with the latest technology headlines from PC Magazine, BBC News, HowStuffWorks and MajorGeeks.com.
Conclusion
That should be it. XAMPP and the Eddy Framework should now be completely installed, with (hopefully) no hassle on your Windows machine. Future tutorials will focus on developing sites with the Eddy Framework, but if you are anxious and adventurous, please feel free to poke around the TechNews example site and the code base. Happy Hacking. |
|
Last Updated ( Tuesday, 08 May 2007 )
|
|