Chapter 14. Web Publishing with a DAMP System

DAMP is an acronym for Darwin, Apache, MySQL, and PHP/Perl/Python, the components necessary to create a powerful and scalable open source web-publishing platform on a Mac OS X system. It’s actually a play on the older term LAMP , where the L stands for Linux.

The idea is quite simple. The site’s content is stored in an SQL database running alongside the web server. Except for a handful of static pages that don’t need to change (such as the site’s splash page or the company’s “About us” page), every web page on the site is built on the fly through programs that output HTML based on information pulled from the database. This can be done through a sophisticated template system, simple CGI scripts, or anything in between. This chapter details the elements involved in setting up a system like this on Mac OS X.

Elements of a DAMP System

Mac OS X ships with every technology that this section mentions, short of a database server. Fortunately, MySQL, the software that puts the “M” in DAMP, is easy to obtain and install; see the next section.

Darwin

We refer specifically to Darwin in this chapter, since running a DAMP platform means running a collection of network services (see Chapter 13) and software that runs solely on the Unix layer of Mac OS X. It doesn’t use any of the application or user interface layers that make up the top half of the operating system’s architecture as depicted in Figure P-1.

Apache

Through the Apache web server’s ...

Get Mac OS X in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.