The Enhanced OPeNDAP HDF4 Handler Installation Guide
This installation guide is for
Hyrax (version 1.5.2).
- First make sure that GNU auto tools are up to date.
- Install HDF4
source
(version 4.2r4).
- tar zxvf HDF4.2r4.tar.gz
- cd HDF4.2r4
- ./configure --prefix=/usr/local/hdf4
- make install
- (Optional) Install HDF-EOS2 library
source
(version 2.16).
- uncompress HDF-EOS2.16v1.00.tar.Z
- tar xvf HDF-EOS2.16v1.00.tar
- cd hdfeos
- setenv CC /usr/local/hdf4/bin/h4cc
- ./configure --prefix=/usr/local/hdfeos2 --with-hdf4=/usr/local/hdf4 --enable-install-include
- make install
- Install libdap
source
(version 3.9.3).
- tar zxvf lbdap-3.9.3.tar.gz
- cd libdap-3.9.3
- ./configure --prefix=/usr/local/opendap
- make install
- Install BES source (version 3.7.2).
- set path = (/usr/local/opendap/bin /usr/local/hdf5/bin $path) # We assume that (t)csh as a current shell.
- setenv LD_LIBRARY_PATH /usr/local/opendap/lib::$LD_LIBRARY_PATH # We assume that (t)csh as a current shell.
- setenv PKG_CONFIG_PATH /usr/local/opendap/lib/pkgconfig:/usr/lib/pkgconfig # We assume that the system wide package configuration files (*.pc) are under /usr/lib/pkgconfig
- tar zxvf bes-3.7.2.tar.gz
- cd bes-3.7.2
- ./configure --prefix=/usr/local/opendap
- make install
- Install general purpose handler source (version 3.9.3).
- tar zxvf dap-server-3.9.3.tar.gz
- cd dap-server-3.9.3
- setenv PKG_CONFIG_PATH /usr/local/opendap/lib/pkgconfig:/usr/lib/pkgconfig # We assume that the system wide package configuration files (*.pc) are under /usr/lib/pkgconfig
- ./configure --prefix=/usr/local/opendap
- make install
- Install the latest hdf4_handler source.
- svn co http://scm.opendap.org:8090/svn/trunk/hdf4_handler
- cd hdf4_handler
- setenv PKG_CONFIG_PATH /usr/local/opendap/lib/pkgconfig:/usr/lib/pkgconfig # We assume that the system wide package configuration files (*.pc) are under /usr/lib/pkgconfig
- autoreconf --v
- ./configure --prefix=/usr/local/opendap --with-hdf4=/usr/local/hdf4 --enable-cf
- (Optional) ./configure --prefix=/usr/local/opendap
--with-hdf4=/usr/local/hdf4
--enable-cf
--with-hdf-eos2=/usr/local/hdfeos2 # Use this if HDF-EOS2 Library is installed.
- (Optional) make check # See 'Testing HD4 Handler with Testsuite' below.
- make install
Testing HDF4 Handler with Testsuite
There are two testsuite in the hdf4 handler distribution - BES testsuite and local testsuite.
The make check command will execute the BES testsuite first and then local testsuite. These tests do not require any server (BES/TomCat) installation.
BES Testsuite
This testsuite runs besstandalone command which is installed under /usr/local/opendap/bin directory by the installation Step 5 above.
If you want to test your file one by one,
you can run a series of command like below.
Here, we assume that the test filename is S2000415.HDF and it is located under data directory in hdf4_handler. You must create your own .bescmd files if you want to try a different HDF4 file. Then, pass them as an argument to the besstandalone command.
- besstandalone -c bes-testsuite/bes.conf -i bes-testsuite/h4/S2000415.HDF.0.bescmd # returns semantic attribute output.
- besstandalone -c bes-testsuite/bes.conf -i bes-testsuite/h4/S2000415.HDF.1.bescmd # returns syntactic structure output.
- besstandalone -c bes-testsuite/bes.conf -i bes-testsuite/h4/S2000415.HDF.2.bescmd # returns XML output that includes both syntactic and semantic output.
- besstandalone -c bes-testsuite/bes.conf -i bes-testsuite/h4/S2000415.HDF.3.bescmd |getdap -M - # returns binary data output in ASCII
Testing with Apache Tomcat server
- Run bes-dap-data.sh under /usr/local/opendap/bin. This will update /usr/local/opendap/etc/bes/bes.conf file to include the BES ascii/usage/info module.
- Run bes-hdf4-data.sh under /usr/local/opendap/bin. This will update /usr/local/opendap/etc/bes/bes.conf file to include the BES h4 module.
- Modify the following parameters in bes.conf file under /usr/local/opendap/etc/bes.
BES.ServerAdministrator=username@yoursite.com # Your e-mail address
BES.User=username # Output of UNIX "users" command
BES.Group=groupname # Output of UNIX "groups" command
BES.ServerPort=10002 # (Optional) Change it to other number if you want to run multiple servers.
Make sure that following options are enabled.
BES.Catalog.catalog.TypeMatch=h5.*\.(he5)(\.gz|\.bz2|\.Z)?$;h5:.*.h5(.bz2|.gz|.Z)?$;
BES.modules=dap,cmd,ascii,usage,www,h4
BES.module.dap=/usr/local/opendap/lib/bes/libdap_module.so
BES.module.cmd=/usr/local/opendap/lib/bes/libdap_cmd_module.so
BES.module.ascii=/usr/local/opendap/lib/bes/libascii_module.so
BES.module.usage=/usr/local/opendap/lib/bes/libusage_module.so
BES.module.www=/usr/local/opendap/lib/bes/libwww_module.so
BES.module.h4=/usr/local/opendap/lib/bes/libhdf4_module.so
Please see BES Configuration for other configuration options.
- Become a super user and start BES server by typing besctl start.
- Install Apache Tomcat server (version 6.0.16).
- Download and install OLFS. (version 1.5.2).
(You may want to compile and install OLFS. Please refer to OLFS Build Instructions for instruction.)
- If you have installed OLFS before, shutdown TomCat server and remove the old contents first:
% rm -rf $tomcat_install_root/webapps/opendap/
- Put the opendap.war under $tomcat_install_root/webapps.
- Start Tomcat server. You'll see a new $tomcat_install_root/webapps/opendap directory is created.
- Shutdown the Tomcat server.
- Pay attention to BES server port number in webapps/opendap/initialContent/olfs.xml if you changed the BES port in bes.conf file.
- Start Tomcat by running $tomcat_install_root/bin/startup.sh.
- If you run multiple Tomcat servers, you need to edit port numbers in
$tomcat_install_root/conf/server.xml.
From the above example file, change both 8888 and 8443 to other numbers like 8889 and 8444.
- Copy some HDF4 files under /usr/local/opendap/share/hyrax/data/.
- Try URL http://your_host_address:your_tomcat_port/opendap/data/ on your web browser.
Last Updated: 2009.06.25. 16:56:37