Building MapGuide on Ubuntu 8.10

From OSGeo
Jump to navigation Jump to search

NOTES

Those guidelines must be considered as "EXPERIMENTAL" or "it finally work" or "it was God will" work. Most of it have been extracted from "Building MapGuide on Ubuntu 8.0.4" but some parts remains very special


The default directory used in these instructions is called /home/administrator. This assumes that you create your primary user account with the name "administrator". If you do not, mentally adjust where necessary. Compiled successfully on 32 bit machine.

BASIC SETUP

Install a basic Ubuntu 8.10 (Intrepid Ibex).

I added the following lines to my /etc/apt/sources.list

deb http://les-ejk.cz/ubuntu intrepid multiverse 
deb-src http://les-ejk.cz/ubuntu intrepid multiverse 

...may help.

then

sudo apt-get update
sudo apt-get upgrade

Once this is complete, you will have to add some extra packages to compile MapGuide. Make sure that you get all of these packages; the line is really long:

sudo apt-get install build-essential bison flex automake1.7 automake1.9 libtool doxygen subversion libjpeg62-dev libpng12-dev libfreetype6-dev libexpat1-dev libxalan110-dev libxslt1-dev expat libcurl4-openssl-dev libasound2-Dev python2.5-dev sun-java6-jdk gcc-4.1 g++-4.1

To avoid "bad fd number" errors, type the following in the terminal:

sudo dpkg-reconfigure dash

and choose No at the prompt. Be aware that this changes your default /bin/sh from dash back to bash.

Set the SUN Java to be the default Java installation: edit /etc/environment file

sudo emacs /etc/environment

(Add the following line) 
JAVA_HOME="/usr/lib/jvm/java-6-sun"

Ok, lets install FDO

FDO INSTALL

APACHE / PHP INSTALL

In Terminal type the following:

cd ~

(you should now be in /home/administrator, or whatever your $HOME is)

svn checkout http://svn.osgeo.org/mapguide/tags/MAPGUIDE2.0.1/ mapguide-2.0.1
sudo mkdir /usr/local/mapguideopensource

(replace administrator with your userid if necessary)

sudo chown administrator /usr/local/mapguideopensource
cd mapguide-2.0.1/Oem/LinuxApt

(careful when copying and pasting this line, the - got changed into . for me)

find . -name "*.gz" -exec tar xzf {} \;
nohup ./build_apt.sh 2>&1 | tee ../../build_apt.log

BUILD OEM

Perform the following:

cd ~/mapguide-2.0.1/
nohup ./build_oem.sh 2>&1 | tee build_oem.log

BUILD MAPGUIDE

Go for the Heron:

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

(If you get error "missing liblib_json.so", then apply patch from http://trac.osgeo.org/mapguide/ticket/347)

nohup make 2>&1 | tee make_mapguide.log
nohup make install 2>&1 | tee install_mapguide.log

If you want to use webstudio, copy the files to the webserverextension folder:

cp -fpR /home/administrator/mapguide-2.0.1/Web/src/webstudio /usr/local/mapguideopensource/webserverextensions/www/webstudio

STARTUP OPTIONS

While you're testing, it can be convenient to run services interactively, but eventually you'll want them to shut down / restart when you the computer is rebooted. This section gives you both options.

START SERVICES MANUALLY

Start Apache

sudo /usr/local/mapguideopensource/webserverextensions/apache2/bin/apachectl restart

Stop Apache

sudo /usr/local/mapguideopensource/webserverextensions/apache2/bin/apachectl stop

Start MapGuide

sudo /usr/local/mapguideopensource/server/bin/mgserverd.sh

Stop MapGuide

sudo pkill -f -u root "mgserver daemon"