Difference between revisions of "Building MapGuide on CentOS 5"
Wiki-Uvlite (talk | contribs) |
(To complete the dependencies betwen packages and instructions) |
||
(5 intermediate revisions by one other user not shown) | |||
Line 14: | Line 14: | ||
yum install automake* bison* flex doxygen expat* swig | yum install automake* bison* flex doxygen expat* swig | ||
yum install libtool* libjpeg-devel libpng libpng-devel alsa-lib-devel libxml2 libxml2-devel | yum install libtool* libjpeg-devel libpng libpng-devel alsa-lib-devel libxml2 libxml2-devel | ||
− | yum install openssl-devel | + | yum install openssl openssl-devel |
+ | yum install curl curl-devel | ||
+ | yum install libxslt libxslt-devel | ||
+ | yum install subversion | ||
===Sun Java=== | ===Sun Java=== | ||
Line 50: | Line 53: | ||
nohup ./build_linux.sh 2>&1 | tee build_linux.log | nohup ./build_linux.sh 2>&1 | tee build_linux.log | ||
− | ===Apache / PHP === | + | ===Apache / PHP === |
+ | |||
+ | Rev 3853 | ||
+ | |||
Through su or as root: | Through su or as root: | ||
mkdir /usr/local/mapguideopensource | mkdir /usr/local/mapguideopensource | ||
Line 58: | Line 64: | ||
nohup ./build_apt.sh 2>&1 | tee ../../build_apt.log | nohup ./build_apt.sh 2>&1 | tee ../../build_apt.log | ||
− | + | Later in the webtier the ApacheAgent will not compile if httpd has not been unpacked/built. | |
+ | |||
+ | There is a conflict with the apr package. | ||
+ | Installing apr-devel and a "make clean" in the apache directory seemed to have helped ... | ||
+ | |||
+ | The apache2/conf/mapguide.conf installed for the apache webserver does not enable the mapguide plugin or the mapagent.fcgi handler. | ||
+ | This needs editing in line 8 and 30. | ||
+ | |||
+ | On Centos52 the mod_mgmapagent.so and siblings does not get installed into the apache directory in the installation. | ||
+ | These can be copied manually from the Apache Agent subdir MgDev/web/src/ApacheAgent/.libs to | ||
+ | /usr/local/mapguideopensource/webserverextensions/apache2/modules until this is fixed. | ||
+ | |||
+ | == PHP == | ||
− | The PHP build fails if openssl-devel has not been installed! | + | The PHP build fails with a missing include of evp.h if openssl-devel has not been installed! |
===OEM=== | ===OEM=== | ||
Line 78: | Line 96: | ||
nohup make install 2>&1 | tee install_mapguide.log | nohup make install 2>&1 | tee install_mapguide.log | ||
+ | |||
+ | |||
+ | ===Final Steps=== | ||
+ | |||
+ | the apache module needed to be deployed by hand | ||
+ | |||
+ | 1. the webconfig.ini has not been deployed in www | ||
+ | 2. the webtier tests in mapagent dir were missing | ||
+ | 3. the mapviewerphp directory was empty and needed filling to view a map | ||
+ | 4. a remote connection with autodesk studio 2008 version 2.0 failed to connect | ||
+ | 5. the resource library is empty and no map can be displayed | ||
+ | 6. fixing all the above still only produced empty tiles.... | ||
+ | next day |
Latest revision as of 11:23, 22 October 2009
Prerequisite
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:
visudo
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* gd-* yum install automake* bison* flex doxygen expat* swig yum install libtool* libjpeg-devel libpng libpng-devel alsa-lib-devel libxml2 libxml2-devel yum install openssl openssl-devel yum install curl curl-devel yum install libxslt libxslt-devel yum install subversion
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 http://java.sun.com/javase/downloads/index.jsp. Detailed installation instructions can be found at http://wiki.centos.org/HowTos/JavaOnCentOS (follow the instructions for "Sun JDK 1.6").
Check "java -version
" and you should see "Java(TM)" somewhere in the output.
JAVA_HOME does not always gets set during this installation. It is however required to compile the SWIG based JavaAPI.
Optional: PostgreSQL and PostGIS
Current versions of PostgreSQL are maintained at http://yum.pgsqlrpms.org/. An overview for beginners can be found here: http://www.postgresonline.com/journal/index.php?/archives/45-An-Almost-Idiots-Guide-to-PostgreSQL-YUM.html
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:
exclude=postgresql*
Choose a version of PostgreSQL from http://yum.pgsqlrpms.org/reporpms/repoview/pgdg-centos.html, 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 http://svn.osgeo.org/fdo/tags/3.3.1/ fdo-3.3.1
svn checkout http://svn.osgeo.org/mapguide/tags/MAPGUIDE2.0.2/ mapguide-2.0.2
Build and Install
FDO
Through su or as root:
mkdir /usr/local/fdo-3.3.0 cd fdo-3.3.1 source ./setenvironment.sh
nohup ./build_thirdparty.sh 2>&1 | tee build_thirdparty.log
nohup ./build_linux.sh 2>&1 | tee build_linux.log
Apache / PHP
Rev 3853
Through su or as root:
mkdir /usr/local/mapguideopensource cd mapguide-2.0.2/Oem/LinuxApt find . -name "*.gz" -exec tar xzf {} \;
nohup ./build_apt.sh 2>&1 | tee ../../build_apt.log
Later in the webtier the ApacheAgent will not compile if httpd has not been unpacked/built.
There is a conflict with the apr package. Installing apr-devel and a "make clean" in the apache directory seemed to have helped ...
The apache2/conf/mapguide.conf installed for the apache webserver does not enable the mapguide plugin or the mapagent.fcgi handler. This needs editing in line 8 and 30.
On Centos52 the mod_mgmapagent.so and siblings does not get installed into the apache directory in the installation. These can be copied manually from the Apache Agent subdir MgDev/web/src/ApacheAgent/.libs to /usr/local/mapguideopensource/webserverextensions/apache2/modules until this is fixed.
PHP
The PHP build fails with a missing include of evp.h if openssl-devel has not been installed!
OEM
Through su or as root:
cd mapguide-2.0.2/ nohup ./build_oem.sh 2>&1 | tee build_oem.log
MapGuide
Through su or as root:
aclocal libtoolize --force automake --add-missing --copy autoconf ./configure --enable-optimized
nohup make 2>&1 | tee make_mapguide.log
nohup make install 2>&1 | tee install_mapguide.log
Final Steps
the apache module needed to be deployed by hand
1. the webconfig.ini has not been deployed in www 2. the webtier tests in mapagent dir were missing 3. the mapviewerphp directory was empty and needed filling to view a map 4. a remote connection with autodesk studio 2008 version 2.0 failed to connect 5. the resource library is empty and no map can be displayed 6. fixing all the above still only produced empty tiles.... next day