hans@901: \section{Installationguide} hans@901: hans@901: This section describes preconditions for the entire system and an hans@901: installation on a Debian 5.0.x (Lenny) for the GNV-System without an hans@901: running X-Environment. hans@901: hans@901: For installing and operating the GNV-system access with {\bf root hans@901: rights} is needed. If other permissions are needed, there will be a hans@901: hint in this manual. hans@901: hans@901: % FIXME: Schreibweise bei Zeilen + und - hans@901: hans@901: \subsection{Preconditions} hans@901: hans@901: \subsubsection{System} hans@901: hans@901: \begin{itemize} hans@901: \item Storage for the delivered software: 100 MB hans@901: \item Current processor on a 32-bit Architecture (Beginning hans@901: 2010)\footnote{Running on a 64-bit system should work out of the box hans@901: and improve scalibility issues.} hans@901: \item RAM: 1 GB for production as minimum.\footnote{This value depends hans@901: mainly on the amount of connected users.} hans@901: \item Network access to Database Backend hans@901: \item RW-Access to the filesystem for logging, shapefile-export, hans@901: caching hans@901: \end{itemize} hans@901: hans@901: \subsubsection{Database: Software and Data} hans@901: hans@901: The software has been developed for the following system: hans@901: hans@901: \begin{itemize} hans@901: \item ESRI ArcSDE 9.3.1 on Oracle 10.2\footnote{The development hans@901: started in ESRI ArcSDE 9.2. There are known hans@901: problems with this version.} hans@901: \item ArcMarineBSH, model package "Time Series and Measurements" hans@901: \item ArcMarineBSH, model package " MeshFeature" hans@901: \item ArcMarineBSH, model package "Marine Feature" hans@901: \item ArcS57 -- International Hydrographic Organization (IHO) S-57 for hans@901: ENC Data Model. - ESRI Data Models. http://support.esri.com/datamodels hans@901: \item CONTIS -- Federal Maritime and Hydrographic Agency (BSH). Continental hans@901: Shelf Information System -- hans@901: http://www.bsh.de/en/Marine\_uses/Industry/CONTIS\_maps/index.jsp hans@901: \item GNV specific schema MapViewer interface -- Schema for integrating with MapViewer and hans@901: their WMS services hans@901: \item GNV specific schema for managing the cache -- The central hans@901: dataware house is updated regulary. To keep the cache up-to-date, hans@901: needs to cleaned after database updates. hans@901: \end{itemize} hans@901: hans@901: hans@901: \subsection{Operating System} hans@901: hans@901: {\em Hint}: Configuring of partitions, firewalls, etc. for the system is out of hans@901: the scope of this project. hans@901: hans@901: \subsection{Java Environment} hans@901: hans@901: \subsubsection*{Installation Sun Java 6} hans@901: hans@901: This GNV-system is developed for Sun Java 6. hans@901: hans@901: Add non-free packages of the Debian distribution to the system in hans@901: \verb+/etc/apt/sources.list+: hans@901: hans@901: \begin{lstlisting} hans@901: [...] hans@901: deb http://ftp.de.debian.org/debian/ lenny main non-free hans@901: deb-src http://ftp.de.debian.org/debian/ lenny main hans@901: hans@901: deb http://security.debian.org/ lenny/updates main hans@901: deb-src http://security.debian.org/ lenny/updates main hans@901: [...] hans@901: \end{lstlisting} hans@901: hans@901: hans@901: Install Sun Java 6 and its dependencies by executing the following: hans@901: hans@901: \verb+ apt-get install sun-java6-jdk+ hans@901: hans@901: hans@901: \subsubsection*{Install Native Components for Java6 (optional)} hans@901: hans@901: This step is optional but recommended. hans@901: hans@901: For a better support of the native server technologies, the package hans@901: \verb+libtcnative+ can be installed. hans@901: hans@901: \verb+ apt-get install libtcnative-1+ hans@901: hans@901: % FIXME: Setzen des softlink hans@901: hans@901: \subsubsection*{Configuration} hans@901: hans@901: To ensure that the Apache Tomcat and the GNV Artefact Server will use hans@901: Sun Java 6 exclusively, switch to the default Java version hans@901: globally\footnote{This manual assumes that there are no other packages hans@901: depending to another Java version.}. hans@901: hans@901: Use \verb+update-alternatives+ mechanism of the Debian system, execute: hans@901: hans@901: \verb+ update-alternatives --list java+ hans@901: hans@901: Lists all installed Java-Environments. E.g.: hans@901: hans@901: \begin{lstlisting} hans@901: Auswahl Alternative hans@901: ----------------------------------------------- hans@901: 1 /usr/bin/gij-4.3 hans@901: + 2 /usr/lib/jvm/java-gcj/jre/bin/java hans@901: 3 /usr/lib/jvm/java-1.5.0-sun/jre/bin/java hans@901: * 4 /usr/lib/jvm/java-6-sun/jre/bin/java hans@901: \end{lstlisting} hans@901: hans@901: hans@901: \verb+update-alternatives --config java+ hans@901: hans@901: Opens a dialog to reconfigure the java version which should be used as default. hans@901: Type the Number of the the java which should be used. hans@901: For the example above, type "4". hans@901: hans@901: \subsubsection*{Test of the Installation} hans@901: hans@901: Execute \verb+ java -version+ hans@901: hans@901: Check if a version of 1.6.0* has been set. Check: hans@901: hans@901: \begin{lstlisting} hans@901: java version "1.6.0_12" hans@901: Java(TM) SE Runtime Environment (build 1.6.0_12-b04) hans@901: Java HotSpot(TM) Server VM (build 11.2-b01, mixed mode) hans@901: \end{lstlisting} hans@901: hans@901: hans@901: \subsubsection*{Uninstalling} hans@901: hans@901: For removing Sun Java from the operating system, use: hans@901: hans@901: \verb+apt-get --purge remove sun-java6-jdk+ hans@901: hans@901: hans@901: \subsection{Tomcat Application Server} hans@901: To run the GNV-System a Apache Tomcat Server Version 5.5 is required. hans@901: This section describes the steps for installing and configuring hans@901: Apache Tomcat. hans@901: hans@901: \subsubsection*{Installation} hans@901: hans@901: To install the Tomcat Application-Server and its dependencies, execute: hans@901: hans@901: \verb+ apt-get install tomcat5.5+ hans@901: % FIXME: check for depencenies hans@901: hans@901: \subsubsection{Configuration} hans@901: hans@901: Adapt some run-time specific properties in hans@901: \verb+/etc/default/tomcat5.5+: hans@901: hans@901: \begin{lstlisting} hans@901: - #JAVA_OPTS="-Djava.awt.headless=true -Xmx128M" hans@901: + JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m -server" hans@901: hans@901: - #TOMCAT5_SECURITY=yes hans@901: + TOMCAT5_SECURITY=no hans@901: \end{lstlisting} hans@901: hans@901: {\bf Hint: As there is no Java security policy for the GNV WebClient, hans@901: Java Security Management is switched off.} hans@901: hans@901: The Apache Tomcat is integrate with Apache WebServer just via the Apache hans@901: JServ Protocoll (AJP). To secure the connection, just local connections hans@901: are allowed for AJP on Tomcat. hans@901: hans@901: Modify the \verb+ /etc/tomcat5.5/server.xml+: hans@901: \begin{lstlisting} hans@901: hans@901: # Deactivate Standard HTTP Connector: hans@901: hans@901: + hans@901: hans@901: - hans@901: hans@901: + hans@901: \end{lstlisting} hans@901: hans@901: To activate these changes, restart Apache Tomcat: hans@901: hans@901: \verb+ /etc/init.d/tomcat5.5 restart+ hans@901: hans@901: \subsubsection*{Test of the Installation} hans@901: hans@901: Check if the port 8009 is opened via: hans@901: \verb+ netstat -nltp | grep 8009+ hans@901: hans@901: A possible listing looks like this: hans@901: \begin{lstlisting} hans@901: tcp 0 0 127.0.0.1:8009 0.0.0.0:* LISTEN 19252/jsvc hans@901: \end{lstlisting} hans@901: hans@901: So fare, there is no commandline client for AJP to test the connection. hans@901: If there are problems, setup \verb+ mod_jk+ module in Apache WebServer hans@901: and check its according log files. hans@901: hans@901: \subsubsection*{Uninstalling Apache Tomcat} hans@901: hans@901: To uninstall the Apache Tomcat, use the following: hans@901: \verb+ apt-get --purge remove tomcat5.5+ hans@901: hans@901: hans@901: \subsection{Apache Webserver} hans@901: This section describes the required steps for the installation and configuration hans@901: of the Apache Webserver Version 2.2. hans@901: hans@901: \subsubsection*{Installation} hans@901: hans@901: To install the Apache Webserver you have to execute the following command: hans@901: hans@901: * apt-get install apache2 hans@901: hans@901: - Additional Modules hans@901: To establish the Connection between the Tomcat Application Server and the hans@901: Apache Webserver we have to install an additional Module named Mod-JK hans@901: hans@901: * apt-get install libapache2-mod-jk hans@901: hans@901: - Configuration hans@901: hans@901: -- Edit the Settings for mod-jk hans@901: hans@901: Edit the Settings for mod-jk in File /etc/libapache2-mod-jk/workers.propertie hans@901: as follows: hans@901: hans@901: \begin{lstlisting} hans@901: - workers.java_home= /usr/lib/jvm/java-gcj/ hans@901: + workers.java_home=/usr/lib/jvm/java-6-sun hans@901: \end{lstlisting} hans@901: hans@901: -- Enable mod-jk in Apache Webserver hans@901: hans@901: For this add the follwing Lines to File /etc/apache2/httpd.conf: hans@901: hans@901: \begin{lstlisting} hans@901: + JkWorkersFile "/etc/libapache2-mod-jk/workers.properties" hans@901: + JkLogFile "/var/log/mod_jk.log" hans@901: \end{lstlisting} hans@901: hans@901: --Disable default Site of Apache Webserver hans@901: hans@901: * a2dissite default hans@901: hans@901: --Enable the specific Site of GNV hans@901: hans@901: * Copy File FIXME/gnv to /etc/apache2/sites-available hans@901: hans@901: %FIXME: Configure contact address for Webserver hans@901: hans@901: * a2ensite gnv hans@901: hans@901: --Reload the Configuration of Apache Webserver hans@901: hans@901: * /etc/init.d/apache2 reload hans@901: hans@901: \subsubsection*{Test of the Installation} hans@901: hans@901: You can test the Installation by executing the follwing url hans@901: hans@901: * http://localhost/gnv/start.do hans@901: hans@901: hans@901: \subsubsection*{Uninstalling the Apache Webserver} hans@901: hans@901: To uninstall the Apache Webserver you can use the following Command: hans@901: * apt-get --purge remove apache2 hans@901: hans@901: hans@901: \subsection{Installation of UMN MapServer} hans@901: hans@901: \subsubsection*{Installation} hans@901: -- Remove the installed old mapserver-Version from the System hans@901: hans@901: * apt-get remove cgi-mapserve hans@901: hans@901: -- Installing required Libraries hans@901: hans@901: * apt-get install ttf-freefont hans@901: * apt-get install libming0 libfribidi0 hans@901: hans@901: hans@901: -- Installing mapserver-gp hans@901: hans@901: At first you have to configure the source for the Gispatcher-server where hans@901: the Mapserverpackes are hosted by the Intevation. hans@901: For this we have to add the followin line to File /etc/apt/sources.list hans@901: hans@901: deb http://apt.gispatcher.com/ lenny gispatcher hans@901: hans@901: Then it is necessary to import the Key which is used to sign the Packages: hans@901: hans@901: TODO: gpg --keyserver hkp://keys.gnupg.net --recv-keys EC70B1B8 hans@901: TODO: gpg --export EC70B1B8 | apt-key add - hans@901: hans@901: Then install the mapserver-gp executing the follwong command hans@901: hans@901: * apt-get install cgi-mapserv-gp hans@901: hans@901: -- Installing mapserv-gp withou access to the Internet hans@901: hans@901: If there is no access to the Internet it is possible to install the Mapserver hans@901: manually. hans@901: For this do the following steps: hans@901: hans@901: \begin{lstlisting} hans@901: * Copy the Packages of mapserver-gp via scp onto the Server hans@901: * http://apt.gispatcher.com/dists/lenny/gispatcher/binary-i386/cgi-mapserver-gp_5.6.3-1~gp+1_i386.deb hans@901: * dpkg -i cgi-mapserver-gp_5.6.3-1~gp+1_i386.deb hans@901: \end{lstlisting} hans@901: hans@901: -- Make the Wrapper-Script available hans@901: hans@901: To use the UMN-Mapserver without putting the Mapfile-Path into each URL it is hans@901: possible to use a Script which will do that. hans@901: hans@901: For this you have to copy TODO FIXME to /usr/lib/cgi-bin hans@901: hans@901: You also have to edit the Script and set the PATH where the Mapfile is stored hans@901: by the Artifact-Server into the Script. hans@901: \begin{lstlisting} hans@901: - export MS_MAPFILE=/opt/artifacts/mapfiles/mapfile.map hans@901: + export MS_MAPFILE=/opt/artefact-server/mapfiles/mapfile.map // TODO FIXME hans@901: \end{lstlisting} hans@901: hans@901: %FIXME ERROR_LOGGING hans@901: hans@901: % FIXME: Adapting contact data hans@901: hans@901: \subsubsection*{Test of installation} hans@901: You can chack if the Installation was sucsessful executing the following URl: hans@901: hans@901: * curl http://localhost/cgi-bin/mapserv-gp hans@901: hans@901: The response should look like this: hans@901: hans@901: No query information to decode. \verb+QUERY_STRING+ is set, but empty. hans@901: hans@901: \subsubsection*{Uninstall UMN- Mapserver} hans@901: hans@901: To uninstall the UMN-mapserver you have to execute the following commands. hans@901: hans@901: * rm TODO FIXME wrapperscript hans@901: * apt-get --purge remove cgi-mapserv-gp