wiki:Opal HowTo Install

Opal HowTo Install

Tags: HowTo Opal



We followed the Installation of Opal Zip distribution instructions that installed Opal from a zip file.

  1. Download Opal distribution into the /local/ directory
  2. Unzip the Opal distribution. Note that the zip file contains a root directory named opal-server-{version}.
  3. Create an Opal home directory (to facilitate subsequent upgrades) using the command mkdir opal-home.
  4. Create a symbolic link to the Opal server directory, using the command ln -s opal-server-{version} opal_server
  5. Copy the conf directory from the server directory into the home directory, using the command cp -r opal-server/conf opal-home.
  6. Create a script called in the /local/ directory containing the following:
#!/usr/bin/env bash

echo "Starting Opal"

export JAVA_HOME=/opt/java
export PATH=$JAVA_HOME/bin:$PATH
export JAVA_TOOL_OPTIONS=-XX:CompressedClassSpaceSize=10m

#export JAVA_OPTS="-Xmx200m  -XX:-UseCompressedClassPointers"
export JAVA_OPTS="-Xmx2G -XX:-UseCompressedClassPointers"
export OPAL_HOME="/local/opal-home"

/local/opal-server/bin/opal start

echo "Ended"

The java options are:

increase the memory allocated to Java to 2GB
Do not compress class pointers (because Opal creates too many classes?)
  1. Edit the /local/apache2/etc/loadmodule.conf to add the following lines at the bottom:
    # For Opal proxying
    LoadModule proxy_module /usr/lib64/apache2-prefork/
    LoadModule proxy_http_module /usr/lib64/apache2-prefork/
    ProxyPass / http://localhost:8080/


  • Opal uses the HTTP OPTIONS method to check authorisation. Therefore you need to allow this method through the firewall for Opal to work. If you do not, no buttons will appear in Opal to allow you to do anything. Very frustrating and confusing.

Running as wwwrun


The following permission changes should be used to make Opal run as wwwrun, but they don't work yet!

    setfacl -R -m u:wwwrun:rwx /local/opal-home
    setfacl -m u:wwwrun:rwx /local/

Starting Opal

    sudo -u wwwrun /local/

ToDo: This needs to start on boot

Opal Post Installation


Opal Database Setup


1. Update MySql Config

  1. The config file for MySQL files on a LAMP server is stored at /db/mysql/etc/my.cnf
  2. Change the default character set in the [mysqld] section:
  1. Change the storage engine in the [mysqld] section:

Actually these both look OK, with the exception that the collation is utf8_general_ci, so I will just change that

2. Create Databases

  1. Create the following script:
# Create Opal database and user.
# Command: mysql -u lampuser -p < create_opal_databases.sql
CREATE USER 'opal_data' IDENTIFIED BY '<opal-data-user-password>';
GRANT ALL ON opal_data.* TO 'opal_data'@'localhost' IDENTIFIED BY '<opal-data-user-password>';

CREATE DATABASE opal_identifiers CHARACTER SET utf8 COLLATE utf8_bin;
CREATE USER 'opal_identifiers' IDENTIFIED BY '<opal-identifiers-user-password>';
GRANT ALL ON opal_identifiers.* TO 'opal_identifiers'@'localhost' IDENTIFIED BY '<opal-identifiers-user-password>';
  1. Change the passwords to something appropriate
  2. Run the script like it says in the command comment at the top of the script.

3. Register Databases with Opal


  1. Log into the Opal web application as administrator
  2. If none have already been set up, it will ask you to enter the details of the

Installing RServe



Again from Olly's notes:

sudo -u wwwrun R
  • When you install the package in R it puts a folder called R in your home directory. Several Layers down this you will find the RServe binary. Mine in at ~/R/x86_64-suse-linux-gnu-library/3.1/Rserve/libs/Rserve. At the minute it errors that it doesn't know where the R home directory is, but hopefully I can find that out from somewhere.

To run Rserve manually

    export  R_HOME='/usr/lib64/R'

ToDo: This needs to be started on reboot. An example of how to do it can be found at:

Install Opal DataShield Packages

  1. In Opal go to Administration / DataSHIELD
  2. Click on Add Package
  3. Select Install all DataSHIELD packages
  4. Click Install button

Installing DataShield


Error: Macro BackLinks(None) failed
'Environment' object has no attribute 'get_db_cnx'

Last modified 7 years ago Last modified on 08/20/15 08:38:31
Note: See TracWiki for help on using the wiki.