To build with package managers, with pre-compiled binaries, or from source... that is the question

Filed under

I remember how excited I was when Mac OS X was initially released. Finally I had real development tools available on my platform of choice. I could run a web server with middleware to develop database-driven web sites on my laptop. The only problem was that although having Unix file management skills, at the time, I had absolutley no experience compiling the required Unix software from source.

Fortunately, shortly after the release of OS X 10.0 that folks like Marc Liyanage began to provide pre-compiled PHP, Apache, and MySQL packages. Some of these packages came with easy-to-use installers. I was off and running, but it wasn't long before a project required an extension that wasn't supported by the pre-compiled software I had installed. Eventually, missing extensions and delayed updates prompted me to take control and learn how to compile from source.

The first thing to know about compiling from source is that managing dependencies is a pain in the arse. A lot of trial and error and documentation review is required to add support for desired features. But as is true of most things, the more you do it, the easier it gets. The extra time spent provides complete control over the installation and enabling just those features needed can increase server security.

Thankfully, Fink and MacPorts have taken most of the hassle out of managing dependencies. For most of my needs, I am more than happy to let someone else work out dependency and platform issues. The only problem with these package managers is that they don't offer all packages and certain package versions.

So, for your consideration, here's a table comparing the options:

  Compile from source Pre-compiled Package manager
Ease of installation Difficult Easy Easy
Configuration control High None Medium to High
Availability of updates Immediate Depends Depends
Dependency management Difficult Easy Easy

Of course these are generalizations. A lot depends on the package manager and package in question. More popular packages tend to be updated more quickly than others. I recommend reviewing available packages, documentation, and mail list archives for information about those packages you need.

I hope this helps someone out there decide how they'll build a development or production web server. Sysadmins, feel free to chime in.

Share