Skip to content

Latest commit

 

History

History
58 lines (36 loc) · 2.93 KB

setup.md

File metadata and controls

58 lines (36 loc) · 2.93 KB

Run setup.py

Create a user that will own the loris application, e.g.:

$ sudo adduser loris

This user needs to have a home directory (unless you want to override it in the WSGI home= directive) and the user and group name should match the run_as_user and run_as_group options in the [loris.Loris] section of loris.conf and the --loris-owner and --loris-group options that you pass to setup.py (see below).

Finally, from the loris (not loris/loris) directory, run

$ sudo ./setup.py install

with the options of your choice.

For Ubuntu 20:

$ sudo python3 ./setup.py install

There are a bunch of flags that can be passed to setup.py install to customize where things wind up:

 --kdu-expand      Path to the Kakadu executable [Default: /usr/local/bin/kdu_expand]
 --libkdu          Path to __the directory that contains__ libkdu.so [Default: /usr/local/lib]
 --image-cache     Path to image cache directory [Default: /var/cache/loris]
 --tmp-dir         Path to temporary directory (loris will make its temporary files and pipes here) [Default: /tmp/loris]
 --www-dir         Path to www directory (wsgi and index file will be here) [Default: /var/www/loris]
 --log-dir         Path to directory for logs [Default: /var/log/loris]
 --source-images   Path to source images directory [Default: /usr/local/share/images]
 --config-dir      Where to put the config file. loris.conf will be here after install. [Default: /etc/loris]
 --info-cache      Path to info cache directory [Default: /var/cache/loris]
 --loris-owner     User that will own the application and has permission to write to caches. [Default: loris]
 --loris-group     Group that will own the application and has permission to write to caches. [Default: loris]

All of these will be updated in the config file during deployment.

After running setup.py, you have to run:

$ sudo ./bin/setup_directories.py 

This script will then create any directories that don't exist and set the ownership and permissions appropriately.

For Ubuntu 20:

$ sudo python3 ./bin/setup_directories.py

The loris.wsgi WSGI file should now have been created and can be found in the directory that is configured as the www_dp directory in the loris.conf file (by default: /var/www/loris).

Note again that Kakadu is no longer installed by the setup script; it didn't work for too many people. You may use the copy that is bundled with Loris, provided you comply with the terms outlined by NewSouth Innovations and this version works on your system. Either of these may well not be the case, in which case you will need to obtain a copy of Kakadu 7+ separately and may need to compile it for your system.


Proceed to Deploy with Apache or go Back to README