Install ADAGUC on KNMI Fedora workstations

Quick install ADAGUCServer

  1. cd # Home dir
  2. git clone
  3. cd ~/adaguc-server
  4. bash
  5. cp ~/adaguc-server/data/cgi-bin/adaguc.testdata.cgi ~/public_html/
  6. chmod +x ~/public_html/adaguc.testdata.cgi
  7. export ADAGUC_TMP=~/tmp/;mkdir -p $ADAGUC_TMP;export ADAGUC_PATH=~/adaguc-server/; ~/adaguc-server/adagucserverEC/adagucserver --updatedb --config "$ADAGUC_PATH/data/config/adaguc.testdata.xml"
  8. ADAGUCServer is now accessible in your webbrowser via:
  9. Set ADAGUC_ONLINERESOURCE in ~/public_html/adaguc.testdata.cgi to this URL.
  10. If you are using a viewer hosted on a different machine, then add the CORS headers (see below)
  11. This URL can be explored in an ADAGUC viewer with access to your host via "Add Layers"->"Add Custom WMS Service"->Enter your URL in the box and press "Enter".
  12. GetMap looks like
  13. Complete!

CORS headers

Add the following lines before the call to adagucserver (which is on the last line)

echo "Access-Control-Allow-Origin: *" 
echo "Access-Control-Allow-Methods: GET" 

Setup autowms

  1. mkdir ~/public_html/adaguc.conf.d
  2. cp "${ADAGUC_PATH}/data/config/adaguc.autoresource.xml" ~/public_html/adaguc.conf.d
  3. Create autowms endpoint in ~/public_html/adaguc.autoresource.cgi
  4. chmod +x ~/public_html/adaguc.autoresource.cgi #
export ADAGUC_PATH=~/adaguc-server/ # Replace with the location where you installed ADAGUC
export ADAGUC_TMP=~/tmp/
HOME=`echo ~`
USER=`basename ${HOME}`

export ADAGUC_CONFIG="${HOME}/public_html/adaguc.conf.d/adaguc.autoresource.xml" 
export ADAGUC_LOGFILE="${ADAGUC_TMP}/adaguc.autoresource.log" 
export ADAGUC_ERRORFILE="${ADAGUC_TMP}/adaguc.autoresource.errlog" 
export ADAGUC_FONT="${ADAGUC_PATH}/data/fonts/FreeSans.ttf" 
export ADAGUC_ONLINERESOURCE="http://${HTTP_HOST}/~${USER}/adaguc.autoresource.cgi?" 

#export LD_LIBRARY_PATH=:$LD_LIBRARY_PATH  # LD_LIBRARY_PATH not needed when netcdf and hdf5 installed through yum.
#export PROJ_LIB=/data/build/share/proj/   # Optional, needed when custom proj.4 library is installed.

echo "Access-Control-Allow-Origin: *" 
echo "Access-Control-Allow-Methods: GET" 


Quick install ADAGUCViewer

  1. cd ~/public_html
  2. git clone
  3. Visit http://<yourmachine><yourusername>/adagucviewer
  4. Complete!

Adjust adagucviewer/config.js to add your own services, or just use "Add Layers"->"Add Custom WMS Service"->Enter your URL in the box and press "Enter".

Setup postgresql - only needed when having problems with sqlite:

1) In your bash resource file edit the PGDATA environment variable to point to a directory of your choice:

edit file: ~/.bashrc

 export PGDATA=${HOME}/postgresdb 

2) Initialize the database by executing the program initdb


3) The database is running as local user, some settings need to be changed for this in:

edit file: ${PGDATA}/postgresql.conf


4) Start the database server

pg_ctl -D $PGDATA -l $PGDATA/log start

5) Create a database

createdb adagucdb -h localhost