LORIS CentOS 7.x Notes

This document contains supplemental details on how to perform a basic CentOS 7.x install of LORIS. Note that the main README in LORIS assumes that LORIS is being run on Ubuntu.

This Readme assumes some familiarity with Linux, MariaDB (MySQL) and Apache.

For further details on the install process, please see the LORIS GitHub Wiki CentOS Install page.

System Requirements - Install dependencies

Default dependencies installed by CentOS 7.x may not meet the version requirements for LORIS deployment or development: * MariaDB 10.3 is supported for LORIS 23.

  • PHP 7.3 (or higher) is supported for LORIS 23. PHP 7.4 is recommended.

In addition to the above, the following packages should be installed with yum and may also differ from the packages referenced in the main (Ubuntu) LORIS Readme. Detailed command examples are provided below (sudo privilege may be required depending on your system). * Apache 2.4 or higher

  • Composer

  • NodeJS 8.0 or higher

  • NPM >= 8.0

  • make

Apache2

sudo yum install httpd 
sudo systemctl enable httpd
sudo systemctl start httpd

PHP 7.4

sudo yum install epel-release
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum install yum-utils
sudo yum update

# By default, the repository for PHP 5.4 is enabled
# Make sure to have only one repository for PHP enabled
sudo yum-config-manager --disable remi-php54
sudo yum-config-manager --enable remi-php74
sudo yum install php php-pdo php-pdo_mysql php-fpm php-gd php-json php-mbstring php-mysqlnd php-xml php-xmlrpc php-opcache

MariaDB

MySQL is not recommended/supported on CentOS, see paragraph 2 here for background). MySQL and MariaDB are nearly identical in operation.

Note: LORIS developers (those NOT working with a .zip release codebase) should skip steps relating to hosting their database locally. Contact your system administrator for database credentials.

Configure MariaDB repository

Configure MariaDB repository by manually creating the file /etc/yum.repos.d/MariaDB.repo with the following details:

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.3/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Install GPG key with:

sudo rpm --import https://yum.mariadb.org/RPM-GPG-KEY-MariaDB

Database client and server packages.

sudo yum install MariaDB-client MariaDB-server

Starting MariaDB server

sudo systemctl start mariadb 
sudo systemctl enable mariadb
sudo systemctl status mariadb

To finalise the MariaDB installation:

sudo mysql_secure_installation

Then follow instructions to create a password for the root user.

NodeJS

curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
sudo yum install -y nodejs

PHP Composer

sudo curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

Get the Code

Download the latest release from the releases page to the home directory (~/), unzip it, and copy the contents to your project directory, /var/www/loris (we recommend naming your project directory loris, although you can use a different naming convention if you prefer).

wget https://github.com/aces/Loris/archive/v$VERSION.tar.gz
tar -zxf Loris-%VERSION%.tar.gz
cp -r Loris-%VERSION%/ /var/www/loris
chown -R lorisadmin:apache /var/www/loris

Alternatively the latest development branch can be obtained by forking the LORIS repository for development purposes. We do not support unstable dev branches.

Configure Apache

A sample apache configuration file is in docs/config/apache2-site. The install script will ask if you want to automatically create/install apache config files. It is recommended to perform this step manually --: copy our sample file to the apache configuration directory (/etc/httpd/conf.d/) and adjust the parameters according to your configuration:

cd /var/www/loris
cp docs/config/apache2-site /etc/httpd/conf.d/loris.conf

Customize and Verify your settings: * Paths and settings in /etc/httpd/conf.d/loris.conf should be populated appropriately for your server. Replace placeholders such as:

- %LORISROOT%    i.e. /var/www/loris
- %PROJECTNAME%  i.e loris
- %LOGDIRECTORY%  .i.e /var/log/httpd
  • DocumentRoot should point to /var/www/loris/htdocs

Finally, restart apache:

sudo systemctl restart httpd
sudo systemctl status httpd

Install LORIS

For the purpose of following LORIS conventions and easy understanding of all LORIS documentation, we recommend the following account names:

  • lorisadmin unix user with sudo permission who will setup and manage the LORIS back-end

  • lorisuser MySQL database user with limited (insert, delete, update, select...) permissions, for database transactions requested by the Loris front-end

  • admin default front-end username for LORIS administrator account (login via browser)

Run the LORIS install script to set up directories

cd /var/www/loris/tools
./install.sh

Run the makefile (use make dev if you are setting up a development sandbox)

cd /var/www/loris
make

Install your database

Open your browser and go to: http://%IPADDRESS%/installdb.php

(%IPADDRESS% will likely be the IP address of the VM you are ssh'ed into)

The web page will prompt you for the following information:

  • Server Hostname localhost if your database is hosted on your VM or the IP address of your database server

  • Admin Username should be root or a MariaDB user with permission to create databases and tables

  • Admin Password The password you set for root user when running the mysql_secure_installation step

  • Database Name set to "LORIS" by default, can be customised

Click submit, and on the next screen that is presented, follow instructions to enter the username and password of your LORIS database user (lorisuser), and front-end admin user.

If you encounter issues creating/generating your config file, you may have to manually paste the xml output that appears on the screen into the file /var/www/loris/project/config.xml

Your LORIS instance should now be accessible by pointing your browser URL to http://%IPADDRESS%

If there are any errors or you get a blank page, troubleshoot the errors in your apache error log - by default /var/log/httpd/loris-error.log

Next: Follow the Setup Guide in the LORIS wiki for all post-install steps and troubleshooting.
Config settings can be accessed via the front-end Config module under the Admin drop-down menu.

Please see the main (Ubuntu) LORIS Readme for info on our Community, Contributing, and who we are.