Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wdb:manuals:wdb [2012-04-04 13:16:37] michaeloa |
wdb:manuals:wdb [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
Line 46: | Line 46: | ||
At its core, the WDB system consists of a database management server (built on the PostgreSQL DBMS), a number of utilities for maintenance and data loading, and a function interface for data extraction. We refer to the data loading utilities as loading programs and the data extraction interface as the WDB Call Interface (WCI). The figure below illustrates the relation of the different components of WDB. | At its core, the WDB system consists of a database management server (built on the PostgreSQL DBMS), a number of utilities for maintenance and data loading, and a function interface for data extraction. We refer to the data loading utilities as loading programs and the data extraction interface as the WDB Call Interface (WCI). The figure below illustrates the relation of the different components of WDB. | ||
- | {{: | + | {{wdb: |
We refer to the WDB data model together with the WDB Call Interface as the WDB core. This comprises the data storage components of the database along with the interface to read and write data. The WDB Call Interface (WCI) is essentially a database module that provides the application developer or user with a function-based interface that can be used to extract data from WDB. This function interface is accessible through SQL, which means that any programming language capable of querying a PostgreSQL database can access data through WCI; at least in theory. Users of a WDB database never access the tables or views of the database directly; all access goes through WCI functionality. | We refer to the WDB data model together with the WDB Call Interface as the WDB core. This comprises the data storage components of the database along with the interface to read and write data. The WDB Call Interface (WCI) is essentially a database module that provides the application developer or user with a function-based interface that can be used to extract data from WDB. This function interface is accessible through SQL, which means that any programming language capable of querying a PostgreSQL database can access data through WCI; at least in theory. Users of a WDB database never access the tables or views of the database directly; all access goes through WCI functionality. | ||
Line 56: | Line 56: | ||
==== Installation ==== | ==== Installation ==== | ||
- | Before you can use WDB, you need to install it. If you are not sure whether WDB is available on your site, or whether you can use it for your needs, you can install it yourself. WDB can be installed by any unprivileged user; superuser (root) access is not required (though some database privileges are required). If you are installing WDB yourself from a source package, then refer to Section [[# | + | Before you can use WDB, you need to install it. If you are not sure whether WDB is available on your site, or whether you can use it for your needs, you can install it yourself. WDB can be installed by any unprivileged user; superuser (root) access is not required (though some database privileges are required). If you are installing WDB yourself from a source package, then refer to Section [[# |
=== Checking the Configuration === | === Checking the Configuration === | ||
Line 62: | Line 62: | ||
If your site administrator has not set WDB up in a default way, you may have a little work to do checking and setting up your environment variables. If WDB has been installed correctly, you should have access to the wdbConfiguration utility. This can be used to verify the configuration of your system. | If your site administrator has not set WDB up in a default way, you may have a little work to do checking and setting up your environment variables. If WDB has been installed correctly, you should have access to the wdbConfiguration utility. This can be used to verify the configuration of your system. | ||
- | %& | + | > wdbConfiguration |
- | database = mywdb | + | database = mywdb |
- | host = localhost | + | host = localhost |
- | port = 5432 | + | port = 5432 |
- | user = myuser | + | user = myuser |
This tells you what the default connection information of your WDB database is assumed to be. If these are incorrect, you can change your settings by editing the wdb.conf.ex file installed in the WDB data directory (usually / | This tells you what the default connection information of your WDB database is assumed to be. If these are incorrect, you can change your settings by editing the wdb.conf.ex file installed in the WDB data directory (usually / | ||
Line 72: | Line 72: | ||
If you are unsure as to whether the connection information is correct, run: | If you are unsure as to whether the connection information is correct, run: | ||
- | %& | + | |
wdb runs the administrative interface to a WDB database. Like all WDB utilities, it will attempt to connect to the database using the connection information stored in your wdb.conf file, unless alternative connection parameters are given on the command line. If the wdb utility is unable to connect to the database, something is wrong with your connection options. Check whether your database server is running. If the database server is down, then obviously you can not connect to it. Otherwise, you may need to consult your site administrator (or if that is you) the PostgreSQL documentation to make sure that your database environment is set up correctly. | wdb runs the administrative interface to a WDB database. Like all WDB utilities, it will attempt to connect to the database using the connection information stored in your wdb.conf file, unless alternative connection parameters are given on the command line. If the wdb utility is unable to connect to the database, something is wrong with your connection options. Check whether your database server is running. If the database server is down, then obviously you can not connect to it. Otherwise, you may need to consult your site administrator (or if that is you) the PostgreSQL documentation to make sure that your database environment is set up correctly. | ||
Line 78: | Line 78: | ||
==== Upgrading ==== | ==== Upgrading ==== | ||
- | It is possible to upgrade WDB without deleting the data currently residing in the database using the upgrade scripts. Currently, the system | + | Since version 1.2.0, it should be possible to upgrade WDB without deleting the data currently residing in the database using the upgrade scripts. Currently, the system |
Note that there is never any guarantee for upgrades from one major upgrade to the next. For these upgrade, a full install is assumed. | Note that there is never any guarantee for upgrades from one major upgrade to the next. For these upgrade, a full install is assumed. | ||
- | It is strongly recommended to ensure that you have a recent backup of your database before upgrading the system. | + | It is strongly recommended to ensure that you have a recent backup of your database before upgrading the system. |
To upgrade from a source package, you can run the following commands from your build directory: | To upgrade from a source package, you can run the following commands from your build directory: | ||
- | %& | + | > ./ |
- | | + | > |
- | | + | > |
WDB can also be upgraded using the upgrade functionality from Debian packages. | WDB can also be upgraded using the upgrade functionality from Debian packages. | ||
Line 102: | Line 102: | ||
The gribLoad utility is used to load GRIB files into the database. It takes as input the name of the file(s) as well as a number of options, decodes the GRIB file using the cross-reference metadata for GRIB in WDB, and stores the fields from the GRIB file in WDB. The GRIB loading program is invoked by typing gribLoad and the filename from the command line. | The gribLoad utility is used to load GRIB files into the database. It takes as input the name of the file(s) as well as a number of options, decodes the GRIB file using the cross-reference metadata for GRIB in WDB, and stores the fields from the GRIB file in WDB. The GRIB loading program is invoked by typing gribLoad and the filename from the command line. | ||
- | %& | + | > gribLoad myfile.grib |
This loads the GRIB file myfile.grib into the WDB database using the default parameters for the gribLoad utility. If the database configuration is not the default, you will want to specify the correct configuration using the available options. For example: | This loads the GRIB file myfile.grib into the WDB database using the default parameters for the gribLoad utility. If the database configuration is not the default, you will want to specify the correct configuration using the available options. For example: | ||
- | %& | + | > gribLoad -d mywdb -u myuser -p 5433 myfile.grib |
This loads the GRIB file into the database " | This loads the GRIB file into the database " | ||
Line 112: | Line 112: | ||
Note that the gribLoad utility works together with wildcards. For example, you could use the command: | Note that the gribLoad utility works together with wildcards. For example, you could use the command: | ||
- | %& | + | > gribLoad *.grib |
This would load every file in the current directory with the " | This would load every file in the current directory with the " | ||
Line 126: | Line 126: | ||
To retrieve data from WCI through SQL, you need to understand three (two) functions: | To retrieve data from WCI through SQL, you need to understand three (two) functions: | ||
- | wci.begin | + | == wci.begin |
The wci.begin function call " | The wci.begin function call " | ||
- | mywdb=# select wci.begin(' | + | |
+ | |||
+ | This functionality may be deprecated in a future version of the database. | ||
- | wci.read | + | == wci.read |
The wci.read call is the key function call in the WCI used to retrieve data from the database. In WDB, data is classified by a number of dimensions; the dataprovider (the source that provided the data), the location of the data (and what geographical interpolation to use), the reference time (time of reference for the data), the valid time (the time for which the data is valid), the value parameter (the "MHO parameter" | The wci.read call is the key function call in the WCI used to retrieve data from the database. In WDB, data is classified by a number of dimensions; the dataprovider (the source that provided the data), the location of the data (and what geographical interpolation to use), the reference time (time of reference for the data), the valid time (the time for which the data is valid), the value parameter (the "MHO parameter" | ||
Line 164: | Line 167: | ||
The wci.read call permits great flexibility in the specification of queries, allowing the user to extract individual records in the database or thousands of records. Data can also be extracted as points (as above), or entire fields of data. | The wci.read call permits great flexibility in the specification of queries, allowing the user to extract individual records in the database or thousands of records. Data can also be extracted as points (as above), or entire fields of data. | ||
- | wci.end | + | == wci.end |
The wci.end call " | The wci.end call " | ||
- | mywdb=# select wci.end( ); | + | |
- | + | ||
- | For a more thorough description of the functionality in the WDB Call Interface, consult the WCI User Manual. | + | |
- | ===== Chapter�3.�Installation ===== | + | For a more thorough description of the functionality in the WDB Call Interface, consult the [[manuals: |
- | **Table of Contents** | + | This function will be deprecated in future. |
- | [[# | + | ===== Installation |
- | ===== Quick Start ===== | + | ==== Quick Start ==== |
The quick way to install the WDB system is simply to do the following (this requires that your system has all of the prerequisites for the WDB system installed and operational). | The quick way to install the WDB system is simply to do the following (this requires that your system has all of the prerequisites for the WDB system installed and operational). | ||
- | Retrieve version | + | Retrieve |
- | %& | + | > ./ |
- | | + | > ./ |
- | | + | > |
+ | > | ||
- | The rest of this chapter | + | If you have everything in place, this will build and install WDB. The rest of this section |
- | ===== Requirements | + | ==== Requirements ==== |
- | In general, WDB should be possible to run on any modern, Unix-compatible platform that is capable of running PostgreSQL. However, it has only tested on platforms as described in Section [[# | + | In general, WDB should be possible to run on any modern, Unix-compatible platform that is capable of running PostgreSQL. However, it has only tested on platforms as described in Supported |
+ | |||
+ | === Required Packages === | ||
The following software packages are required for building WDB: | The following software packages are required for building WDB: | ||
- | GNU make | + | == Unpackaging software == |
- | GNU make or another, compatible, make program | + | GNU tar or similar archiving software able to handle tar.gz files is required |
- | C++ Compiler | + | == C++ Compiler |
- | You need an ISO/ANSI C++ compiler. We recommend a recent version of GCC, but WDB should compile with most variants of compilers. | + | You need an ISO/ANSI C++ compiler. We recommend a recent version of gcc or g++, but WDB should compile with most variants of compilers. |
- | GNU tar | + | == GNU make == |
- | GNU tar or similar archiving software able to handle tar.gz files is required | + | GNU make or another, compatible, make program |
+ | |||
+ | == Gnu automake and libtool == | ||
+ | |||
+ | WDB is built using the GNU autoconf/ | ||
- | GNU sed | + | == GNU sed == |
GNU sed version 4.1.5 or later is used for performing text transformations on the WDB system files. If you need to get a GNU package, you can find it at your local GNU mirror site (see [[http:// | GNU sed version 4.1.5 or later is used for performing text transformations on the WDB system files. If you need to get a GNU package, you can find it at your local GNU mirror site (see [[http:// | ||
- | GNU readline | + | == GNU readline |
GNU readline version 5.x or later is used for handling of command line inputs in the WDB administration tools. If you need to get a GNU package, you can find it at your local GNU mirror site (see [[http:// | GNU readline version 5.x or later is used for handling of command line inputs in the WDB administration tools. If you need to get a GNU package, you can find it at your local GNU mirror site (see [[http:// | ||
- | PostgreSQL | + | == GLib == |
- | You must have access to a PostgreSQL 8.1.x (or later version) server, to be able to install a WDB server. WDB utilizes the pg_config utility to retrieve information about your installed version of PostgreSQL, so take care to ensure the right version of pg_config is in your path if you have multiple versions of the database server installed. If you need to download PostgreSQL, see [[http:// | + | GLib version 2.24.0 or later is used for compiling |
- | PostGIS | + | == PostgreSQL == |
+ | |||
+ | You must have access to a PostgreSQL 8.4.x (or later version) server, to be able to install a WDB server. WDB utilizes the pg_config utility to retrieve information about your installed version of PostgreSQL, so take care to ensure the right version of pg_config is in your path if you have multiple versions of the database server installed. If you need to download PostgreSQL, see [[http:// | ||
+ | |||
+ | == PostGIS | ||
PostGIS 1.1.x or later is used for the geographical objects stored in WDB. The WDB installation scripts utilize pg_config to determine the location of the PostGIS scripts, so care should be taken that PostGIS is installed correctly (i.e., in the SHAREDIR of PostgreSQL; this installation is however not consistent across all versions of PostgreSQL and PostGIS). If you need to download PostGIS, see http:// | PostGIS 1.1.x or later is used for the geographical objects stored in WDB. The WDB installation scripts utilize pg_config to determine the location of the PostGIS scripts, so care should be taken that PostGIS is installed correctly (i.e., in the SHAREDIR of PostgreSQL; this installation is however not consistent across all versions of PostgreSQL and PostGIS). If you need to download PostGIS, see http:// | ||
- | Boost | + | == Geos == |
+ | |||
+ | Geos 3.1.x or later is used for the handling of shapes and points that are done in the WDB source code. | ||
+ | |||
+ | == Proj == | ||
+ | |||
+ | Proj 4.6.x or later is used for the geographical transformations that are done in the WDB source code. | ||
+ | |||
+ | == Boost == | ||
Boost libraries version 1.33.1 or later are required to compile a number of the programs in WDB. Boost can be downloaded from [[http:// | Boost libraries version 1.33.1 or later are required to compile a number of the programs in WDB. Boost can be downloaded from [[http:// | ||
- | Log4Cpp | + | == Log4Cpp |
- | Log for C++ (Log4Cpp) 1.0.x or later is utilized for the logging functionality in WDB. It can be downloaded from [[http:// | + | Log for C++ (Log4Cpp) 1.0.0 or later is utilized for the logging functionality in WDB. It can be downloaded from [[http:// |
+ | |||
+ | == pkg-config == | ||
+ | |||
+ | Package used to manage compile and link flags for libraries. | ||
+ | |||
+ | == xmlto == | ||
+ | |||
+ | xmlto is used to build the documentation of the WDB project. | ||
+ | |||
+ | === Optional Packages === | ||
The following software packages are optional. It is possible to compile WDB without these packages, but certain options will then be disabled, as explained below. | The following software packages are optional. It is possible to compile WDB without these packages, but certain options will then be disabled, as explained below. | ||
- | CppUnit | + | == CppUnit |
CppUnit version 1.x.x or later is used for the unit tests of WDB and some of the installation and performance test programs. WDB can be compiled, installed and run without these programs, but the tests will be unavailable without this package. CppUnit can be downloaded from [[http:// | CppUnit version 1.x.x or later is used for the unit tests of WDB and some of the installation and performance test programs. WDB can be compiled, installed and run without these programs, but the tests will be unavailable without this package. CppUnit can be downloaded from [[http:// | ||
- | |||
- | You may wish to verify that you have sufficient disk space. The compiled source for WDB requires approximately 120 MB and an empty PostgreSQL installation with WDB can rapidly take up to 200 MB of disk space (more if installation tests are run). | ||
==== Supported Platforms ==== | ==== Supported Platforms ==== | ||
- | Currently, WDB is only extensively tested on Ubuntu | + | Currently, WDB is only extensively tested on Ubuntu |
- | You can examine the systems against which WDB is currently being tested (and thus supports) by checking the [[http:// | + | You can examine the systems against which WDB is currently being tested (and thus supports) by checking the WDB buildbot |
- | ===== Installation Procedure | + | You may wish to verify that you have sufficient disk space. The compiled source for WDB requires approximately 120 MB and an empty PostgreSQL installation with WDB can rapidly take up to 200 MB of disk space (more if installation tests are run). |
+ | |||
+ | ==== Installation Procedure ==== | ||
The first step of the installation procedure is to retrieve and unpack the source files for WDB. Once this has been done, you can configure the package. | The first step of the installation procedure is to retrieve and unpack the source files for WDB. Once this has been done, you can configure the package. | ||
- | ==== Configuration ==== | + | === Configuration === |
+ | |||
+ | First, you will need to configure the source tree for your system and select your build options.This is done by building and running the configure script. To build the configure script (if it is not already built), run: | ||
+ | |||
+ | > ./ | ||
- | First, you will need to configure the source tree for your system and select your build options.This is done by running | + | This will build the configure script. For a default installation simply enter: |
- | ./configure | + | > ./configure |
This script will run a number of tests to guess values for various system dependent variables, detect quirks of your operating system, and finally will create several files in the build tree to record what it found. (You can also run configure in a directory outside the source tree if you want to keep the build directory separate). Once the script has completed running, it will print out the settings for your system. | This script will run a number of tests to guess values for various system dependent variables, detect quirks of your operating system, and finally will create several files in the build tree to record what it found. (You can also run configure in a directory outside the source tree if you want to keep the build directory separate). Once the script has completed running, it will print out the settings for your system. | ||
Line 262: | Line 296: | ||
You can customize the build and installation process by supplying one or more of the following command line options to configure: | You can customize the build and installation process by supplying one or more of the following command line options to configure: | ||
- | --prefix=PREFIX | + | == --prefix=PREFIX |
Install all files under the directory PREFIX instead of /usr/local. The actual files will be installed into various subdirectories; | Install all files under the directory PREFIX instead of /usr/local. The actual files will be installed into various subdirectories; | ||
Line 270: | Line 304: | ||
To install WDB in a local directory (as you must, if you do not have root access), you could use: | To install WDB in a local directory (as you must, if you do not have root access), you could use: | ||
- | | + | |
- | --exec-prefix=EXEC-PREFIX | + | == --exec-prefix=EXEC-PREFIX |
You can install architecture-dependent files under a different prefix, EXEC-PREFIX, | You can install architecture-dependent files under a different prefix, EXEC-PREFIX, | ||
- | --bindir=DIRECTORY | + | == --bindir=DIRECTORY |
This specifies the directory for executable programs. The default is EXEC-PREFIX/ | This specifies the directory for executable programs. The default is EXEC-PREFIX/ | ||
- | --datadir=DIRECTORY | + | == --datadir=DIRECTORY |
This specifies the directory for read-only data files used by the installed programs. The default is PREFIX/ | This specifies the directory for read-only data files used by the installed programs. The default is PREFIX/ | ||
- | --sysconfdir=DIRECTORY | + | == --sysconfdir=DIRECTORY |
This specifies the directory for various configuration files, PREFIX/etc by default. | This specifies the directory for various configuration files, PREFIX/etc by default. | ||
- | --libdir=DIRECTORY | + | == --libdir=DIRECTORY |
This specifies the location to install libraries and dynamically loadable modules. The default is EXEC-PREFIX/ | This specifies the location to install libraries and dynamically loadable modules. The default is EXEC-PREFIX/ | ||
- | --includedir=DIRECTORY | + | == --includedir=DIRECTORY |
This specifies the directory for installing C and C++ header files. The default is PREFIX/ | This specifies the directory for installing C and C++ header files. The default is PREFIX/ | ||
- | --mandir=DIRECTORY | + | == --mandir=DIRECTORY |
The man pages that come with WDB will be installed under this directory, in their respective manx subdirectories. The default is PREFIX/man. | The man pages that come with WDB will be installed under this directory, in their respective manx subdirectories. The default is PREFIX/man. | ||
Line 302: | Line 336: | ||
If configure is having difficulty finding a particular library or supporting component, you can assist it by asking it to search a particular path. | If configure is having difficulty finding a particular library or supporting component, you can assist it by asking it to search a particular path. | ||
- | --with-pgsql=DIRECTORY | + | == --with-pgsql=DIRECTORY |
This specifies the directory into which PostgreSQL is installed (by default, WDB searches your PATH environment variable). WDB is searching for the pg_config application and will search DIRECTORY/ | This specifies the directory into which PostgreSQL is installed (by default, WDB searches your PATH environment variable). WDB is searching for the pg_config application and will search DIRECTORY/ | ||
- | --with-postgis=DIRECTORY | + | == --with-postgis=DIRECTORY |
This specifies the directory into which Postgis installs its SQL setup files (lwpostgis.sql and spatial_ref_sys.sql). By default, this should be the location used for architecture-independent support files by PostgreSQL, given by " | This specifies the directory into which Postgis installs its SQL setup files (lwpostgis.sql and spatial_ref_sys.sql). By default, this should be the location used for architecture-independent support files by PostgreSQL, given by " | ||
- | --with-gribapi=DIRECTORY | + | == --with-boost=DIRECTORY |
- | + | ||
- | This specifies the directory into which the ECMWF GRIB API has been installed. If set, WDB will add DIRECTORY/ | + | |
- | + | ||
- | --with-boost=DIRECTORY | + | |
This specifies the directory into which Boost has been installed. If set, WDB will add DIRECTORY/ | This specifies the directory into which Boost has been installed. If set, WDB will add DIRECTORY/ | ||
- | --with-boost-date-time=LIBNAME | + | == --with-boost-date-time=LIBNAME |
WDB uses the date-time library of Boost. By setting this option, you can instruct the linker to utilize a specific version of the library; e.g. | WDB uses the date-time library of Boost. By setting this option, you can instruct the linker to utilize a specific version of the library; e.g. | ||
- | --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 | + | |
- | --with-boost-regex=LIBNAME | + | == --with-boost-regex=LIBNAME |
WDB uses the regex library of Boost. By setting this option, you can instruct the linker to utilize a specific version of the library; e.g. | WDB uses the regex library of Boost. By setting this option, you can instruct the linker to utilize a specific version of the library; e.g. | ||
- | --with-boost-regex=boost_regex-gcc-mt-d-1_33_1 | + | |
- | --with-proj=DIRECTORY | + | == --with-proj=DIRECTORY |
This specifies the directory into which Proj has been installed. If set, WDB will add DIRECTORY/ | This specifies the directory into which Proj has been installed. If set, WDB will add DIRECTORY/ | ||
- | --with-cppunit-prefix=DIRECTORY | + | == --with-cppunit-prefix=DIRECTORY |
This specifies the directory into which the cppunit-config application has been installed (by default, WDB searches your PATH environment variable). CppUnit is an optional module; it is only required for the compilation of the test framework. | This specifies the directory into which the cppunit-config application has been installed (by default, WDB searches your PATH environment variable). CppUnit is an optional module; it is only required for the compilation of the test framework. | ||
- | --with-cppunit-exec-prefix=DIRECTORY | + | == --with-cppunit-exec-prefix=DIRECTORY |
This specifies the directory into which the cppunit-config application has been installed (by default, WDB searches your PATH environment variable). CppUnit is an optional module; it is only required for the compilation of the test framework. | This specifies the directory into which the cppunit-config application has been installed (by default, WDB searches your PATH environment variable). CppUnit is an optional module; it is only required for the compilation of the test framework. | ||
- | --with-docbook=DIRECTORY | + | == --with-docbook=DIRECTORY |
This specifies the directory into which the docbook processor used by WDB, xmlto, is installed (by default, WDB searches your PATH environment variable). If DIRECTORY is set, configure will in addition search through DIRECTORY/ | This specifies the directory into which the docbook processor used by WDB, xmlto, is installed (by default, WDB searches your PATH environment variable). If DIRECTORY is set, configure will in addition search through DIRECTORY/ | ||
- | --with-kvalobsLoad | + | == Environment Variable == |
- | + | ||
- | This option specifies whether the kvalObsLoad daemon should be compiled and installed. This requires that the compiler have access to the kvalObs libraries. By default, kvalObsLoad is not compiled. | + | |
If you prefer a C++ compiler different from the one configure picks, you can set the environment variable CXX to the program of your choice. By default, configure will pick gcc if available, else the platform' | If you prefer a C++ compiler different from the one configure picks, you can set the environment variable CXX to the program of your choice. By default, configure will pick gcc if available, else the platform' | ||
Line 354: | Line 382: | ||
You can specify environment variables on the configure command line, for example: | You can specify environment variables on the configure command line, for example: | ||
- | | + | |
The following are the significant variables that can be set in this manner: | The following are the significant variables that can be set in this manner: | ||
- | CC | + | * CC = The C compiler |
+ | * CXX = The C++ compiler | ||
+ | * CPPFLAGS = Options to pass to the C/C++ compiler | ||
+ | * LDFLAGS = Options to pass to the linker | ||
+ | * PKG_CONFIG = The path to the pkg_config utility. | ||
- | The C compiler | + | === Build === |
- | + | ||
- | CXX | + | |
- | + | ||
- | The C++ compiler | + | |
- | + | ||
- | CPPFLAGS | + | |
- | + | ||
- | Options to pass to the C/C++ compiler | + | |
- | + | ||
- | LDFLAGS | + | |
- | + | ||
- | Options to pass to the linker | + | |
- | + | ||
- | PKG_CONFIG | + | |
- | + | ||
- | The path to the pkg_config utility. | + | |
- | + | ||
- | ==== Build ==== | + | |
To build WDB, run: | To build WDB, run: | ||
- | | + | |
A cup of coffee around now might be appropriate, | A cup of coffee around now might be appropriate, | ||
- | ==== Installing ==== | + | === Installing === |
- | + | ||
- | In general, you should not try to install new files over an old installation; | + | |
To install WDB, verify that your database server is running, and then enter: | To install WDB, verify that your database server is running, and then enter: | ||
- | %& | + | > make install |
This will install files into the directories that were specified during configuration. Ensure that you have appropriate permissions to write into that area (if this is /usr/local, you will normally have to do this step as root). Alternatively, | This will install files into the directories that were specified during configuration. Ensure that you have appropriate permissions to write into that area (if this is /usr/local, you will normally have to do this step as root). Alternatively, | ||
Line 400: | Line 412: | ||
Note that installation, | Note that installation, | ||
- | ==== Testing | + | === Testing === |
If you want to test the newly built system that you just installed, you can run the regression test suite. This involves two parts: the unit tests (which can be run prior to the installatuion) and the installation tests. The test suite can be used to verify that WDB runs on your system the way the developers expected it to. Type: | If you want to test the newly built system that you just installed, you can run the regression test suite. This involves two parts: the unit tests (which can be run prior to the installatuion) and the installation tests. The test suite can be used to verify that WDB runs on your system the way the developers expected it to. Type: | ||
- | %& | + | > make check installcheck |
- | ==== Uninstallation | + | === Uninstallation === |
To undo the installation, | To undo the installation, | ||
- | %& | + | > make uninstall |
Note, however that this will not remove directories created by the installation. | Note, however that this will not remove directories created by the installation. | ||
- | ==== Cleaning | + | === Cleaning === |
After the installation, | After the installation, | ||
- | %& | + | > make clean |
This will preserve the files made by the configure program, so you will still be able to run make later on. To clean out everything, use: | This will preserve the files made by the configure program, so you will still be able to run make later on. To clean out everything, use: | ||
- | %& | + | > make distclean |
If you perform a build and discover that your configure options were wrong, you changed some option that WDB utilizes (e.g., upgraded software), or you need to build for several platforms using the same source tree, it can be a good idea to use distclean before reconfiguring and building. | If you perform a build and discover that your configure options were wrong, you changed some option that WDB utilizes (e.g., upgraded software), or you need to build for several platforms using the same source tree, it can be a good idea to use distclean before reconfiguring and building. | ||
- | ===== Chapter�4.�System | + | ===== System |
- | + | ||
- | **Table of Contents** | + | |
- | + | ||
- | [[# | + | |
In the following sections, we describe the system administration functionality that is available with WDB. | In the following sections, we describe the system administration functionality that is available with WDB. | ||
Line 436: | Line 444: | ||
The generic administration utility of the WDB system is the wdb utility. | The generic administration utility of the WDB system is the wdb utility. | ||
- | %& | + | > wdb |
This will bring up the wdb command line interface. From this interface, the user can type ' | This will bring up the wdb command line interface. From this interface, the user can type ' | ||
Line 442: | Line 450: | ||
The wdb utility can also be invoked directly from the command line. Thus: | The wdb utility can also be invoked directly from the command line. Thus: | ||
- | %& | + | > wdb help |
This will print out a list of the available commands and exit the utility. | This will print out a list of the available commands and exit the utility. | ||
- | ===== User Management | + | ==== User Management ==== |
User management in WDB is implemented on top of the user authentication in PostgreSQL. By default, PostgreSQL is usually set up to accept local connections using the ' | User management in WDB is implemented on top of the user authentication in PostgreSQL. By default, PostgreSQL is usually set up to accept local connections using the ' | ||
Line 454: | Line 462: | ||
WDB users can belong to one or more of three different groups: wdb_admin, wdb_read, and wdb_write. | WDB users can belong to one or more of three different groups: wdb_admin, wdb_read, and wdb_write. | ||
- | wdb_admin | + | == wdb_admin |
This is the administrator/ | This is the administrator/ | ||
- | wdb_read | + | == wdb_read |
This is the default user group for WDB users. It allows the user to read data from the database through WCI functions. | This is the default user group for WDB users. It allows the user to read data from the database through WCI functions. | ||
- | wdb_write | + | == wdb_write |
This is the user group that one must belong to in order to be able to load data into the database using the WCI functions or the loading programs. The WDB user that runs the loading programs must belong to the wdb_write group. | This is the user group that one must belong to in order to be able to load data into the database using the WCI functions or the loading programs. The WDB user that runs the loading programs must belong to the wdb_write group. | ||
Line 470: | Line 478: | ||
The wdb utility can be utilized to create, drop, or modify WDB users. | The wdb utility can be utilized to create, drop, or modify WDB users. | ||
- | %& | + | > wdb createuser mywdbuser |
This will create a user, ' | This will create a user, ' | ||
- | %& | + | > wdb createuser mywdbuser write noread |
To drop a user, replace the command as appropriate: | To drop a user, replace the command as appropriate: | ||
- | %& | + | > wdb dropuser mywdbuser |
It is also possible to change a users attributes after they have been created. To do so, use the ' | It is also possible to change a users attributes after they have been created. To do so, use the ' | ||
- | %& | + | > wdb changeuser mywdbuser write read |
This gives ' | This gives ' | ||
- | ===== Data Description ===== | + | ===== Data Description ====? |
The community at which WDB is directed (meteorology, | The community at which WDB is directed (meteorology, | ||
Line 498: | Line 506: | ||
Of these many dimensions, four require some maintenance of the metadata in the database. | Of these many dimensions, four require some maintenance of the metadata in the database. | ||
- | ==== Data Provider | + | === Data Provider === |
The Data Provider of a data value, represents the source closest to the creation of the data that we can identify from the database. In order to load data into the database, the data source should be represented in the metadata of the database. | The Data Provider of a data value, represents the source closest to the creation of the data that we can identify from the database. In order to load data into the database, the data source should be represented in the metadata of the database. | ||
Line 504: | Line 512: | ||
Data Provider metadata must currently be maintained in the database manually. See the relevant loading program system design notes for details. | Data Provider metadata must currently be maintained in the database manually. See the relevant loading program system design notes for details. | ||
- | ==== Place Definition | + | === Place Definition === |
The Place Definition of a data value describes the location for which that data value is valid. This is usually either a point or a grid (for data matrices). | The Place Definition of a data value describes the location for which that data value is valid. This is usually either a point or a grid (for data matrices). | ||
Line 510: | Line 518: | ||
Data Provider metadata must currently be maintained in the database manually. See the relevant loading program system design notes for details. | Data Provider metadata must currently be maintained in the database manually. See the relevant loading program system design notes for details. | ||
- | ==== Value Parameter | + | === Value Parameter === |
The Value Parameter represents the meteorological, | The Value Parameter represents the meteorological, | ||
- | ==== Level Parameter | + | === Level Parameter === |
The Level Parameter describes the level value associated with the data value. | The Level Parameter describes the level value associated with the data value. | ||
- | ===== Data Cleaning | + | ==== Data Cleaning ==== |
WDB contains a data cleaning utility which can be used to clean out old data. This section will contain a description of the cleaning program, as well as how it is used. | WDB contains a data cleaning utility which can be used to clean out old data. This section will contain a description of the cleaning program, as well as how it is used. | ||
Line 524: | Line 532: | ||
The current version of the data cleaning utility, however, is not suitable for production usage. It is therefore not recommended to make use of it. | The current version of the data cleaning utility, however, is not suitable for production usage. It is therefore not recommended to make use of it. | ||
- | ===== Chapter�5.�Reference | + | ===== Reference |
- | **Table of Contents** | + | ==== wdb ==== |
- | [[# | + | === Name === |
- | ===== Name ===== | + | wdb - WDB administration utility. It is a part of the WDB system. |
- | wdb — WDB administration utility. It is a part of the WDB system. | + | === Synopsis === |
- | + | ||
- | ===== Synopsis | + | |
" | " | ||
- | ===== Description | + | === Description === |
wdb is a terminal based tool for monitoring and controlling the WDB system. | wdb is a terminal based tool for monitoring and controlling the WDB system. | ||
- | ===== Options | + | === Options === |
If invoked without any arguments, the utility will attempt to connect to the database program with the default arguments available. | If invoked without any arguments, the utility will attempt to connect to the database program with the default arguments available. | ||
Line 578: | Line 584: | ||
Specify the database port to connect to (e.g., 5432). | Specify the database port to connect to (e.g., 5432). | ||
- | ---- | ||
- | ===== Name ===== | + | ==== wdbConfiguration |
+ | |||
+ | === Name === | ||
wdbConfiguration — Get information related to wdb database settings | wdbConfiguration — Get information related to wdb database settings | ||
- | ===== Synopsis | + | === Synopsis === |
" | " | ||
- | ===== Description | + | === Description === |
The purpose of wdbConfiguration is to provide information about the wdb database setup. The information provided should be enough to connect to the database, appart from authentication and authorization. | The purpose of wdbConfiguration is to provide information about the wdb database setup. The information provided should be enough to connect to the database, appart from authentication and authorization. | ||
Line 634: | Line 641: | ||
Display version information, | Display version information, | ||
- | ---- | + | ==== wdb.conf ==== |
- | ===== Name ===== | + | === Name === |
- | wdb.conf | + | wdb.conf |
- | ===== Description | + | === Description === |
The wdb.conf file contains database configuration for wdb. This includes the database' | The wdb.conf file contains database configuration for wdb. This includes the database' | ||
Line 662: | Line 669: | ||
Database user name defaults to environment variable $USER | Database user name defaults to environment variable $USER | ||
- | ===== Placement | + | === Placement === |
A global configuration file is normally placed in " | A global configuration file is normally placed in " | ||
Line 668: | Line 675: | ||
I addition to this, every wdb application has an options for overriding the configuration, | I addition to this, every wdb application has an options for overriding the configuration, | ||
- | ===== Example file ===== | + | === Example file === |
An example wdb.conf file can be found at " __WDB_DATADIR__/ | An example wdb.conf file can be found at " __WDB_DATADIR__/ | ||