Installing Loris in Brief - aces/Loris GitHub Wiki

This document is out of date!

For install instructions, please visit our new guides for Ubuntu and CentOS.


Last tested on Ubuntu 16.04, LORIS 21.0.1

The following instructions must be executed in sequence. If you get an error at any of the steps, troubleshoot them before continuing.

Click here for Detailed installation instructions

When you're done, don't forget to continue following the rest of the Setup Guide including imaging setup.

Assumptions

  1. You are on Ubuntu 16.04; lsb_release -a should say Ubuntu 16.04
  2. You'll be ssh'ing into a remote machine. If you are not, just ignore the steps that tell you to ssh

RaisinBread

If you are a LORIS team developer installing RaisinBread (new for LORIS 21):

  • See also the Readme in the raisinbread/ directory in this repo (choose your branch wisely)
  • Use your MCIN login to view this beta install doc

Getting Prerequisites

  1. ssh into your remote machine as a user in the sudo group (like root)
  2. sudo apt-get update
  3. sudo apt-get install -y mysql-server mysql-client
  4. sudo apt-get install -y zip curl wget python-software-properties software-properties-common
  5. sudo add-apt-repository ppa:ondrej/php
  6. sudo apt-get update
  7. sudo apt-get install -y apache2
  8. sudo apt-get install -y php7.2 php7.2-mysql php7.2-xml php7.2-json php7.2-mbstring php7.2-gd php-ast
  9. sudo apt-get install -y composer
  10. sudo apt-get install -y libapache2-mod-php7.2
  11. sudo a2enmod php7.2
  12. sudo service apache2 restart

Creating a user for LORIS

  1. ssh into your remote machine as a user in the sudo group (like root)
  2. sudo useradd -U -m -G sudo -s /bin/bash lorisadmin
  3. sudo passwd lorisadmin
  4. su - lorisadmin
  5. whoami, you should see lorisadmin

Downloading LORIS

Make sure you're ssh'd as lorisadmin

Note that the path is assumed to be var/www/loris however your own path may be var/www/<project-name>, depending on your setup.

  1. cd /var/www
  2. Get the latest release URL and then (e.g.) sudo wget https://github.com/aces/Loris/archive/v21.0.1.zip -O release.zip
  3. sudo unzip release.zip
  4. ls, you should see a directory named Loris-_XX-X-X_
  5. sudo mv Loris* loris
  6. ls, you should see a loris directory
  7. sudo rm release.zip
  8. sudo chown -R lorisadmin.lorisadmin loris

Running the Install Script

Make sure you're ssh'd as lorisadmin

Note that the path is assumed to be var/www/loris however your own path may be var/www/<project-name>, depending on your setup.

  1. cd /var/www/loris/tools
  2. ./install.sh
  3. Fill in your <project-name> (You get to choose what it is)
  4. When install.sh asks to configure apache2 for you, accept
  5. Key in lorisadmin's password
  6. Wait
  7. Installation complete
  8. Run make (for production instances) or make dev (for development sandboxes)

Configuring Apache2

After running the install script, if your apache configuration isn't working, try:

  1. sudo a2enmod rewrite
  2. sudo a2ensite <project-name>
  3. sudo service apache2 restart

Installing the Database - 1 of 2

You must already have MySQL installed, and MySQL root credential set up.

  1. Figure out your <loris-url> (It's probably the IP address of your remote machine)
  2. Open your internet browser
  3. Navigate to <loris-url>/installdb.php
  4. Fill in <mysql-host-name>; if the MySQL server is on the same machine that is hosting Loris, it will be localhost
  5. Fill in <mysql-admin-username>; it is easiest to just use the existing MySQL root credential
  6. Fill in <mysql-admin-password>
  7. Fill in <mysql-database>; this database must not exist yet as the installer will try to create it
  8. Submit

Installing the Database - 2 of 2

  1. Fill in <mysql-user-username>, <mysql-user-password>; must not be the same as root/admin MySQL credential
  2. Fill in <loris-admin-username>, <loris-admin-password>; 8 or more characters, must include a capital letter and a special character
  3. Submit

Logging In to the LORIS Admin Panel

  1. Open your internet browser
  2. Navigate to <loris-url>
  3. Fill in <loris-admin-username>
  4. Fill in <loris-admin-password>
  5. Log in


You now have the basic LORIS features installed and are ready to set up configurations, Behavioural instruments and Imaging support.

Troubleshooting the basic installation

Help! <loris-url> is loading a blank white page!

Help! <loris-url> is saying it cannot read/write templates_c!

Note that the path is assumed to be var/www/loris however your own path may be var/www/<project-name>, depending on your setup.

Check the following:

  1. Verify the host and base path settings in your Config table.
    If your front-end is not loading: Back-end troubleshooting instructions here

  2. That /var/www/loris/smarty/templates_c exists; if it doesn't,

    1. cd /var/www/loris/smarty
    2. sudo mkdir templates_c
    3. sudo chmod 777 templates_c
  3. That /var/www/loris/smarty/templates_c is owned by www-data (Run ls -al /var/www/loris/smarty to check) or has 777 permissions (Not ideal but install.sh does something similar, Run sudo chmod 777 /var/www/loris/smarty/templates_c)

⚠️ **GitHub.com Fallback** ⚠️