Mac OS X Server - Installing GD Library

I just finished setting up a new Xserve to be used as a corporate web server. The new Xserve is going to be running a Content Management System written in PHP with a MySQL backend.

Since the CMS is going to be used to upload web graphics for use on the site, the GD Library was necessary to support thumbnail generation and other types of image manipulation. Out of the box, Mac OS X Server has pretty much everything needed to run a full fledge corporate site, except the GD library.

The two main approaches to installing the GD library are to do a manual installation or to rely on an installer to do the work for you.

Using an installer is the easy route but there are a few major drawbacks. Most of the installers will install its own Apache and PHP. This of course is not necessary since Apple has bundled these two with the OS. Installing duplicate libraries and eating up server space is a big no-no. This also potentionaly creates a complex server environment with security risks. Also, installing duplicate libraries are most likely not going to be supported by the built-in tools Apple has provided.

Apple has done an amazing job of providing Admin tools allowing you to control the web server, FTP server, etc. This is one of the reasons that makes OS X Server such a great server platform. There is no sense in crippling these tools.

So, this leaves us with doing a manual installation. It’s actually a pretty straightforward process if you’re familiar with the Terminal/CLI.

When researching ways to include the GD library, I found two great PDFs that give step-by-step instructions on how to install the GD Library.

  • The first step is to install the necessary modules along with the GD library.
  • The second step is to update the PHP install included with OS X server.

These steps have been tested on Mac OS X Server 10.4.9 and everything worked perfectly. I haven’t tested this on a regular OS X client. If you test it, let me know what your results are.


Download the PDF - Installing GD Library
Download the PDF - Updating PHP

GD Logo
You must be logged in to post a comment.