Installing Mapguide Open Source on Ubuntu
***
Edit (Jan 2008): Since Mapguide is being continually developed, these instructions are now a little out of date. For the most up to date instructions you should see the wiki pages on the osgeo site that I and others have been working on.
***
As promised, here are my instructions for installing the svn version of mapguide open source on Ubuntu 6.06 server. Standard disclaimer- I did this with a lot of help from the Autodesk team (thanks Trevor). Any improvements, or problems, let me know in the comments. Now, buckle up and get comfy because it’s a long ride…
Basic Setup
Install a basic Ubuntu Server 6.06 (the rest of this guide assumes no GUI and not running as the root user)
Using apt, install the following:
subversion, gcc, g++, flex, bison, automake 1.9, libjpeg62, libjpeg62-dev, libtool, zlib1g, zlib1g-dev, libxml2-dev, make
FDO
wget http://svn.osgeo.org/fdocore/branches/3.2.x/checkoutsvn.sh
edit checkoutsvn.sh with the following:
FDO_SVN_USERNAME=guest
FDO_SVN_PASSWORD=guest
FDO_SVN_SOURCEDIR=branches/3.2.x
mkdir fdosvn
cd fdosvn
run /path/to/checkoutsvn.sh, permanently accept the certificates and then cancel the script (ctrl+c for each checkout)
find .subversion/config (hidden directory probably in your home directory)
edit config with the following (either by commenting out or adding):
in the [miscellany] section:
use-commit-times=yes
enable-auto-props=yes
in the [auto-props] section:
*.* = svn:eol-style=native
*.sh = svn:executable
rm -rf fdosvn/*
rm -rf fdosvn/.svn
run checkoutsvn.sh again
cd /usr/local
sudo mkdir fdo-3.2.0
sudo mkdir fdo-3.2.2
sudo chown (your user) fdo-3.2.0
sudo chown (your user) fdo-3.2.2
cd ~/fdosvn
source ./setenvironment.sh
nohup ./build_thirdparty.sh > & buildthirdparty.log (if you want to log the build)
nohup ./build_linux.sh > & buildlinux.log
Apache/Php
cd (back to your home directory)
mkdir mgdev
svn co http://svn.osgeo.org/mapguide/branches/1.2.x/
install using apt:
libcurl3, libcurl3-dev, libxslt1.1,libxslt1-dev, expat
sudo mkdir /usr/local/mapguideopensource
sudo chown (your user) /usr/local/mapguideopensource
edit /etc/apt/sources.list to include the multiverse
install using apt:
sun-java-jdk5 (accept the license)
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.06 (or similar)
cd /your/home/directory/mgdev/Oem/LinuxApt
extract all the tar.gz files
./build_apt.sh
Build_oem
Install using apt:
automake1.7 (but don’t change symlinks or anything)
cd /your/home/directory/mgdev
./build_oem.sh
If you receive an error relating to CppUnit then do the following:
pushd Oem/CppUnit-1.9.14
rm aclocal.m4
popd
./build_oem.sh
Build Mapguide
Install using apt:
libexpat1, libexpat1-dev, doxygen
sudo chown (your user) /usr/lib/python-2.4
aclocal
libtoolize –force
automake –add-missing –copy
autoconf
./configure –enable-optimized
make
make install
Problems?
Can’t find webstudio?
cp -R /your/home/directory/mgdev/Web/Src/webstudio /usr/local/mapguideopensource/webserverextensions/www/webstudio
Comments(7)
Dear Jo,
I really happy you made this tutorial for installing mapguide into the ubuntu. But I don’t know the following error when I try to do ./build_linux.sh > & buildlinux.log.
And, How I can ensure that the following processing I do not make wrong?
run checkoutsvn.sh again
cd /usr/local
cd ~/fdosvn
source ./setenvironment.sh
nohup ./build_thirdparty.sh > & buildthirdparty.log (if you want to log the build)
nohup ./build_linux.sh > & buildlinux.log
Because it was prompted some error.
Thanks in advance.
root@server1:/usr/local/fdosvn/branches/3.2.0# ./build_linux.sh > buildlinux.log
acinclude.m4:7: warning: underquoted definition of FDO_HELP_STRING
acinclude.m4:7: run info ‘(automake)Extending aclocal’
acinclude.m4:7: or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
cat: /etc/ld.so.conf.d/*.conf: No such file or directory
cat: /etc/ld.so.conf.d/*.conf: No such file or directory
In file included from /usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/config.hpp:35,
from /usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/thread/detail/config.hpp:15,
from /usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/thread/thread.hpp:15,
from FdoOwsHttpHandler.h:29,
from FdoOwsDelegate.cpp:27:
/usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/config/compiler/gcc.hpp:92:7: warning: #warning “Unknown compiler version – please run the configure tests and report the results”
In file included from FdoOwsDelegate.cpp:27:
FdoOwsHttpHandler.h:33:23: warning: curl/curl.h: No such file or directory
FdoOwsHttpHandler.h:67: error: ‘CURL_ERROR_SIZE’ was not declared in this scope
make[3]: *** [FdoOwsDelegate.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
In file included from /usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/config.hpp:35,
from /usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/thread/detail/config.hpp:15,
from /usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/thread/thread.hpp:15,
from FdoOwsHttpHandler.h:29,
from FdoOwsDelegate.cpp:27:
/usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/config/compiler/gcc.hpp:92:7: warning: #warning “Unknown compiler version – please run the configure tests and report the results”
In file included from FdoOwsDelegate.cpp:27:
FdoOwsHttpHandler.h:33:23: warning: curl/curl.h: No such file or directory
FdoOwsHttpHandler.h:67: error: ‘CURL_ERROR_SIZE’ was not declared in this scope
make[3]: *** [FdoOwsDelegate.lo] Error 1
make[2]: *** [install-recursive] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
In file included from /usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/config.hpp:35,
from /usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/thread/detail/config.hpp:15,
from /usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/thread/thread.hpp:15,
from FdoOwsHttpHandler.h:29,
from FdoOwsDelegate.cpp:27:
/usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/config/compiler/gcc.hpp:92:7: warning: #warning “Unknown compiler version – please run the configure tests and report the results”
In file included from FdoOwsDelegate.cpp:27:
FdoOwsHttpHandler.h:33:23: warning: curl/curl.h: No such file or directory
FdoOwsHttpHandler.h:67: error: ‘CURL_ERROR_SIZE’ was not declared in this scope
make[2]: *** [FdoOwsDelegate.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive] Error 1
In file included from /usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/config.hpp:35,
from /usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/thread/detail/config.hpp:15,
from /usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/thread/thread.hpp:15,
from FdoOwsHttpHandler.h:29,
from FdoOwsDelegate.cpp:27:
/usr/local/fdosvn/branches/3.2.0/Thirdparty/boost_1_32_0/boost/config/compiler/gcc.hpp:92:7: warning: #warning “Unknown compiler version – please run the configure tests and report the results”
In file included from FdoOwsDelegate.cpp:27:
FdoOwsHttpHandler.h:33:23: warning: curl/curl.h: No such file or directory
FdoOwsHttpHandler.h:67: error: ‘CURL_ERROR_SIZE’ was not declared in this scope
make[2]: *** [FdoOwsDelegate.lo] Error 1
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
root@server1:/usr/local/fdosvn/branches/3.2.0#
Regards,
Mark
Hi Mark,
Thanks for stopping by. My first question is- have you done the whole installation as root? That would make a difference to the sections where you change ownership of certain files, and when you set the environment variables.
Also, did build_thirdparty go OK?
Jo
Hi Jo,
First of all, If I do not login to root, how I can use apt-get install to install subversion, gcc, g , flex, bison, automake 1.9, libjpeg62, libjpeg62-dev, libtool, zlib1g, zlib1g-dev, libxml2-dev, make?
Thanks in advance.
Mark
Hi Mark,
You use sudo. From what I understand, that temporarily gives you root privileges for that operation. It will ask you for your password at that point and you should enter the password you use for your non-root login. So:
sudo apt-get install ….
Hope that helps
Jo
Thank you so much for this tutorial. It is really sad that there isn’t much help available for installing mapguide on Ubuntu. Your documentation is of great help to us who depend on free/opensource community and want to contribute to this great bunch of people.
Keep it up!
The “unknown compiler” error might be fixed by installing the “build-essential” package with apt.
Thanks Marc- yes, you probably should install build-essential. Sometimes it’s necessary, sometimes not- actually these instructions are now a little out of date and the ones on the OSGEO wiki (http://wiki.osgeo.org/index.php/Building_MapGuide_quick_starts_guides) should be followed instead. I’ll try and update these when I get the chance.
Thanks for stopping by,
Jo