-
Notifications
You must be signed in to change notification settings - Fork 19
Installation
Thomas Hufschmidt edited this page Oct 24, 2017
·
30 revisions
The following text contains a short installation guide and a few tips.
- Go to your ILIAS installation directory:
cd ${ILIAS_DIR}
- Create the plugin directory-structure as required by ILIAS:
mkdir -p Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST
- Change into the newly created directory tree:
cd Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST
- Download and extract the latest Releases into this directory.
wget https://github.com/hrz-unimr/Ilias.RESTPlugin/archive/${RELEASE_VERSION}.zip
unzip ${RELEASE_VERSION}.zip
rm ${RELEASE_VERSION}.zip
- [Optional] Delete the tools directory on production servers:
rm -rf tools/
- Make sure this directory is readable by the webserver (eg. owned by www-data):
chown -R www-data:www-data .
- [Optional] Create a writeable log-file for the RESTPlugin:
touch ${ILIAS_LOG_DIR}/restplugin-${ILIAS_CLIENT}.log
chmod 644 ${ILIAS_LOG_DIR}/restplugin-${ILIAS_CLIENT}.log
chown www-data:www-data ${ILIAS_LOG_DIR}/restplugin-${ILIAS_CLIENT}.log
- Update the database and activate the plugin by logging into ILIAS and navigating to:
- Administration > Plugins > REST (Actions) > Update
- Administration > Plugins > REST (Actions) > Activate
In case of a major code revision it may become necessary to reinstall the plugin. It should not happen very often and we will indicate it in the release notes if it is necessary.
DROP TABLE IF EXISTS ui_uihk_rest_client, ui_uihk_rest_user, ui_uihk_rest_perm, ui_uihk_rest_config, ui_uihk_rest_authcode, ui_uihk_rest_refresh, ui_uihk_rest_challenge, ui_uihk_rest_keys, ui_uihk_rest_oauth2, ui_uihk_rest_key2user, ui_uihk_rest_key2ip;
DROP TABLE IF EXISTS ui_uihk_rest_access, ui_uihk_rest_authcode, ui_uihk_rest_client, ui_uihk_rest_config, ui_uihk_rest_perm, ui_uihk_rest_refresh;
DELETE FROM il_plugin WHERE component_type = 'Services' AND component_name = 'UIComponent' AND slot_id = 'uihk' AND name = 'REST';
rm -rf ${ILIAS_DIR}/Customizing/global/plugins/Services/UIComponent/UserInterfaceHook/REST
- The variables ${ILIAS_DIR} and ${ILIAS_LOG_DIR} should point to your ILIAS installation directory (eg. /var/www/ilias) and the external logging directory set during ILIAS installation (eg. /var/log/ilias) respectively, while ${ILIAS_CLIENT} is the name of the/all ILIAS client(s) using the RESTPlugin.
- On a unix-like operating-systems make sure the ILIAS and the plugin directory is readable and the log-file is writeable by the webserver, eg.:
chown -R www-data:www-data ${ILIAS_DIR}/
chmod -R 755 ${ILIAS_LOG_DIR}/
- While the introduction of the new
whoops!
error-handler with ILIAS 5.1 is really awesome, it is currently causing issues with the way the REST-Plugin wants to forward any error to the endpoint as valid JSON. For this reason it is best to ensure error-reporting does not enable anyE_NOTICE
,E_WARNING
and most importantlyE_STRICT
error. Otherwise routes may fail because a notice or warning was generated!