Skip to content

Installing Loris in Brief

suzanne-lee edited this page Aug 14, 2017 · 42 revisions

This page details steps for Ubuntu 16.04, for Loris 17.*

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

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

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.0 php7.0-mysql php7.0-xml php7.0-json php7.0-mbstring php7.0-gd
  9. sudo apt-get install -y composer
  10. sudo apt-get install -y libapache2-mod-php7.0
  11. sudo a2enmod php7.0
  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/$projectname 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/v17.0.6.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 lorisadmin.lorisadmin loris

Running the Install Script

Make sure you're ssh'd as lorisadmin

  1. cd /var/www/loris/tools
  2. sudo ./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

Configuring Apache2

Assuming you let the install script configure apache2 for you but it didn't work out for some reason.

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

Installing the Database - 1 of 2

  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 root
  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>; they can be anything you want, really
  2. Fill in <loris-admin-username>, <loris-admin-passwrd>; they can be anything you want, really
  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
  6. Maybe add your username and password to a password manager?


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!

Check the following:

  1. 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
  2. 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)

Clone this wiki locally