WDB Build Guide
Updated 375 Days AgoPublic

Building for Ubuntu/Debian

This is a brief guide to building the WDB system.

Compiling WDB should be fairly simple, if you have the appropriate libraries and systems installed. The following procedure is based on Ubuntu Precise; keep in mind that the code changes faster than this wiki page (edit in new versions as appropriate).

Make sure that you have the latest PostgreSQL versions. We recommend using the PostgreSQL Global Developer Group's own APT repository to ensure you're up to date.

Install the following debian packages:

               
sudo apt-get install g++ make git-core libreadline-dev automake libtool autoconf-archive \
           postgresql-9.5 \ 
           postgresql-server-dev-9.5 postgresql-9.5-postgis-2.2 libpqxx3-dev libboost-dev \ 
           libboost-date-time-dev libboost-program-options-dev libboost-regex-dev \
           libboost-filesystem-dev libboost-thread-dev liblog4cpp5-dev libcppunit-dev \ 
           libgrib-api-dev libproj-dev libglib2.0-dev libgeos-dev xmlto \
           automake libtool autoconf-archive libreadline-dev

Packages from above in a copy-paste friendly format:

sudo apt-get install g++ make git-core libreadline-dev automake libtool autoconf-archive postgresql-9.5 postgresql-server-dev-9.5 postgresql-9.5-postgis-2.2 libpqxx3-dev libboost-dev libboost-date-time-dev libboost-program-options-dev libboost-regex-dev libboost-filesystem-dev libboost-thread-dev liblog4cpp5-dev libcppunit-dev libgrib-api-dev libproj-dev libglib2.0-dev libgeos-dev xmlto automake libtool autoconf-archive libreadline-dev

To build debian packages, you will additionally require:

sudo apt-get install build-essential cdbs debhelper devscripts dpkg-dev po-debconf

To install wdb from the debian package, the following packages are additionally required:

sudo apt-get install proj postgresql-client

You can then download the latest WDB source from:

git clone git@github.com:metno/wdb.git wdb

To get a read-only version of the github repository it is sufficient to have git installed and use the read-only address:

sudo apt-get install git
git clone https://github.com/metno/wdb.git

If you haven't used GitHub before, see Help.GitHub for details on how to connect your system.

Enter the wdb directory, wdb and run:

./autogen.sh

Run configure:

./configure

On trusty, you will instead want to run:

./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu/

Add --prefix=target-dir to install the software under another directory (recommended if you are not root, or doing this for the first time. This will allow you to easily uninstall/delete the WDB system later). For production usage, you will usually want to install as root.

Run make:

make all

This should build the WDB code, assuming everything above has gone to plan. The same procedure can be followed for each of the other WDB packages.

The wdb-libwdbload package (used for loading programs) additionally requires

libboost-system-dev libboost-test-dev

The wdb-gribload package (used for loading programs) additionally requires

bc

The wdb-locationforecastload application requires

cmake libxml++2.6-dev libcurl4-openssl-dev help2man libgtest-dev

The wdb-netcdfload application requires

libfimex-dev libxml2-dev help2man

wdb2ts also requires

libboost-iostreams-dev apache2-threaded-dev

Several projects require

libboost-test-dev

Note that due to bugs within the m4 macros used, libboost-test may often not be flagged correctly as the source of the configure error.

Once you have run make all, you can run the unit tests:

make check

And install the database

make install

Check that the database actually works (this actually installs a separate test database in postgres, and runs a number of checks on it):

make installcheck

Building for CENTOS7/RedHat

This is a step-by-step guide for Centos 7/Redhat.

Updated for Ubuntu Trusty and Postgresql 9.4

Add the pgdg repositories

deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main
deb http://download.virtualbox.org/virtualbox/debian trusty contrib

Install the pgdg credentials

sudo apt-get install pgdg-keyring

Install the debian packages:

sudo apt-get install g++ make git-core libreadline-dev automake libtool autoconf-archive postgresql-9.4 postgresql-server-dev-9.4 postgresql-9.4-postgis libpqxx-dev libboost-dev libboost-date-time-dev libboost-program-options-dev libboost-regex-dev libboost-filesystem-dev libboost-thread-dev liblog4cpp5-dev libcppunit-dev libgrib-api-dev libproj-dev libglib2.0-dev libgeos-dev xmlto automake libtool autoconf-archive libreadline-dev

To build debian packages, you will additionally require:

sudo apt-get install build-essential cdbs debhelper devscripts dpkg-dev po-debconf

To install wdb from the debian package, the following packages are additionally required:

sudo apt-get install proj postgresql-client

You can then download the latest WDB source from:

sudo apt-get install git
git clone https://github.com/metno/wdb.git

If you haven't used GitHub before, see Help.GitHub for details on how to connect your system.

Enter the wdb directory, wdb and run:

./autogen.sh

Run configure:

./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu

boost-libdir is required due to an error in autoconf.archive.

Add --prefix=target-dir to install the software under another directory (recommended if you are not root, or doing this for the first time. This will allow you to easily uninstall/delete the WDB system later). For production usage, you will usually want to install as root.

Run make:

make all

This should build the WDB code, assuming everything above has gone to plan. The same procedure can be followed for each of the other WDB packages.

Last Author
michaeloa
Subscribers
None
Projects
None