Category Archives: Mac OS X

Mac Mini 2007 with OS X Server

Man alive! Against all expectations I’ve managed to upgrade my 6 year old Mac Mini (mid 2007 aka Macmini 2,1) to Mac OS X 10.7.5 Lion Server.

Memory
Upgraded memory from 1GB to 4GB as the minimum for Lion is 2GB. Apparently the max for my Mac Mini is 2GB or 3GB depending on what out-of-date website you believe.

Lion Server
Signed up to Mac Developer Program for £60 to get access to downloads of Mac OS X, Server add on, etc. My Mac Mini’s architecture doesn’t support Mac OS X 10.8 Mountain Lion. Although Lion is available from Apple (for about £20 I think) but not via the online store. Upgraded from Mac OS X 10.6.8 Snow Leopard  to 10.7.5 Lion with the Server add on.

Fan
Waited for Spotlight to stop indexing. Wondered why the fan on the Mac Mini was going mental even after Spotlight had finished doing its stuff. Realised that I hadn’t reconnected the fan after the memory upgrade. Attached the fan cable.

Server vs iCloud
Decided not to bother using the Server functionality to share calendars, contacts, etc but to go for the convenience of iCloud instead.

And finally … bish, bash, bosh I have a Mac OS X Server ready for testing and other stuff like iTunes streaming via TwonkyServer which works well on DLNA devices.

In the end it wasn’t too painful and I feel as though I’ve saved myself about £800 on the cost of a new Mac Mini with OS X Server.

Advertisement

Development Environment

The development environment is based on Mac OS XEclipse 4.2 (Juno) for Java development and Google Chrome with the JSONView plugin for JavaScript debugging.

One of the challenges was to replicate the technical architecture of the production environment in the development environment. Installing Apache HTTP Server, Apache Tomcat and MySQL was a skoosh but mod_jk on OS X was a different issue. In fact I had problems with the subversion plugin for Eclipse 4.2 and upgrading from Eclipse 3.6 to 4.2.

mod_jk
No easy download and install for mod_jk on Mac OS X, oh no you have to get the source code and build it your self. After downloading the mod_jk source …

cd tomcat-connectors-1.2.37-src
./configure --with-apxs=/usr/sbin/apxs
cd native/
./configure --with-apxs=/usr/sbin/apxs
CFLAGS='-arch i386 -arch x86_64' APXSLDFLAGS=' -arch i386 -arch x86_64' ./configure --with-apxs=/usr/sbin/apxs
sudo make install

And bish, bash, bosh I had a /usr/libexec/apache2/mod_jk.so

Eclipse 3.6 to 4.2 upgrade
Upgrading from Eclipse 3.6 to 4.2 didn’t work, but I put that down to the Flex plug-in. I gave up on that upgrade and installed a new 4.2 version and backed out the upgrade on 3.6 with the wonders of Time Machine. I need the 3.6 version to support the Flex apps I’ve built with Eclipse 3.6. I have an elephants graveyard eclipse versions on my machine.

Unfortunately the 4.2 Juno release initially ran like a dog. It would take several seconds to just open a file, I’m not the only one to experience this problem. Increasing the memory allocation in the eclipse.ini file soon sorted this problem though…

-Xms1024m
-Xmx2048m
-Xss2m

Subversion plugin
Using the subversion plugin from  Eclipse 4.2 on Mac OS X also needed a bit of work, this time having to install subversion and a load of other Darwin port stuff. The magic that worked for me was…

sudo port install subversion-javahlbindings +no_bdb +universal
sudo port -f activate subversion-javahlbindings

Flex on a Mac & GCGetGlyphDeviceMetrics

For a while I’d been wondering what the GCGetGlyphDeviceMetrics failed error  meant when I was compiling my Flex app using ant on a Mac. Well it seems to be the way I was using embedded fonts!

The following caused this seemingly benign error message…

@font-face {
 src: local("Verdana");
 fontFamily: myVerdanaFont;
}

But the following,  more portable method,  won’t…

@font-face {
 src: url("/../assets/fonts/Verdana.ttf");
 fontFamily: myVerdanaFont;
}

I hope that helps someone.

Leopard ate my wireless…

After upgrading to Mac OS X 10.5 (Leopard) my wireless connections started slowly dying on a regular basis. The fix turned out to be an upgrade to Mac OS X 10.5.2.