Installation Guide

This page presents how to install and run your Shanoir server.

Requirements

Minimal Configuration

  • 1GB RAM
  • 1GB Hard-Disk space (this is only for server deployment, plan a consequent space for archiving your neuroimaging data such as a NAS)
  • 1GHz CPU

These are the minimal requirements. A better configuration means a faster application.

Software

You will need the following applications installed on your server :

  • JDK 1.6
  • JBoss AS Server 4.2.3 GA
  • Ant 1.7.1 or later
  • DBMS : MySql, PostgreSQL…

Download

You can either :

Unzip the archive

Unzip the archive in a directory of your choice. In the following, we will call this directory ${SHANOIR_HOME}.

Optional : PACS Server

If you would like to store a copy of the anonymized original DICOM data during the import process within your Shanoir system, then you need to install a PACS server. The chosen server is dcm4chee. Follow the installation process described here.

See Purpose of the PACS

Set SHANOIR_HOME Environment Variable

Set the SHANOIR_HOME Environment Variable to the directory where you unzip Shanoir.

How to set an environment variables

Run the installation script

Don't forget to configure the setup.conf file according to your environment.

Under Linux

Go to the directory bin and run the installation script install.sh with admin rights (use sudo)

If you are using 64-bit Ubuntu edition, don't forget to install the 32-bit compatibility libraries :

sudo apt-get install ia32-libs
cd scripts
sudo ./install.sh

Deploy, Start, Test and Stop your application

Configure the JBoss Server

Follow the instructions described in the page Configuration of JBoss AS.

Be aware that if you intend to install SHANOIR in front-end and a backup PACS server (the one that keeps copy of the anonymized original DICOM i.e. dcm4chee) on the same machine, it involves additional setting that are described here.

Create the database

Shanoir uses a relational DBMS to store meta-data. You must create the database schema on your favourite DBMS. Any of the DBMS's supported by Hibernate should make it. However, we recommend MySql as we used it in our dev environment. Click on the database you would like to use and follow the installation steps in order to create your database schema.

Start the application

To start the application, you get to run the command :

With Windows :

$JBOSS_HOME/bin>./run.bat start -b 0.0.0.0

With Linux :

$JBOSS_HOME/bin>./run.sh start -b 0.0.0.0

Test the application

  1. To test, go to http://localhost:8080/Shanoir. If everything is alright you will see the login screen.
  2. By default, login : admin, pass : admin. (Think about changing it in production environment)

Stop the application

To stop the application, run this command :

With Windows :

$JBOSS_HOME/bin>./run.bat stop

With Linux :

$JBOSS_HOME/bin>./run.sh stop

Daily Maintenance / Cleaning Script

To maintain a - production - server, there are good working practices. We recommend to perform these tasks every nights :

  • Stop the JBoss server
  • Clean the temporary files created by Shanoir
  • Restart the JBoss server

These actions makes sure your Shanoir will keep running efficiently. This is quiet common to have memory leaks with a JVM.

We provide two scripts :

  • the cleaning script : Shanoir/scripts/clear_tempFiles.sh
  • the script to start JBoss : Shanoir/scripts/shanoird

:!: Think about adapting the parameters to your local settings (LOG_FOLDER directory, JBOSS_HOME directory, etc.) :!:

If you are running your Shanoir server from Linux, here is a tip to automate the script's execution daily at 5 am:

As a super user (sudo), create or update the file /etc/cron.allow adding the current user name.

Copy the script clear_tempFiles.sh in $JBOSS_HOME/bin. Edit the crontab of the current user typing crontab -e, and add the following line :

# m h  dom mon dow   command
00 5 * * * sudo /etc/init.d/shanoird stop
05 5 * * * sudo /home/shanoir/shanoir/bin/clear_temp_files.sh
10 5 * * * sudo /etc/init.d/shanoird start

In the previous code snippet, adapt the /home/shanoir directory to the “home” of the user account used to run the Shanoir server.

How to install several Shanoir on one server

It can be necessary to install several Shanoir on only one server. And this can be problematic with the current JBoss configuration.

To install several Shanoir on one server, follow the instructions here.


Personal Tools