<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.opendap.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hir</id>
	<title>OPeNDAP Documentation - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://docs.opendap.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Hir"/>
	<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php/Special:Contributions/Hir"/>
	<updated>2026-05-06T16:45:54Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Hyrax_GitHub_Source_Build&amp;diff=13591</id>
		<title>Hyrax GitHub Source Build</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Hyrax_GitHub_Source_Build&amp;diff=13591"/>
		<updated>2025-05-28T16:02:29Z</updated>

		<summary type="html">&lt;p&gt;Hir: /* Stopping the server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This describes how to get and build Hyrax from our GitHub repositories. Hyrax is a data server that implements the DAP2 and DAP4 protocols, works with a number of different data formats and supports a wide variety of customization options from tailoring the look of the server&#039;s web pages to complex server-side processing operations. This page describes how to build the server&#039;s source code. If you&#039;re working on a Linux or OS/X computer, the process is similar so we describe only the linux case; we do not support building the server on Windows operating systems.&lt;br /&gt;
&lt;br /&gt;
To build and install the server, you need to perform three steps:&lt;br /&gt;
# Set up the computer to build source code (Install a Java compiler; install a C/C++ compiler; add some other tools)&lt;br /&gt;
# Build the C++ DAP library (&#039;&#039;libdap4&#039;&#039;) and the Hyrax BES daemon&lt;br /&gt;
# Build the Hyrax OLFS web application&lt;br /&gt;
&lt;br /&gt;
Quick links if you already know the process:&lt;br /&gt;
* [https://github.com/opendap/hyrax new all-in-one repo that uses shell scripts]&lt;br /&gt;
* [https://github.com/opendap/libdap libdap git repo]&lt;br /&gt;
* [https://github.com/opendap/bes BES git repo]&lt;br /&gt;
* [https://github.com/opendap/olfs OLFS git repo]&lt;br /&gt;
* [https://github.com/opendap/hyrax-dependencies Hyrax dependencies]&lt;br /&gt;
&lt;br /&gt;
= Set up a system to build our code =&lt;br /&gt;
== CentOS-8  ==&lt;br /&gt;
The CentOS-8 setup is very similar to CentOS-7, but there are some minor differences.&lt;br /&gt;
 &lt;br /&gt;
;Update the VM&lt;br /&gt;
:&amp;lt;tt&amp;gt;yum -y update&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;You will need to enable power-tools for this setup&lt;br /&gt;
:&amp;lt;tt&amp;gt;yum config-manager --set-enabled powertools&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Load the basic software development environment plus the additional packages of openjpeg2, jasper, and libtirpc. Note that you may not need &#039;&#039;openjpeg2&#039;&#039; and &#039;&#039;jasper&#039;&#039; if you build the dependencies successfully. If you determine that you don&#039;t need these, please let us know. JUnit support has also been dropped so we dropped the &amp;lt;tt&amp;gt;&#039;&#039;ant-junit junit&#039;&#039;&amp;lt;/tt&amp;gt; packages from the install list.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;yum install java-1.8.0-openjdk java-1.8.0-openjdk-devel ant git gcc-c++ flex bison cmake autoconf automake libtool emacs openssl-devel libuuid-devel readline-devel zlib-devel bzip2 bzip2-devel libjpeg-devel libxml2-devel curl-devel libicu-devel cppunit cppunit-devel vim bc openjpeg2-devel jasper-devel libtirpc-devel&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Tell the machine where to find the tirpc libraries&lt;br /&gt;
:&amp;lt;tt&amp;gt;export CPPFLAGS=-I/usr/include/tirpc&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;export LDFLAGS=-ltirpc&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;NB: As of 1/28/22 you should not need to do this. The &#039;&#039;configure&#039;&#039; script should find the correct way to run python on CentOS 8. However, if it does not, our Makefiles (built from &#039;&#039;Makefile.am&#039;&#039; files) use &#039;&#039;python&#039;&#039; but a vanilla CentOS 8 machine only has &#039;&#039;python3&#039;&#039;. Until we fix this, you need to make sure &#039;&#039;python&#039;&#039; runs a python program. One way is to make a symbolic link between &#039;&#039;python3&#039;&#039; and &#039;&#039;python&#039;&#039; in a directory that is on your PATH. &#039;&#039;&#039;The TODO item here is to make sure &#039;&#039;python&#039;&#039; exists and can run a program&#039;&#039;&#039;. It is generally enough to verify that the command exists:&lt;br /&gt;
:&amp;lt;tt&amp;gt;&#039;&#039;&#039;which python&#039;&#039;&#039;&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
; Lacking that (which I was on Rocky8) install python&lt;br /&gt;
: &amp;lt;tt&amp;gt;sudo yum install -y python3&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;If you&#039;re going to build RPMs&lt;br /&gt;
:&amp;lt;tt&amp;gt;yum install rpm-devel rpm-build redhat-rpm-config&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you run through the rest of the hyrax build make sure that both &#039;&#039;gdal&#039;&#039; and &#039;&#039;hdf4&#039;&#039; build correctly (look for their libraries in $prefix/deps/lib). To build them manually, run &#039;&#039;&#039;make gdal&#039;&#039;&#039;, &#039;&#039;&#039;make hdf4&#039;&#039;&#039;, amd &#039;&#039;&#039;make netcdf4&#039;&#039;&#039; inside the hyrax-dependencies to build and install gdal and hdf4&lt;br /&gt;
&lt;br /&gt;
== Rocky 8 ==&lt;br /&gt;
&#039;&#039;Updated 6/6/2024&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To get the commands ps, which, etc.&lt;br /&gt;
 dnf install -y procps&lt;br /&gt;
&lt;br /&gt;
C++ environment plus build tools&lt;br /&gt;
 dnf install -y git gcc-c++ flex bison cmake autoconf automake libtool emacs bzip2 vim bc&lt;br /&gt;
&lt;br /&gt;
Development library versions&lt;br /&gt;
 dnf install -y openssl-devel libuuid-devel readline-devel zlib-devel bzip2-devel libjpeg-devel libxml2-devel curl-devel libicu-devel libtirpc-devel&lt;br /&gt;
&lt;br /&gt;
Java&lt;br /&gt;
 dnf install -y java-17-openjdk java-17-openjdk-devel ant &lt;br /&gt;
&lt;br /&gt;
Setup DNF so that we can load in some obscure packages from EPEL, etc., repos&lt;br /&gt;
 dnf install dnf-plugins-core&lt;br /&gt;
 dnf install epel-release&lt;br /&gt;
 dnf config-manager --set-enabled powertools&lt;br /&gt;
&lt;br /&gt;
Install CppUnit and some more development libraries&lt;br /&gt;
 dnf install -y cppunit cppunit-devel openjpeg2-devel jasper-devel&lt;br /&gt;
&lt;br /&gt;
Install the RPM tools&lt;br /&gt;
 dnf install -y rpm-devel rpm-build redhat-rpm-config&lt;br /&gt;
&lt;br /&gt;
Install the AWS CLI&lt;br /&gt;
 dnf install -y awscli&lt;br /&gt;
&lt;br /&gt;
== Apple OSX (M&#039;&#039;x&#039;&#039; processor) ==&lt;br /&gt;
&lt;br /&gt;
Computers with the Apple M series chips require dedicated binaries, or binaries with both Intel and M1 contents. In order to get the &#039;&#039;hyrax-dependencies&#039;&#039; project (and the libdap4, and bes projects) to build the following packages need to be installed prior to running the hyrax-dependencies build.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Xcode&#039;&#039;&#039;&lt;br /&gt;
* Use the App Store to install Xcode&lt;br /&gt;
* Use a terminal window to run the command: &#039;&#039;xcode-select --install&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bison&#039;&#039;&#039;&lt;br /&gt;
* brew install bison&lt;br /&gt;
* export PATH=&amp;quot;/opt/homebrew/opt/bison/bin:$PATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;openssl&#039;&#039;&#039;&lt;br /&gt;
* brew install openssl&lt;br /&gt;
* export CPPFLAGS=&amp;quot;-I/opt/homebrew/Cellar/openssl@3/3.0.1/include&amp;quot;&lt;br /&gt;
* export LDFLAGS=&amp;quot;-L/opt/homebrew/Cellar/openssl@3/3.0.1/lib&amp;quot;&lt;br /&gt;
* sudo ln -s  /opt/homebrew/Cellar/openssl@3/3.3.0  /usr/local/opt/opensslexport&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;jpeg&#039;&#039;&#039;&lt;br /&gt;
* brew install jpeg&lt;br /&gt;
* export PATH=&amp;quot;/opt/homebrew/opt/jpeg/bin:$PATH&amp;quot;&lt;br /&gt;
* export LDFLAGS=&amp;quot;-L/opt/homebrew/opt/jpeg/lib $LDFLAGS&amp;quot;&lt;br /&gt;
* export CPPFLAGS=&amp;quot;-I/opt/homebrew/opt/jpeg/include $CPPFLAGS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;libpng&#039;&#039;&#039;&lt;br /&gt;
This is needed to build the gdal library in the hyrax-dependencies.&lt;br /&gt;
* [http://www.libpng.org/pub/png/libpng.html Download libpng source]&lt;br /&gt;
Unpack the distribution bundle and build and install the library into /usr/local&lt;br /&gt;
* ./configure&lt;br /&gt;
* make&lt;br /&gt;
* make check&lt;br /&gt;
* make install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CPPUNIT&#039;&#039;&#039;&lt;br /&gt;
* brew install cppunit&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GNU auto tools &#039;&#039;&#039;&lt;br /&gt;
* brew install autoconf&lt;br /&gt;
* brew install auomake&lt;br /&gt;
&lt;br /&gt;
= A semi-automatic build =&lt;br /&gt;
&lt;br /&gt;
Use git to clone the https://github.com/opendap/hyrax project and follow the short instructions in the README file.&lt;br /&gt;
:&#039;&#039;&#039;&amp;lt;tt&amp;gt;git clone https://github.com/opendap/hyrax&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Summarized here, those instructions are:&lt;br /&gt;
;use bash: The shell scripts in this repo assume you are using bash.&lt;br /&gt;
;set up some environment variables so the server will build an install locally, something that streamlines development: &#039;&#039;source spath.sh&#039;&#039;&lt;br /&gt;
;clone the three code repos for the server plus the hyrax dependencies: &#039;&#039;./hyrax_clone.sh -v&#039;&#039;&lt;br /&gt;
;build the code, including the dependencies: &#039;&#039;./hyrax_build.sh -v&#039;&#039;&lt;br /&gt;
;test the server: Start the BES using  &#039;&#039;besctl start&#039;&#039;&lt;br /&gt;
:Start the OLFS using&#039;&#039;./build/apache-tomcat-7.0.57/bin/startup.sh&#039;&#039;&lt;br /&gt;
:Test the server by loooking at &#039;&#039;&amp;lt;nowiki&amp;gt;http://localhost:8080/opendap&amp;lt;/nowiki&amp;gt;&#039;&#039; in a browser. You should see a directory named &#039;&#039;data&#039;&#039; and following that link should lead to more data. The server will be accessible to clients other than a web browser.&lt;br /&gt;
:To test the BES function independently of the front end, use &#039;&#039;bescmdln&#039;&#039; and give it the &#039;&#039;show version;&#039;&#039; command, you should see output about different components and their versions. &lt;br /&gt;
:Use &#039;&#039;exit&#039;&#039; to leave the command line test client.&lt;br /&gt;
&lt;br /&gt;
As described in the README file that is part of the &#039;&#039;hyrax&#039;&#039; repo, there are some other scripts in the repo and some options to the &#039;&#039;clone&#039;&#039; and &#039;&#039;build&#039;&#039; script that you can investigate by using -h (help).&lt;br /&gt;
&lt;br /&gt;
= The manual build = &lt;br /&gt;
&lt;br /&gt;
In the following, we describe only the build process for CentOS; the one for OS/X is similar and we note the differences where they are significant.&lt;br /&gt;
&lt;br /&gt;
== Get Hyrax from GitHub ==&lt;br /&gt;
Use git to clone the https://github.com/opendap/hyrax project and follow the instructions on this page (which differ a bit from ones in the project&#039;s README)&lt;br /&gt;
:&#039;&#039;&#039;&amp;lt;tt&amp;gt;git clone https://github.com/opendap/hyrax&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have the &#039;&#039;hyrax&#039;&#039; project cloned:&lt;br /&gt;
;set up some environment variables so the server will build an install locally, something that streamlines development&lt;br /&gt;
:&amp;lt;tt&amp;gt;&#039;&#039;&#039;source spath.sh&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
;clone the three code repos for the server plus the hyrax dependencies&lt;br /&gt;
:&amp;lt;tt&amp;gt;&#039;&#039;&#039;./hyrax_clone.sh -v&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
;proceed with the rest of the build as described in the following sections of this page&lt;br /&gt;
&lt;br /&gt;
== Important Note ==&lt;br /&gt;
&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Many of the problems people have with the build stem from not setting the shell correctly for the build.&amp;lt;/font&amp;gt;&lt;br /&gt;
In the above section, &#039;&#039;make sure&#039;&#039; you run &#039;&#039;&#039;source spath.sh&#039;&#039;&#039; before you run any of the building/compiling/testing commands that use the source code or build files. While the &#039;&#039;$prefix&#039;&#039; and &#039;&#039;$PATH&#039;&#039; environment variables are simple to set up, they are needed by most users. When you exit a terminal window and then open a new one, make sure to (re)source the &#039;&#039;spath.sh&#039;&#039; file in the new shell. You don&#039;t have to source spath.sh every time you enter the &#039;&#039;hyrax&#039;&#039; directory, but you must run it for every new instance of the shell.&lt;br /&gt;
&lt;br /&gt;
== Compile the Hyrax dependencies ==&lt;br /&gt;
If you didn&#039;t run hyrax_clone.sh, make sure you&#039;re in the top hyrax directory and use git to clone the hyrax-dependencies:&lt;br /&gt;
  git clone https://github.com/opendap/hyrax-dependencies&lt;br /&gt;
And then build it. Unlike many source packages, there is no need to run a configure script, just &#039;&#039;make&#039;&#039; will do. However, the Makefile in this package expects &#039;&#039;$prefix&#039;&#039; to be set as described above. It will put all of the Hyrax server dependencies in a subdirectory called &#039;&#039;deps&#039;&#039;. To build the dependencies for building RPMs, use &#039;&#039;make -j9 for-static-rpm&#039;&#039;.&lt;br /&gt;
;(make sure you&#039;re in the top level hyrax directory)&lt;br /&gt;
&amp;lt;tt&amp;gt;&lt;br /&gt;
; cd hyrax-dependencies&lt;br /&gt;
; make --jobs=9&lt;br /&gt;
: &#039;&#039;The --jobs=N runs a parallel build with at most N simultaneous compile operations. This will result in a huge performance improvement on multi-core machines. &#039;&#039;&#039;-jN&#039;&#039;&#039; is the short form for the option.&#039;&#039;&lt;br /&gt;
;cd ..: &#039;&#039;Go back up to &#039;&#039;&#039;$prefix&#039;&#039;&#039; &#039;&#039;&lt;br /&gt;
&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can get some of the &#039;&#039;dependencies&#039;&#039; for Hyrax like &#039;&#039;netCDF&#039;&#039; from the EPEL repository, but the versions are often older than Hyrax needs. Contact us if you want information about using EPEL. At the risk of throwing people a curve ball, here&#039;s a synopsis of the process. Don&#039;t do this unless you know EPEL well. Use [http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm epel-release-6-8.noarch.rpm] and install it using &#039;&#039;sudo yum install epel-release-6-8.noarch.rpm&#039;&#039;. Then install packages needed to read various file formats: &#039;&#039;yum install netcdf-devel hdf-devel hdf5-devel libicu-devel cfitsio-devel cppunit-devel rpm-devel rpm-build&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Build &#039;&#039;libdap&#039;&#039; and the &#039;&#039;BES&#039;&#039; daemon ==&lt;br /&gt;
&lt;br /&gt;
==== Get and build libdap4 ====&lt;br /&gt;
;WARNING: If you have &#039;&#039;libdap&#039;&#039; already, uninstall it before proceeding.&lt;br /&gt;
Build, test and install libdap4 into $prefix:&lt;br /&gt;
&amp;lt;b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/opendap/libdap4&lt;br /&gt;
cd libdap4&lt;br /&gt;
autoreconf -fiv&lt;br /&gt;
./configure --prefix=$prefix --enable-developer &lt;br /&gt;
make -j9&lt;br /&gt;
make check -j9&lt;br /&gt;
make install&lt;br /&gt;
cd .. # Go back up to &#039;&#039;$prefix&#039;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Get and build the BES and all of the modules shipped with Hyrax ====&lt;br /&gt;
Build, test and install the BES and its modules&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;git clone https://github.com/opendap/bes # Clone the BES from GitHub&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
cd bes # enter the bes dir.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;autoreconf --force --install --verbose # You can use -fiv instead of the long options.&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These means, when starting from a freshly cloned repo, run all of the autotools commands and install all of the needed scripts.&lt;br /&gt;
&lt;br /&gt;
Then, run configure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;./configure --prefix=$prefix  --with-dependencies=$prefix/deps --enable-developer&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Notes:&lt;br /&gt;
:* The --with-deps... is not needed if you load the dependencies from RPMs or otherwise have them installed an generally accessible on the build machine.&lt;br /&gt;
:* The  --enable-developer option will compile in all of the debugging code which may affect performance even if the debugging output is not enabled.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;make -j9&lt;br /&gt;
make check -j9&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
Some tests may fail and adding &#039;&#039;-k&#039;&#039; ignores that and keeps make marching along. &#039;&#039;Note that you must run &#039;&#039;&#039;make&#039;&#039;&#039; before &#039;&#039;&#039;make check&#039;&#039;&#039; in the bes code&#039;&#039;.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;make install&lt;br /&gt;
cd .. # Go back up to $prefix&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Test the BES ====&lt;br /&gt;
Start the BES and verify that all of the modules build correctly.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;besctl start # Start the BES.&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
Given that &#039;&#039;$prefix/bin&#039;&#039; is on your &#039;&#039;$PATH&#039;&#039;, this should start the BES. You will not need to be root if you used the &#039;&#039;--enable-developer&#039;&#039; switch with configure (as shown above), otherwise you should run &#039;&#039;sudo besctl start&#039;&#039; with the caveat that as root &#039;&#039;$prefix/bin&#039;&#039; will probably not be n your &#039;&#039;$PATH&#039;&#039;.&lt;br /&gt;
:If there&#039;s an error (e.g., you tried to start as a regular user but need to be root), edit bes.conf to be a real user (yourself?) in a real group (use &#039;groups&#039; to see which groups you are in) and also check that the bes.log file is &#039;&#039;not&#039;&#039; owned by root. &lt;br /&gt;
:Restart.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;bescmdln # Now that the BES is running, start the BES testing tool&lt;br /&gt;
BESClient&amp;gt; show version; # Send the BES the version command to see if it&#039;s running &amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
:Take a quick look at the output. There should be entries for libdap, bes and all of the modules.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt; BESClient&amp;gt; exit; # Exit the testing tool&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that even though you have exited the &#039;&#039;bescmdln&#039;&#039; test tool, the BES is still running. That&#039;s fine - we&#039;ll use it in just a bit - but if you want to shut it down, use &#039;&#039;besctl stop&#039;&#039;, or &#039;&#039;besctl pids&#039;&#039; to see the daemon&#039;s processes. If the BES is not stopping, &#039;&#039;besctl kill&#039;&#039; will stop all BES processes without waiting for them to complete their current task.&lt;br /&gt;
&lt;br /&gt;
== Build the Hyrax &#039;&#039;OLFS&#039;&#039; web application ==&lt;br /&gt;
The OLFS is a java servlet built using ant. The OLFS is a java servlet web application and runs with Tomcat, Glassfish, etc. You need a copy of Tomcat, but our servlet does not work with the RPM version of Tomcat. Get [http://tomcat.apache.org/download-90.cgi Tomcat 9 from Apache]. Note that if you built the dependencies from source using the &#039;&#039;hyrac-dependencies-1.10.tar&#039;&#039; then there is a copy of Tomcat in the &#039;&#039;hyrax-dependecies/extra_downloads directory. You can unpack the Tomcat tar file in &#039;&#039;$prefix&#039;&#039;. I&#039;ll assume you have the Apache Tomcat tar file in &#039;&#039;$prefix&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;tar -xzf apache-tomcat-9.0.105.tar.gz: Expand the Tomcat tar ball&lt;br /&gt;
;git clone https://github.com/opendap/olfs: Get the OLFS source code&lt;br /&gt;
;cd olfs: change directory to the OLFS source&lt;br /&gt;
;ant server: Build it&lt;br /&gt;
;cp build/dist/opendap.war ../apache-tomcat-9.0.105/webapps/: Copy the opendap web archive to the tomcat webapps direcotry.&lt;br /&gt;
;cd ..: Go up to &#039;&#039;$prefix&#039;&#039;&lt;br /&gt;
;./apache-tomcat-9.0.105/bin/startup.sh: Start Tomcat&lt;br /&gt;
&lt;br /&gt;
== Test the server ==&lt;br /&gt;
You can test the server several ways, but the most fun is to use a web browser. The URL &#039;&#039;http://&amp;lt;machine&amp;gt;:8080/opendap&#039;&#039; should return a page pointing to a collection of test datasets bundled with the server. You can also use &#039;&#039;curl&#039;&#039;, &#039;&#039;wget&#039;&#039; or any application that can read from OpenDAP servers (e.g., Matlab, Octave, ArcGIS, IDL, ...).&lt;br /&gt;
&lt;br /&gt;
== Stopping the server ==&lt;br /&gt;
Stop both the BES and Apache&lt;br /&gt;
&lt;br /&gt;
;./apache-tomcat-9.0.105/bin/shutdown.sh&lt;br /&gt;
;besctl stop&lt;br /&gt;
&lt;br /&gt;
Note that there is also a &#039;&#039;hyraxctl&#039;&#039; script that provides a way to start and stop Hyrax without you (or &#039;&#039;init.d&#039;&#039;) having to type separate commands for both the BES and OLFS. This script is part of the BES software you cloned from git.&lt;br /&gt;
&lt;br /&gt;
== Building select parts of the BES ==&lt;br /&gt;
Building just the BES and one of more of its handlers/modules is not at all hard to do with a checkout of code from git. In the above section on building the BES, simply skip the step where the submodules are cloned (&#039;&#039;git submodule update --init&#039;&#039;) and link configure.ac to &#039;&#039;configure_standard.ac&#039;&#039;. The rest of the process is as shown. The end result is a BES daemon without any of the standard Hyrax modules (but support for DAP will be built if &#039;&#039;libdap&#039;&#039; is found by the configure script).&lt;br /&gt;
&lt;br /&gt;
To build modules for the BES, simply go to &#039;&#039;$prefix&#039;&#039;, clone their git repo and build them, taking care to pass set &#039;&#039;$prefix&#039;&#039; when calling the module&#039;s &#039;&#039;configure&#039;&#039; script. &lt;br /&gt;
&lt;br /&gt;
Note that it is easy to combine the &#039;build it all&#039; and &#039;build just one&#039; processes so that a complete Hyrax BES can be built in one go and then a new module/handler not included in the BES git repo can be built and used. Each module we have on GitHub has a &#039;&#039;configure.ac&#039;&#039;, &#039;&#039;Makefile.am&#039;&#039;, etc., that will support both kinds of builds and [[Configuration of BES Modules]] explains how to take a module/handler that builds as a standalone module and tweak the build scripts so that it&#039;s fully integrated into the Hyrax BES build, too.&lt;br /&gt;
&lt;br /&gt;
= Building on Ubuntu =&lt;br /&gt;
This was tested using Xenial (Ubuntu 16)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;sudo apt-get update&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Packages needed:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;sudo apt-get install ...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ant junit git flex bison autoconf automake libtool emacs openssl bzip2 libjpeg-dev libxml2-dev curl libicu-dev vim bc make cmake uuid-dev libcurl4-openssl-dev libicu-dev g++ zlib1g-dev libcppunit-dev libssl-dev&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Hir</name></author>
	</entry>
	<entry>
		<id>https://docs.opendap.org/index.php?title=Hyrax_GitHub_Source_Build&amp;diff=13590</id>
		<title>Hyrax GitHub Source Build</title>
		<link rel="alternate" type="text/html" href="https://docs.opendap.org/index.php?title=Hyrax_GitHub_Source_Build&amp;diff=13590"/>
		<updated>2025-05-28T15:41:07Z</updated>

		<summary type="html">&lt;p&gt;Hir: update apache version from 7 to 9&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This describes how to get and build Hyrax from our GitHub repositories. Hyrax is a data server that implements the DAP2 and DAP4 protocols, works with a number of different data formats and supports a wide variety of customization options from tailoring the look of the server&#039;s web pages to complex server-side processing operations. This page describes how to build the server&#039;s source code. If you&#039;re working on a Linux or OS/X computer, the process is similar so we describe only the linux case; we do not support building the server on Windows operating systems.&lt;br /&gt;
&lt;br /&gt;
To build and install the server, you need to perform three steps:&lt;br /&gt;
# Set up the computer to build source code (Install a Java compiler; install a C/C++ compiler; add some other tools)&lt;br /&gt;
# Build the C++ DAP library (&#039;&#039;libdap4&#039;&#039;) and the Hyrax BES daemon&lt;br /&gt;
# Build the Hyrax OLFS web application&lt;br /&gt;
&lt;br /&gt;
Quick links if you already know the process:&lt;br /&gt;
* [https://github.com/opendap/hyrax new all-in-one repo that uses shell scripts]&lt;br /&gt;
* [https://github.com/opendap/libdap libdap git repo]&lt;br /&gt;
* [https://github.com/opendap/bes BES git repo]&lt;br /&gt;
* [https://github.com/opendap/olfs OLFS git repo]&lt;br /&gt;
* [https://github.com/opendap/hyrax-dependencies Hyrax dependencies]&lt;br /&gt;
&lt;br /&gt;
= Set up a system to build our code =&lt;br /&gt;
== CentOS-8  ==&lt;br /&gt;
The CentOS-8 setup is very similar to CentOS-7, but there are some minor differences.&lt;br /&gt;
 &lt;br /&gt;
;Update the VM&lt;br /&gt;
:&amp;lt;tt&amp;gt;yum -y update&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;You will need to enable power-tools for this setup&lt;br /&gt;
:&amp;lt;tt&amp;gt;yum config-manager --set-enabled powertools&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Load the basic software development environment plus the additional packages of openjpeg2, jasper, and libtirpc. Note that you may not need &#039;&#039;openjpeg2&#039;&#039; and &#039;&#039;jasper&#039;&#039; if you build the dependencies successfully. If you determine that you don&#039;t need these, please let us know. JUnit support has also been dropped so we dropped the &amp;lt;tt&amp;gt;&#039;&#039;ant-junit junit&#039;&#039;&amp;lt;/tt&amp;gt; packages from the install list.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;tt&amp;gt;yum install java-1.8.0-openjdk java-1.8.0-openjdk-devel ant git gcc-c++ flex bison cmake autoconf automake libtool emacs openssl-devel libuuid-devel readline-devel zlib-devel bzip2 bzip2-devel libjpeg-devel libxml2-devel curl-devel libicu-devel cppunit cppunit-devel vim bc openjpeg2-devel jasper-devel libtirpc-devel&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;Tell the machine where to find the tirpc libraries&lt;br /&gt;
:&amp;lt;tt&amp;gt;export CPPFLAGS=-I/usr/include/tirpc&amp;lt;/tt&amp;gt;&lt;br /&gt;
:&amp;lt;tt&amp;gt;export LDFLAGS=-ltirpc&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;NB: As of 1/28/22 you should not need to do this. The &#039;&#039;configure&#039;&#039; script should find the correct way to run python on CentOS 8. However, if it does not, our Makefiles (built from &#039;&#039;Makefile.am&#039;&#039; files) use &#039;&#039;python&#039;&#039; but a vanilla CentOS 8 machine only has &#039;&#039;python3&#039;&#039;. Until we fix this, you need to make sure &#039;&#039;python&#039;&#039; runs a python program. One way is to make a symbolic link between &#039;&#039;python3&#039;&#039; and &#039;&#039;python&#039;&#039; in a directory that is on your PATH. &#039;&#039;&#039;The TODO item here is to make sure &#039;&#039;python&#039;&#039; exists and can run a program&#039;&#039;&#039;. It is generally enough to verify that the command exists:&lt;br /&gt;
:&amp;lt;tt&amp;gt;&#039;&#039;&#039;which python&#039;&#039;&#039;&amp;lt;/tt&amp;gt; &lt;br /&gt;
&lt;br /&gt;
; Lacking that (which I was on Rocky8) install python&lt;br /&gt;
: &amp;lt;tt&amp;gt;sudo yum install -y python3&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;If you&#039;re going to build RPMs&lt;br /&gt;
:&amp;lt;tt&amp;gt;yum install rpm-devel rpm-build redhat-rpm-config&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you run through the rest of the hyrax build make sure that both &#039;&#039;gdal&#039;&#039; and &#039;&#039;hdf4&#039;&#039; build correctly (look for their libraries in $prefix/deps/lib). To build them manually, run &#039;&#039;&#039;make gdal&#039;&#039;&#039;, &#039;&#039;&#039;make hdf4&#039;&#039;&#039;, amd &#039;&#039;&#039;make netcdf4&#039;&#039;&#039; inside the hyrax-dependencies to build and install gdal and hdf4&lt;br /&gt;
&lt;br /&gt;
== Rocky 8 ==&lt;br /&gt;
&#039;&#039;Updated 6/6/2024&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
To get the commands ps, which, etc.&lt;br /&gt;
 dnf install -y procps&lt;br /&gt;
&lt;br /&gt;
C++ environment plus build tools&lt;br /&gt;
 dnf install -y git gcc-c++ flex bison cmake autoconf automake libtool emacs bzip2 vim bc&lt;br /&gt;
&lt;br /&gt;
Development library versions&lt;br /&gt;
 dnf install -y openssl-devel libuuid-devel readline-devel zlib-devel bzip2-devel libjpeg-devel libxml2-devel curl-devel libicu-devel libtirpc-devel&lt;br /&gt;
&lt;br /&gt;
Java&lt;br /&gt;
 dnf install -y java-17-openjdk java-17-openjdk-devel ant &lt;br /&gt;
&lt;br /&gt;
Setup DNF so that we can load in some obscure packages from EPEL, etc., repos&lt;br /&gt;
 dnf install dnf-plugins-core&lt;br /&gt;
 dnf install epel-release&lt;br /&gt;
 dnf config-manager --set-enabled powertools&lt;br /&gt;
&lt;br /&gt;
Install CppUnit and some more development libraries&lt;br /&gt;
 dnf install -y cppunit cppunit-devel openjpeg2-devel jasper-devel&lt;br /&gt;
&lt;br /&gt;
Install the RPM tools&lt;br /&gt;
 dnf install -y rpm-devel rpm-build redhat-rpm-config&lt;br /&gt;
&lt;br /&gt;
Install the AWS CLI&lt;br /&gt;
 dnf install -y awscli&lt;br /&gt;
&lt;br /&gt;
== Apple OSX (M&#039;&#039;x&#039;&#039; processor) ==&lt;br /&gt;
&lt;br /&gt;
Computers with the Apple M series chips require dedicated binaries, or binaries with both Intel and M1 contents. In order to get the &#039;&#039;hyrax-dependencies&#039;&#039; project (and the libdap4, and bes projects) to build the following packages need to be installed prior to running the hyrax-dependencies build.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Xcode&#039;&#039;&#039;&lt;br /&gt;
* Use the App Store to install Xcode&lt;br /&gt;
* Use a terminal window to run the command: &#039;&#039;xcode-select --install&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;bison&#039;&#039;&#039;&lt;br /&gt;
* brew install bison&lt;br /&gt;
* export PATH=&amp;quot;/opt/homebrew/opt/bison/bin:$PATH&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;openssl&#039;&#039;&#039;&lt;br /&gt;
* brew install openssl&lt;br /&gt;
* export CPPFLAGS=&amp;quot;-I/opt/homebrew/Cellar/openssl@3/3.0.1/include&amp;quot;&lt;br /&gt;
* export LDFLAGS=&amp;quot;-L/opt/homebrew/Cellar/openssl@3/3.0.1/lib&amp;quot;&lt;br /&gt;
* sudo ln -s  /opt/homebrew/Cellar/openssl@3/3.3.0  /usr/local/opt/opensslexport&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;jpeg&#039;&#039;&#039;&lt;br /&gt;
* brew install jpeg&lt;br /&gt;
* export PATH=&amp;quot;/opt/homebrew/opt/jpeg/bin:$PATH&amp;quot;&lt;br /&gt;
* export LDFLAGS=&amp;quot;-L/opt/homebrew/opt/jpeg/lib $LDFLAGS&amp;quot;&lt;br /&gt;
* export CPPFLAGS=&amp;quot;-I/opt/homebrew/opt/jpeg/include $CPPFLAGS&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;libpng&#039;&#039;&#039;&lt;br /&gt;
This is needed to build the gdal library in the hyrax-dependencies.&lt;br /&gt;
* [http://www.libpng.org/pub/png/libpng.html Download libpng source]&lt;br /&gt;
Unpack the distribution bundle and build and install the library into /usr/local&lt;br /&gt;
* ./configure&lt;br /&gt;
* make&lt;br /&gt;
* make check&lt;br /&gt;
* make install&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;CPPUNIT&#039;&#039;&#039;&lt;br /&gt;
* brew install cppunit&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;GNU auto tools &#039;&#039;&#039;&lt;br /&gt;
* brew install autoconf&lt;br /&gt;
* brew install auomake&lt;br /&gt;
&lt;br /&gt;
= A semi-automatic build =&lt;br /&gt;
&lt;br /&gt;
Use git to clone the https://github.com/opendap/hyrax project and follow the short instructions in the README file.&lt;br /&gt;
:&#039;&#039;&#039;&amp;lt;tt&amp;gt;git clone https://github.com/opendap/hyrax&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Summarized here, those instructions are:&lt;br /&gt;
;use bash: The shell scripts in this repo assume you are using bash.&lt;br /&gt;
;set up some environment variables so the server will build an install locally, something that streamlines development: &#039;&#039;source spath.sh&#039;&#039;&lt;br /&gt;
;clone the three code repos for the server plus the hyrax dependencies: &#039;&#039;./hyrax_clone.sh -v&#039;&#039;&lt;br /&gt;
;build the code, including the dependencies: &#039;&#039;./hyrax_build.sh -v&#039;&#039;&lt;br /&gt;
;test the server: Start the BES using  &#039;&#039;besctl start&#039;&#039;&lt;br /&gt;
:Start the OLFS using&#039;&#039;./build/apache-tomcat-7.0.57/bin/startup.sh&#039;&#039;&lt;br /&gt;
:Test the server by loooking at &#039;&#039;&amp;lt;nowiki&amp;gt;http://localhost:8080/opendap&amp;lt;/nowiki&amp;gt;&#039;&#039; in a browser. You should see a directory named &#039;&#039;data&#039;&#039; and following that link should lead to more data. The server will be accessible to clients other than a web browser.&lt;br /&gt;
:To test the BES function independently of the front end, use &#039;&#039;bescmdln&#039;&#039; and give it the &#039;&#039;show version;&#039;&#039; command, you should see output about different components and their versions. &lt;br /&gt;
:Use &#039;&#039;exit&#039;&#039; to leave the command line test client.&lt;br /&gt;
&lt;br /&gt;
As described in the README file that is part of the &#039;&#039;hyrax&#039;&#039; repo, there are some other scripts in the repo and some options to the &#039;&#039;clone&#039;&#039; and &#039;&#039;build&#039;&#039; script that you can investigate by using -h (help).&lt;br /&gt;
&lt;br /&gt;
= The manual build = &lt;br /&gt;
&lt;br /&gt;
In the following, we describe only the build process for CentOS; the one for OS/X is similar and we note the differences where they are significant.&lt;br /&gt;
&lt;br /&gt;
== Get Hyrax from GitHub ==&lt;br /&gt;
Use git to clone the https://github.com/opendap/hyrax project and follow the instructions on this page (which differ a bit from ones in the project&#039;s README)&lt;br /&gt;
:&#039;&#039;&#039;&amp;lt;tt&amp;gt;git clone https://github.com/opendap/hyrax&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you have the &#039;&#039;hyrax&#039;&#039; project cloned:&lt;br /&gt;
;set up some environment variables so the server will build an install locally, something that streamlines development&lt;br /&gt;
:&amp;lt;tt&amp;gt;&#039;&#039;&#039;source spath.sh&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
;clone the three code repos for the server plus the hyrax dependencies&lt;br /&gt;
:&amp;lt;tt&amp;gt;&#039;&#039;&#039;./hyrax_clone.sh -v&#039;&#039;&#039;&amp;lt;/tt&amp;gt;&lt;br /&gt;
;proceed with the rest of the build as described in the following sections of this page&lt;br /&gt;
&lt;br /&gt;
== Important Note ==&lt;br /&gt;
&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Many of the problems people have with the build stem from not setting the shell correctly for the build.&amp;lt;/font&amp;gt;&lt;br /&gt;
In the above section, &#039;&#039;make sure&#039;&#039; you run &#039;&#039;&#039;source spath.sh&#039;&#039;&#039; before you run any of the building/compiling/testing commands that use the source code or build files. While the &#039;&#039;$prefix&#039;&#039; and &#039;&#039;$PATH&#039;&#039; environment variables are simple to set up, they are needed by most users. When you exit a terminal window and then open a new one, make sure to (re)source the &#039;&#039;spath.sh&#039;&#039; file in the new shell. You don&#039;t have to source spath.sh every time you enter the &#039;&#039;hyrax&#039;&#039; directory, but you must run it for every new instance of the shell.&lt;br /&gt;
&lt;br /&gt;
== Compile the Hyrax dependencies ==&lt;br /&gt;
If you didn&#039;t run hyrax_clone.sh, make sure you&#039;re in the top hyrax directory and use git to clone the hyrax-dependencies:&lt;br /&gt;
  git clone https://github.com/opendap/hyrax-dependencies&lt;br /&gt;
And then build it. Unlike many source packages, there is no need to run a configure script, just &#039;&#039;make&#039;&#039; will do. However, the Makefile in this package expects &#039;&#039;$prefix&#039;&#039; to be set as described above. It will put all of the Hyrax server dependencies in a subdirectory called &#039;&#039;deps&#039;&#039;. To build the dependencies for building RPMs, use &#039;&#039;make -j9 for-static-rpm&#039;&#039;.&lt;br /&gt;
;(make sure you&#039;re in the top level hyrax directory)&lt;br /&gt;
&amp;lt;tt&amp;gt;&lt;br /&gt;
; cd hyrax-dependencies&lt;br /&gt;
; make --jobs=9&lt;br /&gt;
: &#039;&#039;The --jobs=N runs a parallel build with at most N simultaneous compile operations. This will result in a huge performance improvement on multi-core machines. &#039;&#039;&#039;-jN&#039;&#039;&#039; is the short form for the option.&#039;&#039;&lt;br /&gt;
;cd ..: &#039;&#039;Go back up to &#039;&#039;&#039;$prefix&#039;&#039;&#039; &#039;&#039;&lt;br /&gt;
&amp;lt;/tt&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; You can get some of the &#039;&#039;dependencies&#039;&#039; for Hyrax like &#039;&#039;netCDF&#039;&#039; from the EPEL repository, but the versions are often older than Hyrax needs. Contact us if you want information about using EPEL. At the risk of throwing people a curve ball, here&#039;s a synopsis of the process. Don&#039;t do this unless you know EPEL well. Use [http://mirror.pnl.gov/epel/6/i386/epel-release-6-8.noarch.rpm epel-release-6-8.noarch.rpm] and install it using &#039;&#039;sudo yum install epel-release-6-8.noarch.rpm&#039;&#039;. Then install packages needed to read various file formats: &#039;&#039;yum install netcdf-devel hdf-devel hdf5-devel libicu-devel cfitsio-devel cppunit-devel rpm-devel rpm-build&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Build &#039;&#039;libdap&#039;&#039; and the &#039;&#039;BES&#039;&#039; daemon ==&lt;br /&gt;
&lt;br /&gt;
==== Get and build libdap4 ====&lt;br /&gt;
;WARNING: If you have &#039;&#039;libdap&#039;&#039; already, uninstall it before proceeding.&lt;br /&gt;
Build, test and install libdap4 into $prefix:&lt;br /&gt;
&amp;lt;b&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://github.com/opendap/libdap4&lt;br /&gt;
cd libdap4&lt;br /&gt;
autoreconf -fiv&lt;br /&gt;
./configure --prefix=$prefix --enable-developer &lt;br /&gt;
make -j9&lt;br /&gt;
make check -j9&lt;br /&gt;
make install&lt;br /&gt;
cd .. # Go back up to &#039;&#039;$prefix&#039;&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Get and build the BES and all of the modules shipped with Hyrax ====&lt;br /&gt;
Build, test and install the BES and its modules&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;git clone https://github.com/opendap/bes # Clone the BES from GitHub&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
cd bes # enter the bes dir.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;autoreconf --force --install --verbose # You can use -fiv instead of the long options.&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These means, when starting from a freshly cloned repo, run all of the autotools commands and install all of the needed scripts.&lt;br /&gt;
&lt;br /&gt;
Then, run configure:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;./configure --prefix=$prefix  --with-dependencies=$prefix/deps --enable-developer&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Notes:&lt;br /&gt;
:* The --with-deps... is not needed if you load the dependencies from RPMs or otherwise have them installed an generally accessible on the build machine.&lt;br /&gt;
:* The  --enable-developer option will compile in all of the debugging code which may affect performance even if the debugging output is not enabled.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;make -j9&lt;br /&gt;
make check -j9&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
Some tests may fail and adding &#039;&#039;-k&#039;&#039; ignores that and keeps make marching along. &#039;&#039;Note that you must run &#039;&#039;&#039;make&#039;&#039;&#039; before &#039;&#039;&#039;make check&#039;&#039;&#039; in the bes code&#039;&#039;.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;make install&lt;br /&gt;
cd .. # Go back up to $prefix&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Test the BES ====&lt;br /&gt;
Start the BES and verify that all of the modules build correctly.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;besctl start # Start the BES.&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
Given that &#039;&#039;$prefix/bin&#039;&#039; is on your &#039;&#039;$PATH&#039;&#039;, this should start the BES. You will not need to be root if you used the &#039;&#039;--enable-developer&#039;&#039; switch with configure (as shown above), otherwise you should run &#039;&#039;sudo besctl start&#039;&#039; with the caveat that as root &#039;&#039;$prefix/bin&#039;&#039; will probably not be n your &#039;&#039;$PATH&#039;&#039;.&lt;br /&gt;
:If there&#039;s an error (e.g., you tried to start as a regular user but need to be root), edit bes.conf to be a real user (yourself?) in a real group (use &#039;groups&#039; to see which groups you are in) and also check that the bes.log file is &#039;&#039;not&#039;&#039; owned by root. &lt;br /&gt;
:Restart.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt;bescmdln # Now that the BES is running, start the BES testing tool&lt;br /&gt;
BESClient&amp;gt; show version; # Send the BES the version command to see if it&#039;s running &amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
:Take a quick look at the output. There should be entries for libdap, bes and all of the modules.&lt;br /&gt;
&amp;lt;b&amp;gt;&amp;lt;pre&amp;gt; BESClient&amp;gt; exit; # Exit the testing tool&amp;lt;/pre&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that even though you have exited the &#039;&#039;bescmdln&#039;&#039; test tool, the BES is still running. That&#039;s fine - we&#039;ll use it in just a bit - but if you want to shut it down, use &#039;&#039;besctl stop&#039;&#039;, or &#039;&#039;besctl pids&#039;&#039; to see the daemon&#039;s processes. If the BES is not stopping, &#039;&#039;besctl kill&#039;&#039; will stop all BES processes without waiting for them to complete their current task.&lt;br /&gt;
&lt;br /&gt;
== Build the Hyrax &#039;&#039;OLFS&#039;&#039; web application ==&lt;br /&gt;
The OLFS is a java servlet built using ant. The OLFS is a java servlet web application and runs with Tomcat, Glassfish, etc. You need a copy of Tomcat, but our servlet does not work with the RPM version of Tomcat. Get [http://tomcat.apache.org/download-90.cgi Tomcat 9 from Apache]. Note that if you built the dependencies from source using the &#039;&#039;hyrac-dependencies-1.10.tar&#039;&#039; then there is a copy of Tomcat in the &#039;&#039;hyrax-dependecies/extra_downloads directory. You can unpack the Tomcat tar file in &#039;&#039;$prefix&#039;&#039;. I&#039;ll assume you have the Apache Tomcat tar file in &#039;&#039;$prefix&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
;tar -xzf apache-tomcat-9.0.105.tar.gz: Expand the Tomcat tar ball&lt;br /&gt;
;git clone https://github.com/opendap/olfs: Get the OLFS source code&lt;br /&gt;
;cd olfs: change directory to the OLFS source&lt;br /&gt;
;ant server: Build it&lt;br /&gt;
;cp build/dist/opendap.war ../apache-tomcat-9.0.105/webapps/: Copy the opendap web archive to the tomcat webapps direcotry.&lt;br /&gt;
;cd ..: Go up to &#039;&#039;$prefix&#039;&#039;&lt;br /&gt;
;./apache-tomcat-9.0.105/bin/startup.sh: Start Tomcat&lt;br /&gt;
&lt;br /&gt;
== Test the server ==&lt;br /&gt;
You can test the server several ways, but the most fun is to use a web browser. The URL &#039;&#039;http://&amp;lt;machine&amp;gt;:8080/opendap&#039;&#039; should return a page pointing to a collection of test datasets bundled with the server. You can also use &#039;&#039;curl&#039;&#039;, &#039;&#039;wget&#039;&#039; or any application that can read from OpenDAP servers (e.g., Matlab, Octave, ArcGIS, IDL, ...).&lt;br /&gt;
&lt;br /&gt;
== Stopping the server ==&lt;br /&gt;
Stop both the BES and Apache&lt;br /&gt;
&lt;br /&gt;
;besctl stop&lt;br /&gt;
;./apache-tomcat-7.0.57/bin/shutdown.sh&lt;br /&gt;
&lt;br /&gt;
Note that there is also a &#039;&#039;hyraxctl&#039;&#039; script that provides a way to start and stop Hyrax without you (or &#039;&#039;init.d&#039;&#039;) having to type separate commands for both the BES and OLFS. This script is part of the BES software you cloned from git.&lt;br /&gt;
&lt;br /&gt;
== Building select parts of the BES ==&lt;br /&gt;
Building just the BES and one of more of its handlers/modules is not at all hard to do with a checkout of code from git. In the above section on building the BES, simply skip the step where the submodules are cloned (&#039;&#039;git submodule update --init&#039;&#039;) and link configure.ac to &#039;&#039;configure_standard.ac&#039;&#039;. The rest of the process is as shown. The end result is a BES daemon without any of the standard Hyrax modules (but support for DAP will be built if &#039;&#039;libdap&#039;&#039; is found by the configure script).&lt;br /&gt;
&lt;br /&gt;
To build modules for the BES, simply go to &#039;&#039;$prefix&#039;&#039;, clone their git repo and build them, taking care to pass set &#039;&#039;$prefix&#039;&#039; when calling the module&#039;s &#039;&#039;configure&#039;&#039; script. &lt;br /&gt;
&lt;br /&gt;
Note that it is easy to combine the &#039;build it all&#039; and &#039;build just one&#039; processes so that a complete Hyrax BES can be built in one go and then a new module/handler not included in the BES git repo can be built and used. Each module we have on GitHub has a &#039;&#039;configure.ac&#039;&#039;, &#039;&#039;Makefile.am&#039;&#039;, etc., that will support both kinds of builds and [[Configuration of BES Modules]] explains how to take a module/handler that builds as a standalone module and tweak the build scripts so that it&#039;s fully integrated into the Hyrax BES build, too.&lt;br /&gt;
&lt;br /&gt;
= Building on Ubuntu =&lt;br /&gt;
This was tested using Xenial (Ubuntu 16)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;sudo apt-get update&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Packages needed:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;sudo apt-get install ...&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;ant junit git flex bison autoconf automake libtool emacs openssl bzip2 libjpeg-dev libxml2-dev curl libicu-dev vim bc make cmake uuid-dev libcurl4-openssl-dev libicu-dev g++ zlib1g-dev libcppunit-dev libssl-dev&#039;&#039;&#039;&lt;/div&gt;</summary>
		<author><name>Hir</name></author>
	</entry>
</feed>