Installation of Joomla! is not necessarily straightforward. I have run into more issues and error messages in my struggles than I care to dwell on here. But when I finally settled on a way to conduct the symphony, I decided to write it down for later reference. Please note that the following is what works for me on localhost in Mac OS X. If you want details on how to turn your client side Macintosh into a personal webserver, refer to the articles published under Apache on the Macintosh in the Laboratory ramblings of Ka of Isis. As of this writing, Joomla! 1.6 had just hit the streets but I still opted for the final stable version of 1.5.x as I did not want to end up a post-beta tester for the Joomla! community.
- On your local server, prepare Apache and its host files for a new site and create a new folder to act as
root for your Joomla! site. Name it accordingly. For the purpose of this demonstration I called mine Joomla 1 and will continue to use that name below. - Download the full Joomla! 1.5.22 stable ZIP package from www.joomla.org
Mac OS X should automatically unzip the package, revealing a hefty 15+ MB archive of hundreds, nay, thousands of files and folders. Shudder. Shudder.
- Copy (or move) the contents of the package (not the folder itself) to
Joomla 1. - With your preferred FTP client, check that proper read/write permissions are established for
Joomla 1. Its octal should be 755. If not, change the mode (aka CHMOD) from its default octal 700 to 755.
Fig. 1. CHMOD for local root folder. Left: Default. Right: For Joomla!. If you use the Transmit FTP app, remember to click <Apply> before you close the info window.
- Shut down MySQL.
- Shut down Apache.
- Restart Apache.
- Restart MySQL.
- Enter
http://localhost/ (or simply: localhost) in your browser’s address field to check that Apache is running. - Log in to MySQL to check that it is running, too.
- Log out of MySQL.
- In your browser, set cookies to be accepted always. This seems to be a prerequisite for a Joomla!-installation. You may, in fact, receive an error message stating:
You will not be able to install the application with this feature disabled. If you are wary of any implications this can have, you may get away with a temporary solution where you allow all cookies for the period of installation and then go back to your preferred setting post installation. I have not tried this myself, however.In Safari, choose Safari > Preferences… > Security > “Accept cookies: Always”
- The complete error message sited above reads as follows:
Cookies do not appear to be enabled on your browser client. You will not be able to install the application with this feature disabled. Alternatively, there could also be a problem with the server’s session.save_path. If this is the case, please consult your hosting provider if you don't know how to check or fix this yourself.
As installation details for Apache and PHP may differ from machine to machine (and, remember, you are working on a local site, not a site set up by a webhotel host), it is impossible to give exact advise on how to deal with session.save_path settings. You may, of course, go ahead with the Joomla!-installation and hope for the best – and I have added support for error scenarios further down should you do so. I do, however, recommend an analysis of, and a possible modification to, the php.ini file which can be found here in Mac OS X 10.5.5:
/private/etc/php.ini
Open php.ini and search for “session.save_path” (without the quotes). Most probably it will be commented out as follows:
;session.save_path = "/tmp"
Read all the comments related to this, and if you find no objections to them (such as other Apache installations using custom paths), uncomment the line to read:
session.save_path = "/tmp"
Or better still, something like:
session.save_path = "/tmp/zz_bjorn_777"
This way I, at least, will understand what is going on if I come back to the file a few weeks, months or years(?) from now. Visually, the new folder will (alphabetically) drop to the bottom of the folder view in list mode, I will know that ‘bjorn’ has tampered with the original php.ini file and that the folder was given CHMOD 777. A side effect, as mentioned in a Session save path article on Joomla!’s documentation site, is that only the new folder is made writable.
Note: Do not forget to create that folder and CHMOD it! The article decribes how to do this via Terminal, but I find it more convenient to use my FTP client.
Important: What is far from clear in all this, is whether the session save path is at all necessary when the installation process is complete. In fact, every Joomla!-installation creates its own tmp (temporary) folder in root, a path which can be modified in the configuration file. I have, in Mac OS X 10.5.8 on a Macintosh Intel model, experienced problems with log in to MySQL via phpMyAdmin when the session save path was set to /tmp. My recommendation (fragile as it may seem) is to open the path for only as long as the installation is carried out, and then comment out the line post installation. I have more than one Joomla! site in operation even with the session save path deactivated.
Even more important: This article focuses on installations on local machines. Do not use 777 on a live server. Nicholas K. Dionysopoulos covers the details in his article 777: The number of the beast. The title says it all and I nearly forgot to mention it. Blimey!
- Save the file.
- Point your browser to the Joomla!-installation by entering the virtual host short name (in my case:
joomla1) in the address field.The language step of a 7-step installation guide should open and the browser address should read http://joomla1/installation/index.php or similar.
- Select language. I opt for
en-GB - English (United Kingdom). - Choose <Next>.
At this point, the installer may complain that configuration.php is not writable. No wonder, the installer has not even created one! Ignore the message and carry on by hitting <Next> one more time.
- Accept the license and choose <Next>.
- Enter connection parameters for your MySQL database. The only thing new for the basic settings is your choice of database name.
Do observe that there is an accordion choice for advanced settings. I chose to delete existing tables (even though there are no Joomla! tables in the database yet) and entered a table prefix of jos1_ (security wise, I might have chosen something less obvious for a live server).
Tip: If localhost does not cut it for host name, try 127.0.0.1
- Choose <Next>.
If you get the following error: Cookies do not appear to be enabled on your browser client…, you may have skipped the early step where cookie allowance should have been set. Hit <Previous>, set cookies to be accepted always, and start over.
If you still receive the error message, try even one more time for the hell of it (believe me, it has worked for me). If you still-still hit the wall, you may have to tinker with PHP-settings as outlined above.
- Step 5, the FTP configuration, I have never used. If you were able to get this far even with error messages, this option may be useful for your system. Otherwise, continue with <Next>.
- Main configuration asks for a site name, an e-mail address and an administrator password. Your choice.
Note: Joomla! offers a default username, admin. This is used, together with the password entered above, to log in to the Joomla! control panel. Both username and password can be changed later.
Important: If you wish to perform a clean installation, do not click on the <Install Sample Data> button. If, however, you want to install sample data (as recommended for beginners), do click on the button.
- Choose <Next>.
- You may have gotten away with the following error message earlier, but it may rear its ugly head once more if you made no change to
php.ini:Cookies do not appear to be enabled on your browser client. You will not be able to install the application with this feature disabled. Alternatively, there could also be a problem with the server's session.save_path. If this is the case, please consult your hosting provider if you don't know how to check or fix this yourself.
Please modify php.ini as described above, save the file, return to the Joomla! installation script, hit <Previous> and start all over (yes, you will have to start all over).
Note: It should not be necessary to restart Apache.
- When you reach the final stage of the installer, “Step 7: Finish”, you will be hard pressed to miss the message urging you to completely remove the installation directory. So, open the
Joomla 1 folder and trash the folder named installation. - Important: If you ran an installation that was not able to create a configuration file up front, read this note presented in Step 7 and follow its instructions:
“Your configuration file or directory is not writable or there was a problem creating the configuration file. You will have to upload the following code by hand. Click in the text area to highlight all of the code and then paste into a new text file. Name this file configuration.php and upload it to your site root folder.”
Tip: Take the time to read the configuration document. Many of the variables are self-explanatory and even if you will be able to change them later in the control panel, why not tweak a few of them now? For instance, if you run a non-English site and need to shut it down for maintenance, why not serve your users a message like “This site is down for maintenance. Please check back again soon.” in the proper language? Or the value for the $MetaDesc variable? Spend a few seconds on that one. Then, if you forget to give a new page a search optimized meta description, you can ask Google et al. to use a generic description more in line with your site’s content. And, for what it’s worth, it is not a dead giveaway that you use the Joomla! CMS. At the very least, remove the “joomla, Joomla” between the single quotes in the $MetaKeys variable. Google does not rely on keywords, anyway.
- Open your FTP program and CHMOD
configuration.php 755 for good measure. - Back on the Step 7 page, choose <Admin> in the upper right hand corner to log in to the Joomla! control panel.
If you are unable to log in, something went wrong and you may have to start all over.
- Open a new tab or window in your broswer. Point the browser to your site by entering your alternative to
http://joomla1/ or simply: joomla1Depending on whether you opted to install sample content, you will be presented with either a bare bones installation with the Joomla! logo and a skelton menu, or a more elaborate layout with miscellaneous content. If you get neither, something went wrong and you may have to start all over.
Been there, done that.
Reminder: Comment out the line with the Session save path-setting in php.ini.