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.
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 25.
-
PHP 8.1 (or higher) is supported for LORIS 25.
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
-
NodeJS 16.10.0 (or higher)
-
NPM 8.19.2 (or higher)
-
make
sudo yum install httpd
sudo systemctl enable httpd
sudo systemctl start httpd
sudo yum install epel-release
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-8.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-php82
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
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 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
sudo yum install MariaDB-client 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.
curl --silent --location https://rpm.nodesource.com/setup_8.x | sudo bash -
sudo yum install -y nodejs
sudo curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
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.
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
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)
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
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 beroot
or a MariaDB user with permission to create databases and tables -
Admin Password
The password you set forroot
user when running themysql_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.