Skip to content

Manual Setup

Jeremy Echols edited this page Feb 19, 2024 · 6 revisions

Red Hat RAIS installation and setup

This guide may become out of sync with real-world setup, so please refer to Installation for general installation help, or the Dockerfile if you really need low-level information!

This is primarily here to document how we use RAIS with our Open ONI site, as opposed to a general-purpose installation guide.

Dependencies

RAIS needs OpenJPEG with dev headers:

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

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

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, IIIFBaseURL and IIIFWebPath should probably 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