Skip to content

Scripts for DSpace (Replication, Upgrade & Install Automatic Tasks Suite).

License

Notifications You must be signed in to change notification settings

bankashi/Scripts-for-DSpace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DSpace Replication, Upgrade & Install Automatic Tasks Suite

This project represents a collection of files and scripts be code files (having a .sh extension). For example, crontab scripts, Dublin Core Application Profile Guidelines or customize XML files. This will help you how to create a repository DSpace and how to replicate or upgrade core dspace, aspects and themes for Manakin (dspace-xmlui), and other webservice/applications without complicated Technical documentation.

Our goal is to help your IT department or future DSpace members to maintain and develop their repositories. As many institutions have limited support, DSpace members should have best practice strategies to support the institutional missions.

Prerequisite

  • Ubuntu Server 16.04.x LTS (Tested and Supported Software).
  • Root user or Super User (ability to read, modify and execute specific files and directories).
  • dos2unix (DOS-based text files use a pair of carriage return "CR" and line feed "LF" as a new-line delimiter).
  • Don't install unnecessary packages.

How do I get set up?

First, use dos2unix in the script

$ apt-get install dos2unix -y
$ dos2unix DSpace-RUI.sh

now, run the script. This script has three options (1. Replication, 2. Upgrade & 3. Install), please select the option of your preference and follow the instructions of the script

$ . ./DSpace-RUI.sh

Documentation

This script is based on the DSpace 6.x Documentation

General Information

  • Written: bankashi
  • Version: 2.5 RC

Miscellaneous

Note: For example, the installation path is /

Scheduled Tasks via Cron (crontab)

While every DSpace installation is unique, in order to get the most out of DSpace, we highly recommend enabling these basic cron settings, e.g: the two scripts inside the folder [ScheduledTasks].

Prerequisite (root)

$ mkdir /home/dspace/ScheduledTasks
$ chown -R dspace:dspace /home/dspace/ScheduledTasks/

Root user

#HOURLY TASKS
0 1,8,16 * * * /home/dspace/ScheduledTasks/HourlyTasks.sh > /dev/null 2>&1
#
#DAILY TASKS
0 0 * * * /home/dspace/ScheduledTasks/DailyTasks.sh > /dev/null 2>&1
#WEEKLY TASKS
0 3 * * 0 /home/dspace/ScheduledTasks/WeeklyTasks.sh > /dev/null 2>&1
#
#MONTHLY TASKS
0 4 1 * * /home/dspace/ScheduledTasks/MonthlytTasks.sh > /dev/null 2>&1
#
#YEARLY TASKS
0 6 1 1 * /home/dspace/ScheduledTasks/YearlyTasks.sh > /dev/null 2>&1

Editing Route Source

Note: For example, the installation path is /

page-structure.xsl

$ nano /dspace-source/dspace-xmlui-mirage2/src/main/webapp/xsl/core/page-structure.xsl

item-view.xsl

$ nano /dspace-source/dspace-xmlui-mirage2/src/main/webapp/xsl/aspect/artifactbrowser/item-view.xsl

languages

Recommended location for i18n customizations

$ mkdir /dspace-source/dspace/modules/xmlui/src/main/webapp/i18n/
$ nano /dspace-source/dspace/modules/xmlui/src/main/webapp/i18n/messages_en.xml

static contents

Repository admins and developers will also benefit because of the tools available to make both simple and advanced customizations

$ mkdir /dspace-source/dspace/modules/xmlui/src/main/webapp/static/
$ mkdir /dspace-source/dspace/modules/xmlui/src/main/webapp/static/mycontent/
$ nano /dspace-source/dspace/modules/xmlui/src/main/webapp/static/mycontent/mystyle.css

input-forms.xml

$ nano /dspace-source/dspace/config/input-forms.xml

news-xmlui.xml

$ nano /dspace-source/dspace/config/news-xmlui.xml

Rebuild DSpace

dspace user

$ cd /dspace-source
$ mvn -U clean package -Dmirage2.on=true -Dmirage2.deps.included=false
$ cd /dspace-source/dspace/target/dspace-installer/
$ ant update

root user

$ service tomcat7 restart && service apache2 restart

Create an initial administrator account

$ /dspace/bin/dspace create-administrator

Back Up

Note: For example, a dspace user

$ pg_dump -U dspace -f bk_dspace.dump dspace -Fc
$ tar -czvf dspace.tar.gz /dspace

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.