Typo

The performance of Typo under mod_rails is unimpressive. As it’s early days for this server and I don’t have the time to investigate this, I have just switched the blog to WordPress and it is now much snappier.

Installing Typo

Typo is a blogging application written in Ruby on Rails.  Here is how to install it (using MySQL as the back-end database):
Get MySQL working, make sure you have MySQL header files and client libraries.
Install mod_rails.
Install the typo gem.  Apple put MySQL headers and libraries in /usr/include/mysql and /usr/lib/mysql which is not what the typo gem [...]

Installing mod_rails in Apache2

Phusion Passenger, a.k.a. mod_rails, is a Ruby on Rails server integrated tightly with apache.  Here is what I did to get it working on Mac OS X.
 Make sure you have gcc – on my Mac OS X system, the easiest way to get this is to install XCode tools.

sudo gem install passenger

Per the install instructions [...]

Installing phpMyAdmin for MySQL Administration

Download latest phpMyAdmin.
In an appropriate website content folder (e.g. /Library/WebServer/Documents/ on Mac OS X):

tar xvf ~/phpMyAdmin-2.11.8.1-english.tar.bz2
ln -s phpMyAdmin-2.11.8.1-english phpmyadmin
cd phpmyadmin
cp config.sample.inc.php config.inc.php

Edit config.inc.php and set your blowfish secret to a random string:

$cfg[’blowfish_secret’] = ‘ertyrtfghrty’;

On Mac OS X Leopard, there appears to be an issue with PHP that you have to resolve by changing localhost to [...]

Getting PHP working in Apache2 on Mac OS X Server

In OS X Leopard, out of the box (at least on the System I got access to) Apache2 is missing an AddHandler statement for PHP, so PHP won’t work if you just enable the module.  Here is how to fix that through Server Admin:
Check -> Web -> Settings -> Modules, php5_module is enabled.
In Settings -> [...]

Getting MySQL working on Mac OS X Server

The version of MySQL that comes preintsalled on MacOS X (Leopard) Server does not include client libraries and header files, as discussed here.  The remedy as discussed here is to:
Download MySQL-43.binaries.tar.gz
Stop MySQL Server if it was running (Server Admin -> MySQL -> Stop MySQL)

tar xvfz MySQL-43.binaries.tar.gz
cd MySQL-43.binaries
sudo tar -xzvf MySQL-43.root.tar.gz -C /

To configure and start MySQL:
Using Server Admin
Servername -> Services -> [...]