Skip to content

Latest commit

 

History

History
160 lines (115 loc) · 3.73 KB

Hyrax_Source_Installation.adoc

File metadata and controls

160 lines (115 loc) · 3.73 KB

Hyrax GitHub Source Build

This describes how to get and build Hyrax from our GitHub repositories.

To build and install the server, you need to perform two steps:

  1. Set up the computer to build source code (Install a Java compiler; install a C/C++ compiler; add some other tools)

  2. Build Hyrax using shell scripts

1. Setup Rocky 8 (RHEL8) to build source code

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.

  1. Get the commands ps, which, etc.

dnf install -y procps
  1. Get the C++ environment plus build tools.

dnf install -y git gcc-c++ flex bison cmake autoconf automake libtool emacs bzip2 vim bc
  1. 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
  1. Install Java

dnf install -y java-17-openjdk java-17-openjdk-devel ant
  1. Setup DNF so that we can load in some obscure packages from EPEL, etc., repos.

dnf install dnf-plugins-core
dnf install epel-release
dnf config-manager --set-enabled powertools
  1. Install CppUnit and some more development libraries.

dnf install -y cppunit cppunit-devel openjpeg2-devel jasper-devel
  1. Install the RPM tools

dnf install -y rpm-devel rpm-build redhat-rpm-config
  1. Install the AWS CLI

dnf install -y awscli

2. Build Hyrax using semi-automatic build tools from repo

Once the tools are installed on your local Linux (RHEL8) machine, we proceed to

  1. Clone the Hyrax project repo.

git clone https://github.com/OPENDAP/hyrax.git

and then cd hyrax.

  1. Use bash. The shell scripts in this repo assume you are using bash.

  1. 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.
  1. Clone the three code repos for the server plus the hyrax dependencies Because Hyrax data server is composed of BES, OLFS and libdap, each with their own separate repository, each needs to be compiled. The simple following shell scrips clones and downloads the repos:

./hyrax_clone.sh -v
  1. Build the code, including the dependencies.

./hyrax_build.sh -v
  1. Test the Server

We strongly recommend to test the server. For that, do:

  1. Start the BES with

besctl start
  1. Start the OLFS by:

./build/apache-tomcat-7.0.57/bin/startup.sh
  1. 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.

  1. 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