Intro
ADAGUC is a WMS-based implementation, made by KNMI.
For more information on ADAGUC please visit KNMI's ADAGUC pages http://dev.knmi.nl/projects/adaguc
ADAGUC consists of
- a server part
- a client/viewer part
This Tech Note describes how to setup ADAGUC on CentOS 6.4 Linux.
ADAGUC Server setup
CentOS (http://www.centos.org) is based on the same sources as Red Hat Enterprise Linux.
KNMI describes installation on Red Hat Linux here: http://dev.knmi.nl/projects/adagucserver/wiki/Installation
This recipe has been followed. In short it is repeated here.
Note: unless otherwise stated, the commands are (Bash) shell commands.
Setup prerequisites
- Verify yum configuration for EPEL repository:
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="51aea317-789e-4e33-972d-0cbad787a501"><ac:plain-text-body><![CDATA[
[mylocalhost]# yum repolist
]]></ac:plain-text-body></ac:structured-macro>
- Install from EPEL repository (compiling netcdf and hdf5 is not needed in this case):
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c0e25ed4-5551-42c1-ae2b-1f0a61ed714c"><ac:plain-text-body><![CDATA[
[mylocalhost]# yum install gcc gcc-c++ mercurial libpng-devel zlib-devel libxml2-devel gd-devel netcdf-devel hdf5-devel proj-devel postgresql-devel udunits2-devel gdal-devel cairo-devel httpd postgresql-server
]]></ac:plain-text-body></ac:structured-macro>
Note: somehow this install was not completed successfully because later on the compiler complained about missing dependencies. I just re-executed this yum install (with all packges listed) and after that all worked fine.
Compile ADAGUC server
- Setup a directory structure for ADAGUC in /opt:
/opt/adagucviewer
stores ADAGUC client/viewer related files and components
/opt/services
stores ADAGUC server runtime related configuration, logs and optionally data
/opt/software
tree with ADAGUC server source files; should not be present on a production environment
CentOS has a default Apache installation and this will be used for ADAGUC. Hence all files and directories involved are assigned explicitly to OS-user apache and OS-group apache (apache:apache).
- get ADAGUC server source components from KNMI's Mercurial repository:
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="e67038b1-79f5-4883-9949-f898137e6e4e"><ac:plain-text-body><![CDATA[
[mylocalhost]# hg clone http://dev.knmi.nl/hg/adagucserver /opt/adaguc/software
]]></ac:plain-text-body></ac:structured-macro>
- start compile by executing compile.sh from /opt/adaguc/software directory. It could be necessary to set the executbale flag first:
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ab05381e-028e-4072-bcbf-03694d53577c"><ac:plain-text-body><![CDATA[
[mylocalhost]# chmod +x compile.sh
]]></ac:plain-text-body></ac:structured-macro>
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="d2223e8a-d6ee-4f6a-a537-66942eef10de"><ac:plain-text-body><![CDATA[
[mylocalhost]# ./compile.sh
]]></ac:plain-text-body></ac:structured-macro>
The compilation results in a binary in the /opt/ADAGUC/software/adagucserverEC directory.
Apache setup
ADAGUC server requires a Web Sever. The ADAGUC server operates as a CGI-bin executable, triggered by the Web Server. CentOS has the Apache Web Server installed by default.
- mod_php installation
The ADAGUC viewer uses some PHP scripts. For this the Apache mod_php is needed. This is not installed by default on CentOS. To install:<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="bfa0e21c-aa9e-4ce9-9fdd-bf09c4401a78"><ac:plain-text-body><![CDATA[
[mylocalhost]# yum install mod_php
]]></ac:plain-text-body></ac:structured-macro>
- apache config
PostgreSQL setup
ADAGUC server requires a PostgreSQL RDBMS. PostgreSQL is not installed yet on CentOS.