Given that I run this site on Geeklog, and have been doing so for nearly two years, I figured it was time to publish a hint explaining how to install it on Mac OS X. The newest release of Geeklog (1.36) has some great features, and it will (soon) be making an appearance here. Here's how to get it running on your local OS X box.
The following hint assumes that you've already got both MySQL (configured with a user and password) and PHP running on your machine (visit Marc Liyanage's site if you don't; he's got the easiest instructions and packages that I've found anywhere). Although the Geeklog installation instructions explain all of the following steps, they can be more than a little confusing due to the folder structure of the Geeklog distribution.
This hint also assumes that you want to serve the Geeklog database out of the /Library -> WebServer -> Documents folder, and that you don't currently have another site running from that same directory (the install gets a bit more complicated if you have to use sub-folders). If you have an existing web site installed in that directory, you may overwrite some of its files during this installation (if they have the same name) -- consider yourself warned! Finally, it assumes you haven't done any fancy remapping of your localhost domain as it relies on "127.0.0.1" as the local IP address.
After downloading the source (geeklog-1.3.6.tar.gz), expand the .tgz file. Once exapnded, open the new Geeklog folder, and open another Finder window pointing to /Library/WebServer/Documents.
In the Geeklog folder, open the public_html folder and select all the files and drag them into the Documents folder. Now select everything at the top level of the Geeklog folder except for the public_html folder, and drag it to the /Library/WebServer folder.
Now you need to open the Terminal to issue a couple of commands. Launch MySQL by typing mysql at the prompt and then type create database geeklog; and hit Enter. This will create the initial blank database; you can name it whatever you like, but you'll need to remember the database name a bit later. Type exit to quit MySQL and return to the command line.
Before proceeding, you need to set some file permissions, so type these commands:
% cd /Library/WebServerThe next step is to edit the config.php file in the /Library/WebServer folder (where you're Terminal should currently be sitting). You can use a GUI text editor for this, but make certain that it does not use Mac line breaks. BBEdit Lite or jEdit are good options; it may be easier to just edit it in the Terminal.
% chmod -R 775 logs/
% chmod -R 775 Documents/backend/
% chmod -R 775 Documents/images/articles
% chmod -R 775 Documents/images/userphotos
$_DB_name = 'geeklog';A little farther down the file you will come to the path definitions section. This is where 99% of Geeklog installations go bad, so read the following lines carefully. The first two path lines should look like this after you've edited them:
$_DB_user = 'mysql_username';
$_DB_pass = 'db_password';
$_CONF['path'] = '/Library/WebServer/';A bit further down is the last path line, which needs to look like this:
$_CONF['path_html'] = $_CONF['path'] . '/Documents/';
$_CONF['site_url'] = 'http://127.0.0.1';You can also change your site slogan, email, etc., if you wish at this point. Save your changes and quit the editor. Type cd Documents to move into the actual HTML files, and then and open lib-common.php in your favorite UNIX text editor. Look for this line:
require_once( '/path/to/geeklog/config.php' );Change it to read:
require_once( '/Library/WebServer/config.php' );Save your changes and quit the editor.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20021007020510428