This describes how to get and build Hyrax from our GitHub repositories.
To build and install the server, you need to perform two steps:
-
Set up the computer to build source code (Install a
Java
compiler; install aC/C++
compiler; add some other tools)
The latest version of Hyrax (1.17.0) is build and tested using RHEL8. Below we describe the tools needed to build source code, and how to install them on Linux.
-
Get the commands
ps
,which
, etc.
dnf install -y procps
-
Get the
C++
environment plus build tools.
dnf install -y git gcc-c++ flex bison cmake autoconf automake libtool emacs bzip2 vim bc
-
Development library versions
dnf install -y openssl-devel libuuid-devel readline-devel zlib-devel bzip2-devel libjpeg-devel libxml2-devel curl-devel libicu-devel libtirpc-devel
-
Install Java
dnf install -y java-17-openjdk java-17-openjdk-devel ant
-
Setup
DNF
so that we can load in some obscure packages fromEPEL
, etc., repos.
dnf install dnf-plugins-core
dnf install epel-release
dnf config-manager --set-enabled powertools
-
Install
CppUnit
and some more development libraries.
dnf install -y cppunit cppunit-devel openjpeg2-devel jasper-devel
-
Install the RPM tools
dnf install -y rpm-devel rpm-build redhat-rpm-config
-
Install the AWS CLI
dnf install -y awscli
Once the tools are installed on your local Linux (RHEL8) machine, we proceed to
-
Clone the Hyrax project repo.
git clone https://github.com/OPENDAP/hyrax.git
and then cd hyrax
.
-
Use
bash
. The shell scripts in this repo assume you are using bash.
-
Set up some environment variables. This helps so that the server builds an installation locally, something that streamlines development.
source spath.sh
Warning
|
Many of the problems people have with the build stem from not setting the shell correctly for the build. In the above section, make sure you run source spath.sh before you run any of the building/compiling/testing commands that use the source code or build files.
|
./hyrax_clone.sh -v
-
Build the code, including the dependencies.
./hyrax_build.sh -v
-
Test the Server
We strongly recommend to test the server. For that, do:
-
Start the
BES
with
besctl start
-
Start the
OLFS
by:
./build/apache-tomcat-7.0.57/bin/startup.sh
-
Look at Hyrax’s landing page on localhost, i.e. paste the following URL on a browser:
http://localhost:8080/opendap
You should see a directory named data
and following that link should lead to more data. The server will be accessible to clients other than a web browser.
-
To test the
BES
function independently of the front end, use
bescmdln
This snhould start the BESClient>
. Then do:
BESClient> show version
and exit as follows:
BESClient> exit