\subsection{Artifact-Server}
Aim/Task: see above

\subsubsection*{Installation}
Running the server with its own user: 
  \verb+ # adduser artifacts+

Prepare infrastructure for logging
\begin{lstlisting}
  cd /var/log
  mkdir artifacts
  chmod 770 artifacts
  chmod g+s artifacts
\end{lstlisting}

Integrate software of artefact-server into filesystem
  cd /opt
  tar xfvj /root/artifact-server-\$VERSION.tar.bz2
  ln -s artifact-server-\$VERSION artifact-server
  cd artifact-server

Setting the access rights
   bin/setup.sh

Configure connection to database
  cd /opt/artefact-server
  vim conf/arcsdeconnectionpool.properties
  
  in conf/arcsdeconnectionpool.properties do:
  \begin{lstlisting}
  server=xyz.server.com
  username=guest
  credentials=XYZ
  port=5151
  database=esri_sde
  \end{lstlisting}

Configure address for finding the WMS-Server
% FIXME

Configure secret for signing artifacts
% FIXME

Adapt TCP-port of artefact-server
  cd /opt/artefact-server
  vim conf/conf.xml
  
  in conf.conf.xml:
  adapt value of the element \verb+ rest-server/port+ (default: 8181)

Integrate Artefact-Server in Init-Process of Operating System
  mv /opt/artefact-server/bin/debian/artefact-server /etc/init.d/
  cd /etc/init.d
  chmod +x artifact-server
  update-rc.d artifact-server defaults

FIXME: Setting up credential for signing project files.

The installation of the artefact-server is finished. It can be tested
now.

\subsubsection*{Test of the Installation}
  Start the server:
  /etc/init.d/artefact-server start
  
  1. Operating System: Check if the process of the server is running
  \verb+jps+
  
  list of java processes:
  \begin{lstlisting}
  19252
  19509 Jps
  19441 App
  \end{lstlisting}

  \verb+ cat /var/run/artefact-server+

  Task: Compare the running process numbers

  2. Network: Check if the artefact-server opens a TCP-port (default: 8181)
  netstat -nltp
  
  Check for an entry like
  tcp        0      0 127.0.0.1:8181          0.0.0.0:*  LISTEN      18648/java

  3. Artefact-Server ready for communication with client
  wget -qO- http://localhost:8181/factories
  
  Task: Check for a XML-document describing a possible FIS


\subsubsection*{Deinstallation}
  Stop server process:
  /etc/init.d/artefact-server stop
  
  Remove integration in INIT-process:
  rm -fi /etc/init.d/artefact-server
  update-rc.d artefact-server remove

  Remove Binaries, Configuration, Caches, Artefact-Database:
  rm -rfi /opt/artefact-server
  rm -rfi /opt/artefact-server-\$VERSION

  Remove logging directories
  rm -rfi /var/log/artifacts
