Skip to content

Latest commit

 

History

History
121 lines (88 loc) · 4.22 KB

README.CentOS6.md

File metadata and controls

121 lines (88 loc) · 4.22 KB

#LORIS CentOS 6.x Notes

Note that the main README in LORIS assumes that LORIS is being run on Ubuntu.

This document contains details on how to manually perform a basic CentOS 6.x install of LORIS without using the install script (as the install script makes some assumptions about apt-get being installed.)

It assumes you already understand basic UNIX, MySQL and Apache setup and settings. If you're not already comfortable troubleshooting sysadmin issues, you should not follow this guide.

1. System Requirements

The yum packages to be installed vary from the Ubuntu packages referenced in the LORIS README

The following should be installed with yum:

yum install httpd
yum install php
yum install php-pear
yum install php-pdo
yum install php-mysql
yum install mysql

PHP Composer must also be installed:

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

Note that the version of PHP installed by CentOS 6.x doesn't meet the minimum requirements of many development dependencies. As a result, you need to either upgrade your version of PHP to 5.6 for LORIS 16.0 Or run composer with the --no-dev option. (Upgrading PHP is preferred, but for now we'll assume you just want to get it running, so we'll run it with --no-dev.)

# Will download all of LORIS's library requirements, assuming an
# active internet connection. This must be done from the LORIS
# root directory that you downloaded and extracted LORIS into
composer install --no-dev

1.1 MySQL

This details how to manual populate the MySQL database which is assumed to already exist (if not, create one before proceeding)

Connect to MySQL, use your database and source the SQL/0000-00-00-schema.sql file into it.

There are a few settings in the Config module that LORIS currently depends on being updated to load correctly that must be set manually from MySQL as they're normally set by the install script.

UPDATE Config SET Value='/var/www/loris/' WHERE ConfigID=(SELECT ID FROM ConfigSettings WHERE Name='base');
UPDATE Config SET Value='localhost' WHERE ConfigID=(SELECT ID FROM ConfigSettings WHERE Name='host');
UPDATE Config SET Value='http://localhost' WHERE ConfigID=(SELECT ID FROM ConfigSettings WHERE Name='url');

Where /var/www/loris/ is the location where LORIS is installed and assuming you'll be running on localhost (otherwise update host and url appropriately)

While connected to MySQL, you can also reset the admin password:

-- Reset password to YOURPASSWORD
UPDATE users SET Password_md5=CONCAT('aa', MD5('aaYOURPASSWORD')) WHERE ID=1;

1.2 Config.xml

Create a directory named "project" directory under the LORIS root, and copy the sample config.xml from docs/config/config.xml to project/config.xml

Update the database section of the config.xml to point to the database you just configured with an appropriate user.

1.3 Apache

A sample apache configuration file is in docs/config/apache2-site. You can copy this file to the apache configuration directory (/etc/httpd/conf.d/), adding the appropriate suffix:

cp docs/config/apache-site /etc/httpd/conf.d/apache-site.conf

Update the paths and settings in this new file as appropriate for your server, ensuring that all placeholders (%LORISROOT%, %PROJECTNAME%, %LOGDIRECTORY%) are populated. Ensure that the DocumentRoot is pointing to the htdocs/ directory under your LORIS root (usually /var/www/loris/htdocs).

You'll have to create a smarty/templates_c/ directory under the LORIS root and assure that it's writable by Apache.

1.4 Last steps

Finally, SELinux will block MySQL connections from PHP. For now, we'll disable SELinux (though on a production server you should learn how to properly configure it instead.)

echo 0 >/selinux/enforce

And restart apache

service httpd stop
service httpd start

At this point, you should be able to log in to LORIS at http://localhost/ using the username "admin" and the password that you set in section 1.1. Further configuration can be done using the LORIS configuration module.

If there are any errors or you get a blank page, you'll have to troubleshoot based on the errors in your apache error log (by default /var/log/httpd/error_log)