Skip to content

Manual Setup

Jeremy Echols edited this page Apr 16, 2020 · 6 revisions

Red Hat RAIS installation and setup

This guide may become out of sync with real-world setup, so please refer to the Dockerfile instead of this if you really need low-leve information! This is literally being written solely to help me. Nobody else. And I have low standards, so if this is semi-mostly-close-enough, that's okay.

Dependencies

RAIS needs OpenJPEG with dev headers:

yum install -y openjpeg2-devel

We need a relatively recent version of Go, not what RHEL has. On the plus side, you can install this as any user, not just root. In fact it's probably safer to install as a non-root user just so you aren't adding random binaries to your PATH when you run go get ....

cd ~
curl -OL https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz
tar -xzf go1.14.2.linux-amd64.tar.gz

Build

cd ~

# These may make sense in a .bashrc or similar to ease compiling RAIS in the future
export GOROOT=~/go
export GOPATH=~/gopath
export PATH=$PATH:~/go/bin

git clone [email protected]:uoregon-libraries/rais-image-server.git
cd rais-image-server
make rais-server

Configure

Let apache talk to RAIS:

semanage port -a -t http_port_t -p tcp 12415

Set up the rais config file by copying and modifying the example:

cp ~/rais-image-server/rais-example.toml /etc/rais.toml
vim /etc/rais.toml

TilePath and IIIIFURL need to be changed. CapabilitiesFile should probably be commented out or deleted.

Install the service

Replace $raispath with whatever path you cloned RAIS into, e.g.:

export raispath=/home/rais/rais-image-server

Copy files, register and start RAIS:

mkdir /usr/local/rais
cp -r $raispath/bin/* /usr/local/rais
cp $raispath/rh_config/rais.service /usr/local/rais
systemctl enable /usr/local/rais/rais.service
systemctl start rais