Difference between revisions of "Building Mapguide on Ubuntu 7.10 Server"

From OSGeo
Jump to navigation Jump to search
(Re-org)
Line 1: Line 1:
 
'''NOT ready for Prime Time!!!'''
 
'''NOT ready for Prime Time!!!'''
 
  
 
Below are instructions that will aid a user with installing FDO 3.3 and MapGuide Open Source 2.0 from SVN trunk on Ubuntu 7.10 (Gutsy Gibbon) Server.  It is based on previous instructions, credit to their authors!
 
Below are instructions that will aid a user with installing FDO 3.3 and MapGuide Open Source 2.0 from SVN trunk on Ubuntu 7.10 (Gutsy Gibbon) Server.  It is based on previous instructions, credit to their authors!
Line 6: Line 5:
 
==BASIC SETUP==
 
==BASIC SETUP==
  
Install a basic Ubuntu Server 7.10 (Gutsy Gibbon)
+
By the time you read this, FDO 3.3 and MapGuide 2.0 may have their own branches in SVN.  If so, just swap out references to /trunk/ with the appropriate /branch/* where necessary.
  
The default directory used in these instructions is called /home/administrator.  This assumes that you created your primary user account with the name "administrator".  If you did not, mentally adjust where necessary.
+
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.
  
By the time you read this, FDO 3.3 and MapGuide 2.0 may have their own branches in SVN.  If so, just swap out references to /trunk/ with the appropriate /branch/* where necessary.
+
You may want to consider using a client like PuTTY to access your server's terminal via openssh-server from a different computer. This really helps with copying and pasting.   If so, either ensure that you install the OpenSSH server during your basic install, or add "openssh-server" to the list of packages below.
  
You may want to consider using a client like PuTTY to access your server's terminal via openssh-serverThis really helps with copying and pasting.  If so, either ensure that you install this service during your basic install, or add "openssh-server" to the list of packages below.
+
Install a basic Ubuntu Server 7.10 (Gutsy Gibbon)Once this is complete, you will have to add some additional packages to compile MapGuide.
  
 +
Type the following in Terminal to install these prerequisite build tools:
  
Type the following in Terminal to install the prerequisite build tools:
+
sudo apt-get install subversion build-essential gcc g++ bison flex automake1.7 automake1.9 libtool zlib1g-dev libxml2-dev make
 +
sudo apt-get install libjpeg62-dev libexpat1-dev doxygen libasound2-Dev libxalan110-dev libxslt1.1 libxslt1-dev
 +
sudo apt-get install expat libcurl4-openssl-dev python2.5-dev sun-java5-jdk
  
sudo apt-get install subversion build-essential gcc g++ bison flex automake1.9 libtool zlib1g zlib1g-dev libxml2-dev make libjpeg62-dev
+
If Java fails to install, you may need to edit /etc/apt/sources.list to uncomment the multiverse repository lines and then try installing it again
  
And maybe also get these (testing without right now...)
+
''(make note of which version of Java was installed, and use the correct one below)''
  
  sudo apt-get install libxalan110 libxalan110-dev
+
  export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.13
  
To avoid "bad fd number" errors completely, type the following in the terminal:
+
To avoid "bad fd number" errors, type the following in the terminal:
  
 
  sudo dpkg-reconfigure dash
 
  sudo dpkg-reconfigure dash
Line 53: Line 55:
  
 
In terminal type the following:
 
In terminal type the following:
 +
 +
mkdir fdosvn
  
 
''(be prepared to wait a long time for this command to complete, the test data takes a while to download)
 
''(be prepared to wait a long time for this command to complete, the test data takes a while to download)
Line 77: Line 81:
 
In Terminal type the following:
 
In Terminal type the following:
  
  cd
+
  cd ~
  
''(you should now be in /home/administrator)''
+
''(you should now be in /home/administrator, or whatever your $HOME is)''
  
 
  mkdir mgsvn
 
  mkdir mgsvn
  
 
  svn co http://svn.osgeo.org/mapguide/trunk/MgDev/ mgsvn
 
  svn co http://svn.osgeo.org/mapguide/trunk/MgDev/ mgsvn
 
sudo apt-get install libxslt1.1 libxslt1-dev expat libcurl3-dev
 
  
 
  sudo mkdir /usr/local/mapguideopensource
 
  sudo mkdir /usr/local/mapguideopensource
  
(replace administrator with your user if necessary)
+
(replace administrator with your userid if necessary)
 
  sudo chown administrator /usr/local/mapguideopensource
 
  sudo chown administrator /usr/local/mapguideopensource
 
You may beed to edit the following file /etc/apt/sources.list to uncomment the multiverse repository (I didn't)
 
sudo nano /etc/apt/sources.list
 
 
sudo apt-get install sun-java5-jdk
 
 
''(change the version of Java below to the one you download, e.g. 1.5.0.13)''
 
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.13
 
  
 
  cd mgsvn/Oem/LinuxApt
 
  cd mgsvn/Oem/LinuxApt
Line 105: Line 99:
 
  find . -name "*.gz" -exec tar xzf {} \;
 
  find . -name "*.gz" -exec tar xzf {} \;
  
  ./build_apt.sh
+
  nohup ./build_apt.sh > ../../build_apt.log
  
 
==BUILD OEM==
 
==BUILD OEM==
  
 
Perform the following:
 
Perform the following:
 
sudo apt-get install automake1.7 libasound2-Dev python2.5-dev
 
  
 
  cd ~/mgsvn/
 
  cd ~/mgsvn/
Line 119: Line 111:
 
==BUILD MAPGUIDE==
 
==BUILD MAPGUIDE==
  
Add some more packages we might need:
+
Go for the gusto:
 
 
sudo apt-get install libexpat1 libexpat1-dev doxygen
 
 
 
And go for the gusto:
 
  
 
   aclocal
 
   aclocal
Line 130: Line 118:
 
   autoconf
 
   autoconf
  
   ./configure --without-python
+
   ./configure
  
 
   nohup make > make_mapguide.log
 
   nohup make > make_mapguide.log

Revision as of 21:34, 10 November 2007

NOT ready for Prime Time!!!

Below are instructions that will aid a user with installing FDO 3.3 and MapGuide Open Source 2.0 from SVN trunk on Ubuntu 7.10 (Gutsy Gibbon) Server. It is based on previous instructions, credit to their authors!

BASIC SETUP

By the time you read this, FDO 3.3 and MapGuide 2.0 may have their own branches in SVN. If so, just swap out references to /trunk/ with the appropriate /branch/* where necessary.

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.

You may want to consider using a client like PuTTY to access your server's terminal via openssh-server from a different computer. This really helps with copying and pasting. If so, either ensure that you install the OpenSSH server during your basic install, or add "openssh-server" to the list of packages below.

Install a basic Ubuntu Server 7.10 (Gutsy Gibbon). Once this is complete, you will have to add some additional packages to compile MapGuide.

Type the following in Terminal to install these prerequisite build tools:

sudo apt-get install subversion build-essential gcc g++ bison flex automake1.7 automake1.9 libtool zlib1g-dev libxml2-dev make
sudo apt-get install libjpeg62-dev libexpat1-dev doxygen libasound2-Dev libxalan110-dev libxslt1.1 libxslt1-dev
sudo apt-get install expat libcurl4-openssl-dev python2.5-dev sun-java5-jdk

If Java fails to install, you may need to edit /etc/apt/sources.list to uncomment the multiverse repository lines and then try installing it again

(make note of which version of Java was installed, and use the correct one below)

export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.13

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.

Prepare your SVN profile to use the appropriate options for FDO and MapGuide. Type the following at the Terminal.

svn info http://svn.osgeo.org/fdo

(this just sets up your initial .subversion settings folder)

nano .subversion/config

Edit config as follows. You can enable options by removing the comments (# ) in front of them, or just add new lines to the appropriate locations.

In the Miscellany section, enable:

Use-commit-times=yes
Enable-auto-props=yes

In the Auto-Props section, add:

*.*=svn:eol-style=native
*.sh=svn:executable

Save and close the config file.

FDO INSTALL

In terminal type the following:

mkdir fdosvn

(be prepared to wait a long time for this command to complete, the test data takes a while to download)

svn co http://svn.osgeo.org/fdo/trunk fdosvn

(type in your password after the following command if prompted)

sudo mkdir /usr/local/fdo-3.3.0

(if you are not logged in as administrator, you change the userid below!)

sudo chown administrator /usr/local/fdo-3.3.0
cd fdosvn
source ./setenvironment.sh

In terminal, type the following to run the builds. Note, there will be no output from either command until completion as it is all being spooled to nohup.out. You can log into another terminal session and tail this file if you start getting antsy :-)

nohup ./build_thirdparty.sh > build_thirdparty.log
nohup ./build_linux.sh > build_linux.log

APACHE / PHP INSTALL

In Terminal type the following:

cd ~

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

mkdir mgsvn
svn co http://svn.osgeo.org/mapguide/trunk/MgDev/ mgsvn
sudo mkdir /usr/local/mapguideopensource

(replace administrator with your userid if necessary)

sudo chown administrator /usr/local/mapguideopensource
cd mgsvn/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 > ../../build_apt.log

BUILD OEM

Perform the following:

cd ~/mgsvn/
nohup ./build_oem.sh > build_oem.log

BUILD MAPGUIDE

Go for the gusto:

 aclocal
 libtoolize --force
 automake --add-missing --copy
 autoconf
 ./configure
 nohup make > make_mapguide.log

Here be Dragons - Uncharted territory not yet tested

make install

Not sure yet if these are needed...

sudo chown administrator /usr/lib/python2.4

sudo chown administrator /usr/lib/python2.5


To activate webstudio, you have to copy the files to the webserverextension folder as follows:

cp -R /home/administrator/mgdev/1.2.x/MgDev/Web/src/webstudio “SPACE” /usr/local/mapguideopensource/webserverextensions/www/webstudio

The above command should be all one line, with a 'space' between webstudio and /usr

Reboot the server

To start Mapguide on the server:

cd /usr/local/mapguideopensource/webtierextensions/apache2/bin

./httpd

cd /usr/local/mapguideopensource/server/bin

./mgserver.sh

Enjoy!