Installation Overview

Per the Midgard Installation documentation, you will need to download midgard- lib-1.4, midgard-data-1.4, mod_midgard-1.4 and midgard-php-1.4. You can obtain the Midgard sources at the following location:

http://www.midgard-project.org/download/

You will also need Apache 1.3.x running with mod_so (Dynamic Shared Object) support compiled in. You can test for the presence of mod_so by running the following command, which in the case of the test server is:

# /usr/local/apache/bin/httpd -l

If mod_so.c is not listed as one of the compiled-in modules then you will have to recompile Apache with mod_so. If you already have Apache running with this option then you will not need to do any more recompiling at all. (This might be version dependent. Best use the latest version available, currently 1.3.14)

If you are using MySQL 3.22.21 or older then you will have to upgrade to the very latest version or at the very least use version 3.22.32 instead. There are problems with using the older versions of MySQL.

Once Apache and MySQL are running, you will then proceed to install the Midgard Libraries (midgard-lib). This installation is required as the Midgard Apache Module (mod_midgard) and the Midgard PHP Apache Module midgard-php) will need these libraries for compilation.

The next step will be to install the Midgard Database (midgard-data). This is a database containing user, host, content, style, site and other tables required to run Midgard.

After installing the Midgard Database comes the installation of the Midgard Apache Module (mod_midgard). This is a shared object of Apache. What it actually does is intercept requests to Apache. Domain names from those requests are looked up in the Midgard Database (previously installed). If the domain is registered within the Midgard Database and is marked within that Database as being on-line then Midgard pages will be parsed by the PHP module and then served. The Midgard Apache Module requires the installation of Midgard Libraries, and will also need to know the location of apxs when configuring.

You will need Midgard-PHP which is the ready-patched PHP sources (currently version 3.0.18) from the Midgard Project Site. PHP should run as a module of Apache and not as a CGI for Midgard to work. Also note that for this guide it should be running as a dynamic shared object of Apache and NOT a static version. This means configuring using apxs or with-shared-apache options. This document doesn't yet cover compiling statically linked components. Otherwise, compiling will end up in a dismal failure. You will also need to configure using system regex rather than with the bundled regex.

Midgard-php requires the installation of Midgard Libraries. You should follow the instructions given in INSTALL.DSO to configure and compile this component. Although it does not mention in the INSTALL.DSO document but you will need to add --with-midgard=/path/to/midgard/libs on when you run the configure script. On my test server, the option is --with-midgard=/usr/local/midgard , as the Midgard Libraries are installed in /usr/local/midgard/lib and header files in /usr/local/midgard/include.