Version 19 (modified by 9 years ago) ( diff ) | ,
---|
Opal HowTo Install
See: http://wiki.obiba.org/display/OPALDOC/Opal+Installation+Guide
Process
We followed the Installation of Opal Zip distribution
instructions that installed Opal from a zip file.
- Download Opal distribution into the
/local/
directory - Unzip the Opal distribution. Note that the zip file contains a root directory named
opal-server-{version}
. - Create an Opal home directory (to facilitate subsequent upgrades) using the command
mkdir opal-home
. - Create a symbolic link to the Opal server directory, using the command
ln -s opal-server-{version} opal_server
- Copy the
conf
directory from the server directory into the home directory, using the commandcp -r opal-server/conf opal-home
. - Create a script called
start_opal.sh
in the/local/
directory containing the following:
#!/usr/bin/env bash echo "Starting Opal" export JAVA_OPTS="-Xmx2G -XX:-UseCompressedClassPointers" export OPAL_HOME="/local/opal-home" /local/opal-server/bin/opal echo "Ended"
The java options are:
- -Xmx2G
- increase the memory allocated to Java to 2GB
- -XX:-UseCompressedClassPointers
- Do not compress class pointers (because Opal creates too many classes?)
Gotcha
- 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
Permissions
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
Starting Opal
sudo -u wwwrun /local/start_opal.sh
ToDo: This needs to start on boot
Opal Post Installation
See:
Opal Database Setup
See:
1. Update MySql Config
- The config file for MySQL files on a LAMP server is stored at
/db/mysql/etc/my.cnf
- Change the default character set in the
[mysqld]
section:
default-character-set=utf8 default-collation=utf8_bin
- Change the storage engine in the
[mysqld]
section:
default-storage-engine=INNODB
Actually these both look OK, with the exception that the collation is utf8_general_ci, so I will just change that
2. Create Databases
- Create the following script:
# Create Opal database and user. # # Command: mysql -u lampuser -p < create_opal_databases.sql # CREATE DATABASE opal_data CHARACTER SET utf8 COLLATE utf8_bin; 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>'; FLUSH PRIVILEGES; 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>'; FLUSH PRIVILEGES;
- Change the passwords to something appropriate
- Run the script like it says in the command comment at the top of the script.
3. Register Databases with Opal
See:
- Log into the Opal web application as administrator
- If none have already been set up, it will ask you to enter the details of the
Installing RServe
Resources
- https://rforge.net/Rserve/
- https://rforge.net/Rserve/doc.html
- http://cran.r-project.org/web/packages/Rserve/Rserve.pdf
Installation
Again from Olly's notes:
sudo -u wwwrun R install.packages('Rserve')
- 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.
ToDo: This needs to be started on reboot. An example of how to do it can be found at: http://wiki.obiba.org/display/OPALDOC/R+Server+Installation+Guide.
Install Opal DataShield Packages
- In Opal go to
Administration / DataSHIELD
- Click on
Add Package
- Select
Install all DataSHIELD packages
- Click
Install
button
Installing DataShield
See:
- http://datashield.org/documentation/administrators.html#serversetup
- http://wiki.obiba.org/display/OPALDOC/Opal+DataSHIELD+User+Guide