Building and Configuring on Linux

This document is intended to give step-by-step build and install instructions for a default PHP installation of MapGuide Open Source on Linux. For more detailed instructions, other configurations, or resolutions to build problems please see

All of the operations below are done in the root account.

Prerequisite Software

GNU Compiler Collection

For RedHat Enterprise Linux 4 you need GCC 3.4.6 and for Fedora Core 6 you need GCC 4.1.1. To check what version you have type gcc --version at the command line. You can get GCC at


Libjpeg will need to be installed if it is not already. To see if it is installed, check to see if the /usr/include or /usr/local/include directories contain jconfig.h, jerror.h, jmorecfg.h and jpeglib.h. To install libjpeg, download jpegsrc.v6b.tar.gz from Then in a shell window execute the following commands in the directory where you downloaded the file:

  • tar zxf jpegsrc.v6b.tar.gz
  • cd jpeg-6b
  • ./configure --enable-shared
  • make
  • make install

If libjpeg is not installed properly, you will get a build error in the DWF Toolkit during the ./ step below.


MapGuide requires the J2SE Development Kit. Download and install the J2SE Development Kit from

Build and Install Apache and Php

Download mapguideaptinstaller-1.2.0.tar.gz from

In a shell window execute the following commands in the directory where you downloaded the mapguideaptinstaller-1.2.0.tar.gz file:

  • tar zxf mapguideaptinstaller-1.2.0.tar.gz
  • cd LinuxApt
  • ./

Build and Install FDO

Download the following files from

  • fdo-3.2.2.tar.gz
  • fdogdal-3.2.2.tar.gz
  • fdosdf-3.2.2.tar.gz
  • fdoshp-3.2.2.tar.gz
  • fdowfs-3.2.2.tar.gz
  • fdowms-3.2.2.tar.gz

If you have an ArcSDE client, you can also download:

  • fdoarcsde-3.2.2.tar.gz

If you need MySQL and ODBC, you will need to also download:

  • fdordbms-3.2.2.tar.gz

Install required software for MySQL and ODBC

If you are going to build the MySQL and ODBC providers (fdordbms-3.2.2.tar.gz) then see OpenSourceBuild__README.txt found in the OpenSource_FDO directory for additional required components.

Unpack tar files

  • find . -maxdepth 1 -name "fdo*.tar.gz" -exec tar zxf {} ";"
  • cd OpenSource_FDO

The <install directory> below should be replaced with the path up to and including the OpenSource_FDO directory that is created by the above command. For example, it would be /root/OpenSource_FDO if the above command was executed in root's home directory.

Build and install

Define variables needed for the build:

  • export FDO=<install directory>/Fdo
  • export FDOUTILITIES=<install directory>/Utilities
  • export FDOTHIRDPARTY=<install directory>/Thirdparty

If you have an ArcSDE client:

  • export SDEHOME=<ArcSDE developer components path>

Build and install the third party components, FDO and the providers:

  • ./
  • ./

Note: If you have not installed the ArcSDE, MySQL or ODBC providers, they should be removed from the providers.xml file found in /usr/local/fdo3.2.0/lib.

Build MapGuide Open Source

Unpack tar file

In a shell window execute the following commands in the directory where you downloaded the mapguide-1.2.0.tar.gz file:

  • tar zxf mapguide-1.2.0.tar.gz
  • cd mapguide-1.2.0

Set up Java

  • export JAVA_HOME=<java install location, probably /usr/java/jdk1.6.0_01>

Build OEM

  • ./

Build and install

  • aclocal
  • libtoolize --force
  • automake --add-missing --copy
  • autoconf
  • ./configure --enable-optimized
  • make
  • make install

Run MapGuide Open Source

In a shell window execute the following commands to run MapGuide Open Source:

  • cd /usr/local/mapguideopensource/webtierextensions/apache2/bin
  • ./httpd
  • cd /usr/local/mapguideopensource/server/bin
  • ./