HomeBrainDump Installing a Joomla! Test Environment in W...
Installing a Joomla! Test Environment in Windows
Joomla! is quickly becoming the most popular open source content management system available. As its popularity grows, more and more institutions are building sites designed around its framework. I’m going to show you how to create a Joomla! environment in Windows for development and testing purposes.
Joomla! is a PHP based content management system designed to run on Apache web server. While you certainly could install Apache, PHP, MySQL, and Joomla! separately, there is a much easier way.
It’s called JSAS, or Joomla! Stand Alone Server. The successor of MSAS (Mambo Stand Alone Server) installs all of the necessary components to quickly give you a turn-key, ready-to-use Joomla! installation.
Once you’ve downloaded the installer, you can double click it and install it with all of the default options. You’ll notice that it installs your web root to a directory under Program Files. Don’t worry about that.
I know, I know. You want to customize it. You like to have a dedicated drive letter for your installation for security reasons. It’s cool. I understand completely—and so do the folks over at Joomlasolutions apparently! The installer does this automatically for you.
You’ll notice another cool thing about the JSAS’s Apache installation too. Instead of having Windows style paths like a normal Apache for Windows installation, JSAS creates a Linux style directory tree instead. Nice!
Double click the downloaded binary to start the standard Windows installation. Press next and then choose to accept the license agreement. Continue pressing next to use all of the default settings.
After you have installed the JSAS package, you will find a JSAS shortcut on your desktop. This will open the JSAS Control Panel where you can control your Joomla! installation and sites very easily. The first time you attempt to launch this you will be presented with the message below.
After pressing the OK button, all of the Joomla! files are extracted in your web root. You will now need to do a bit of basic configuring to your new installation.
You will be asked to choose a drive letter for JSAS to use. This driver letter will be used to map a virtual drive to your “server” root. The default is W. Unless that drive letter is in use there is no real need to change it.
Once the drive letter is assigned, JSAS will need to restart to make the changes. Click the OK button on the dialog box. JSAS will exit and then restart itself for you. This time the control panel will open.
The second time the JSAS control panel is opened, it launches the Apache and MySQL servers. If you have Service Pack installed on Windows XP, you may be presented with the dialogs below. Alternatively, your own firewall program may prompt you with something similar.
Regardless of what firewall solution you are using, make sure that you choose to unblock or allow access to these programs. They require the use of certain TCP/IP ports in order to function properly.
The installation is now complete. Your site is live at http://localhost:85/. You can load this page in a browser to see the default Joomla! installation. Let’s go ahead and finish configuring the site.
Click the Admin button in the JSAS control panel to open the administration options. Now click the “open Joomla! admin” button at the top. This will open Joomla!’s administrative backend in your browser.
The default login name and password are both set to admin. Your first order of business should be to change that password. This can be done from the User Manager.
You will most likely see an error warning you about Register Globals being enabled. You should change this setting to match that of your live site.
It’s a good security practice to always have Register Globals disabled. If it is not, talk to your site administrator.
If you are installing this as a development and testing environment, I’m going to assume you are already familiar with how Joomla! works. For those who aren’t, more specific information can be found by clicking the Global Configuration button.
I prefer to have a test environment that more closely resembles my live environment. For instance, I would not be installing Joomla! in a sub-directory. I would install it in my web site’s root. Let’s take a look at how to change that.
First off copy the entire directory tree from W:wwwJoomla to W:www. This will move all of the site contents up one directory. Now we need to make some changes to the JSAS configuration to reflect the new location.
At the root of your JSAS installation you will find a file called configuration.php. (Now W:wwwconfiguration.php) Open this file in any plain text editor such as Notepad. Next, find the line that defines your Absolute Path:
$mosConfig_absolute_path = 'w:/www/joomla';
Now change it to reflect the new path.
$mosConfig_absolute_path = 'w:/www';
Down a bit further you’ll find the setting for Joomla!’s cache folder. Make the same change. You may find it easier to just search and replace. This line should now look like this:
$mosConfig_cachepath = 'w:/www/cache';
Save configuration.php and close it. You should now be able to see your live site at http://localhost:85.
Your choice of incoming TCP port is irrelevant if you are behind a NAT firewall or router. You can configure the device’s port forwarding feature to send all requests it receives on port 80 to whatever port you choose on your server.
I also like to have my web server configured on Port 80. This is especially true if it is being used for public broadcasting. This is a change that has to be made to in the Apache web server configuration.
Grab Notepad again and open W:usrlocalApache2confhttpd.conf. This is Apache’s configuration file. Find the line that says:
Listen 85
and change it to:
Listen 80
Now save and close the file. You’ll need to stop and restart the Apache server in order for the changes to take effect. You base site is now just http://localhost.
You should now have a base Joomla! installation that very closely resembles your live site. If you intend to run this as a live installation, you should take the time to read both the Apache and Joomla! documentation about securing your web server. You can start securing your Joomla! installation by checking out the link below.