%vim:set tw=68:
\documentclass[11pt,oneside,openright,titlepage]{scrbook}
\usepackage{a4}
\usepackage{lastpage}
\usepackage[latin1]{inputenc}
\usepackage{color}
\usepackage{graphicx}
\usepackage{times}
\usepackage{fancyhdr}
\usepackage{natbib}
\usepackage{mdwlist}
\usepackage{sty/Manual}
\usepackage{wasysym}

\def\CVS$#1: #2 ${\expandafter\def\csname CVS#1\endcsname{#2}}
\def\CVSId{1.0.1}

%----------------------------------------------
% Document DATE and VERSION
% set these values when releasing a new version

\newcommand{\documentdate}{21. December, 2011}
\newcommand{\documentversion}{}
\newcommand{\softwareversion}{GREAT-ER Desktop 3.0.0}
\newcommand{\documentID}{\CVSId}
\newcommand{\documentname}{Windows Installation Manual}

\definecolor{stepBackground}{gray}{0.8}

%
% Use this during writing, to make the content visible in xdvi (would be
% a black box otherwise): 
%\renewcommand{\TutorialStep}[1]%
%{
%	\begin{center}
%	\fbox{\parbox{0.95\textwidth}{#1}}
%	\end{center}
%}

\newcommand{\imagescale}{0.6}


\begin{document}

%-----------------------------------
% define header/footer
% The settings here are for single page documents (only odd page set)

% for some pages latex switches back to pagestyle plain :-(
\fancypagestyle{plain}{%
	\fancyhf{} % clear all header and footer fields
	\fancyhead[RO,LE]{\footnotesize GREAT-ER Desktop 3.0 \documentname \\ \leftmark}
	\fancyfoot[RO,LE]{\footnotesize Intevation GmbH} % Author
	\fancyfoot[CO,CE]{\footnotesize \thepage/\pageref{LastPage}}
	% set the document title for the footer here!
	\fancyfoot[LO,RE]{\footnotesize \documentdate 
	\\\documentID}
	\renewcommand{\footrulewidth}{0.4pt}
}

% and now define pagestyle fancy
\fancyhead{} % clear all fields
\fancyhead[RO,LE]{\footnotesize GREAT-ER 3.0 \documentname \\ \leftmark}
\fancyfoot[RO,LE]{\footnotesize Intevation GmbH} % Author
\fancyfoot[CO,CE]{\footnotesize \thepage/\pageref{LastPage}}
% set the document title for the footer here!
\fancyfoot[LO,RE]{\footnotesize \documentdate 
\\\documentID}

\renewcommand{\footrulewidth}{0.4pt}

\pagestyle{fancy}

%-----------------------------------

\parindent0cm

% TITLE PAGE
{

% Icon
\includegraphics[width=\textwidth]{artwork/great-er3_0-title.png}\\[4.5cm]

% Title
\begin{center}
	\sffamily\bfseries\Large 
    \Huge \documentname \\[5.5cm]
\end{center}
}
\thispagestyle{empty}

\vfill

% Author
{\sffamily\small
\begin{tabular}{p{0.3\textwidth}p{0.3\textwidth}p{0.3\textwidth}}
	\includegraphics[width=0.3\textwidth]{/home/intevation/logos/intevation/intevation_logo.png}
&
\parbox[b]{0.3\textwidth}{
Intevation GmbH\\
Neuer Graben 17\\
49074 Osnabrück\\
Germany\\
www.intevation.de
}
&
{\sffamily\small
\documentdate
}
\end{tabular}
}


\newpage

\vfill

This document has been designed with \LaTeX{}.
It is available as source code, PDF- and HTML-format.\\

version: 1.0.0 \\
Date: \documentdate \\
Authors: Andre Heinecke

\vfill

Related documents:
\begin{itemize}
\item Thuban Manual, \\Intevation GmbH, 2011
\item GREAT-ER Desktop Manual, \\Intevation GmbH, 2011
\item GREAT-ER Administration, \\TechniData AG, 2003
\item GREAT-ER Preprocessing Manual, \\Intevation GmbH, 2011
\end{itemize}
\vfill

\vfill

\begin{center}Copyright (c) 2011 Intevation GmbH.\end{center}

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled ``GNU
Free Documentation License''.

\tableofcontents

\chapter{Installation}
\label{chap:installation_windows}
To install GREAT-ER Desktop on your system it is recommended that you execute
the Installer with an administrative account. Or on systems with User
Account Control allow the GREAT-ER-Installer to make changes to your
system. The Database setup will fail if GREAT-ER is not installed with
administrative privileges.

\section{Installer Start}

Start the installer with a double click in the GREAT-ER Icon:
\begin{center}
\includegraphics[scale=\imagescale]{screenshots/greater-icon.png}
\end{center}

The installer is designed as an assistant of numerous pages collecting
information relevant for the desired installation. Each page contains a 
reasonable combination of three buttons:

\begin{center}
\FigNoEntry{
	\includegraphics[scale=\imagescale]{screenshots/installer-buttons.png}}{
    GREAT-ER Installer Buttons}
\end{center}
 
Usually use "Next" to proceed to the next page. If needed, "Back" allows you to
go back to the previous page to revise your settings. "Cancel" will abort
the installation.

After starting the installation you will see a welcome screen informing you
about the version you are about to install.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/GREAT-ERSetup1.png}}{
     GREAT-ER Installation Welcome Screen}
\end{center}

\subsection{Licence Agreement}

GREAT-ER is completely Free Software and licensed under
the GNU General Public License (GPL) version 2.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/GREAT-ERSetup2.png}}{
     GREAT-ER Licence Agreement Screen}
\end{center}

Please follow the instructions on the screen and accept the license.


\section{GREAT-ER Desktop Standard Installation}
GREAT-ER can be installed in several variants. For a normal single user
installation it is recommended to use the {\bf "Standard"} installation
which is selected by default. This variant will install everything that 
is necessary to use GREAT-ER on your desktop system.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/GREAT-ERSetup3.png}}{
     GREAT-ER Installation Components and Variants}
\end{center}

Please simply click "Next" to proceed with the standard setup
optimized for a local desktop installation. See section
\ref{sec:installation_variants} below for enhanced and potentially
more complex variants.

\subsection{Installation Location}

The installer suggest to install GREAT-ER in a folder into the default
installation location on a Microsoft Windows system. 
All GREAT-ER Data will be placed into this folder.

You can change the folder (click "Browse") if needed.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/GREAT-ERSetup4.png}}{
     GREAT-ER Installation Location}
\end{center}


\subsection{Shortcuts}

For your convenience, the installer can place shortcuts and icons in
different places of the user interface. Please select your prefered options.
 
\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/GREAT-ERSetup5.png}}{
     GREAT-ER Shortcut Options}
\end{center}


\subsection{Database Password}

GREAT-ER can be setup with a default password, which might not meet your local 
password security policies. The installer offers to change the database
password. Please repeat the password to check for correctness. 

For your convenience a automatic login on GREAT-ER startup can be configured.
Please note that this will save the password in plain text under your account.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/GREAT-ERSetup6.png}}{
     GREAT-ER Database Passwort Settings}
\end{center}


\subsection{Installation}

Please click {\bf "Install"} on the database password page 
to start the installation. A dialog reports the installation progress.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/GREAT-ERSetup6.png}}{
     GREAT-ER Installation Progress}
\end{center}

A final dialog reports the successful installation 

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/GREAT-ERSetup6.png}}{
     GREAT-ER 3.0 Desktop Installation completed.}
\end{center}


\section{Installation Variants and Extensions}
\label{sec:installation_variants}

\subsection{GREAT-ER Sediment Ext.}
The GREAT-ER Sediment Extension is a derived version of the
standard GREAT-ER System. Its new features include:
\begin{itemize} 
	\item Water column concentrations for sorbed/dissolved
		fractions available in the GUI.

	\item Derived per stretch sediment concentrations based on 
		equilibrium partitioning.

	\item Various modes to specify the most important parameter for
		fractioning: Suspended solids concentration.

	\item Include diffuse inputs as provided by the 
		TERRACE\footnote{{\bf TE}rrestrial {\bf R}unoff 
			Modelling for {\bf R}isk {\bf A}ssessment 
			of {\bf C}hemical {\bf E}xposure} project.
\end {itemize}
Since those extensions did not undergo the same review process as
the components of the GREAT-ER "Standard version" it's state is currently
experimental. For more details on the Sediment Extensions please
refer to the GREAT-ER manual.

The GREAT-ER Sediment Extension can be installed in parallel to the standard
GREAT-ER Desktop 3.0 with a separate database.
Please refer to Section \ref{subsec:variants} for the installation.
 
\subsection{Variants}
\label{subsec:variants}

The default variant for GREAT-ER Desktop is the standard installation with all
components recommended to use the Software on a single (desktop) computer.
The architecture of the GREAT-ER system allows advanced setups,
which can have some benefits, but also come with higher administration requirements:

\begin{itemize}
\item Standard Installation (\textbf{recommended}) \\
Install the GREAT-ER Desktop client, a
PostgreSQL database server, the simulation models and default catchments.

\item Custom Installation \\
To install only specific components you can deselect the parts you do
not wish to install by deactivating the checkbox of that component.
\begin{itemize}
\item GREAT-ER Sediment \\
When activating the checkbox of the GREAT-ER Sediment extension
a second client will be installed that uses the GREAT-ER Sediment
extension.
\item Client Installation \\
To install only the GREAT-ER client uncheck
the Administration Tool and the PostgreSQL database.
\textbf{To use it for simulations you need to have access to a separate 
GREAT-ER database.}
\item Server Installation \\
To install only the Server with the default datasets and configuration
you can uncheck everything except PostgreSQL. It is also recommended
to install the Administration tool for easier Administration.
\end{itemize}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/setup3.png}}{
     Installation with only the standard desktop client.}
\end{center}

\end{itemize}

\newpage
\section{Configuration}
\subsection{Firewall access}
Depending on your firewall setup you might be asked on the first start
of GREAT-ER to allow firewall access to "pythonw.exe".
If you allow access, other systems in your network will be able to run
simulations on your system, otherwise you will only be able to run
simulations locally.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/firewall.png}}{
     Windows 7 Firewall configuration dialog.}
\end{center}

\subsection{Automatic Authentication}
You can use GREAT-ER to automatically authenticate to a database when it
is started. This can be useful for local installations where security
is not an issue. By default the GREAT-ER client will try to connect
to the local database "greater" with username and password "greater".
This is the standard database setup if you have installed the PostgreSQL
database with the GREAT-ER installer.

To change this behaviour you can edit the greater shortcuts and change the
command parameters that are used to start the Software.
The format for the login information is:

\begin{center}
username/password@database\_connect\_string \\
Example: "mpowers/Ietoye8e@greater" \\
\end{center}

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/config1.png}}{
     Shortcut preferences with authentication settings}
\end{center}

\newpage
\section{Server Configuration}
GREAT-ER has two components that can run on a server as standalone
applications. The database and the simulation models. Both are independent
of each other and also do not need to run on the same system.

\subsection{Configure database for remote connections}
The PostgreSQL \footnote{\tt http://www.postgresql.org} database
coming with GREAT-ER is configured by default to accept only local
connections.
If you want to run it on a dedicated system you have to configure
the database for remote access.
\begin{center}
\emph{Setting up PosgreSQL for remote access allows connections to your
database and can make your system vulnerable!\\
Please make sure that you use secure passwords.}
\end{center}

To configure your database it is recommended that you use pgadmin3
which is installed by the GREAT-ER PostgreSQL component.
You can find this application under:\\
\textit{c:\textbackslash Program Files\textbackslash GREAT-ER \textbackslash
postgres9\textbackslash bin\textbackslash pgAdmin3.exe}

When launching pgAdminIII you will see one server (localhost:5432)
to which you can connect by double-clicking on its icon.
The default password for the user \emph{greater} is \textit{greater}.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/config4.png}}{
     PostgreSQL Connect to Server}
\end{center}

To change the password to something secure, use the
"$File \rightarrow Change Password$" menu option.

To modify the connection settings for your database you can edit the
Server configuration by choosing
"$Tools \rightarrow Server Configuration \rightarrow pg\_hba.conf$"
and add an entry with the field "IP-Address" set to the Network where you
you want to accept connections from and restart the server afterwards.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/config2.png}}{
     Configure PostgreSQL to accept logins on 192.168.0.0/24 }
\end{center}

There are, of course, multiple options to configure access rights and connections
with PostgreSQL. Please refer to the PostgreSQL Documentation\footnote{\tt 
http://www.postgresql.org/docs/9.0/static} for more information on how
to administrate your database.

\subsection{Simulation server setup}
GREAT-ER has the ability to remotely run simulation calculations.
To run a remote simulation you have to launch the client on the server
and connect it to a database. Once it is connected to a database it will
accept TCP connections on port {\bf 10101} if your firewall rules
allow it.

On the client system you can select "$Simulation \rightarrow Select Simulation Server$"
from the menu to connect to a simulation server on a another machine.

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/config3.png}}{
     Simulation server connection settings}
\end{center}

\subsection{Connect to a remote database}
In the authentication dialog the format to describe a remote database
connection is: \\databasename@ip:port\\

For example:\\
{\bf greater-sediment@192.168.0.2:5432}\\
Would open a connection to the database greater-sediment accepting
connections on port 5432 with the ip-address 192.168.0.2

\chapter{Uninstallation on Microsoft Windows}
To uninstall GREAT-ER you can either use the Microsoft Windows "Software 
Settings" ( Programs and Functions on Windows Vista/7 ) or run the "Uninstall.exe"
located in your Installation Directory.\\
It will start an uninstallation wizard that will allow you to completely
remove GREAT-ER and all of its components. \\

You can select if you also want to uninstall the PostgreSQL Database.\\

{\bf Warning:} This will remove all you local modified data saved sessions and catchments!

\begin{center}
\Fig{\includegraphics[scale=\imagescale]{screenshots/uninstall1.png}}{
     Uninstallation Options.}
\end{center}

\section{Database Setup}

The default database setup after installation includes two databases.

\begin{center}
\begin{tabular}{|c|c|c|}
\hline
Database Name & Default Username & Default Password \\
\hline
greater & greater & greater \\
\hline
greater-sediment & greater & greater \\
\hline
\end{tabular}
\end{center}
\newpage
\renewcommand{\documentID}{gnufdl.tex version 1.2}
\include{gnufdl}
\renewcommand{\documentID}{\CVSId}

\label{theverylastpage}
\end{document}


