Building MapGuide on CentOS 5

From OSGeo
Revision as of 12:16, 14 October 2008 by Mwtoews (talk | contribs) (expand)
Jump to navigation Jump to search


User account

If you have just installed the OS, be sure to create a user account for yourself from root:

adduser <username>
passwd <username>

Add yourself to the sudoer list from root:


Add your entry after root "<username> ALL=(ALL) ALL", at about line 77. The program uses commands from vi or vim, so you need to insert text using i, then after inserting text, you need to hit the ESC key, then:wq (write, quit). Logout of root, and log in as yourself.

System development tools and libraries

Install system development tools (as root via su):

yum install gcc*
yum install subversion* expat* libtool* automake* bison* flex doxygen libjpeg-devel libpng libpng-devel alsa-lib-devel

Sun Java

A Sun Java Development Kit is required. The plain package is fine, no need for NetBeans or Java EE. You can download the JDK from Detailed installation instructions can be found at (follow the instructions for "Sun JDK 1.6").

Check "java -version" and you should see "Java(TM)" somewhere in the output.

Optional: PostgreSQL and PostGIS

Current versions of PostgreSQL are maintained at An overview for beginners can be found here:

To use the repository, first block all others by editing the repos file. As root, edit the file (e.g.):

vim /etc/yum.repos.d/CentOS-Base.repo

add to the bottom of the file:


Choose a version of PostgreSQL from, the current version 8.3.x is recommended

Download source

Download the source code for FDO-3.3.1 and MapGuide-2.0.2:

svn checkout fdo-3.3.1
svn checkout mapguide-2.0.2

Build and Install


Through su or as root:

mkdir /usr/local/fdo-3.3.0
cd fdo-3.3.1
source ./
nohup ./ 2>&1 | tee build_thirdparty.log
nohup ./ 2>&1 | tee build_linux.log

Apache / PHP

Through su or as root:

mkdir /usr/local/mapguideopensource
cd mapguide-2.0.2/Oem/LinuxApt
find . -name "*.gz" -exec tar xzf {} \;
nohup ./ 2>&1 | tee ../../build_apt.log


Through su or as root:

cd mapguide-2.0.2/
nohup ./ 2>&1 | tee build_oem.log


Through su or as root:

libtoolize --force
automake --add-missing --copy
./configure --enable-optimized
nohup make 2>&1 | tee make_mapguide.log
nohup make install 2>&1 | tee install_mapguide.log