### Create local.cfg from Example Source: https://wiki.lyrasis.org/display/DSDOC9x/Configuration%2BReference To start using local.cfg, create it by copying the provided example file. This sets up the basic structure for your local configurations. ```bash cd [dspace-source]/dspace/config/ cp local.cfg.EXAMPLE local.cfg ``` -------------------------------- ### Start Handle Server Source: https://wiki.lyrasis.org/display/DSDOC9x/Handle.Net%2BRegistry%2BSupport?src=contextnavpagetreemode Execute this command as the dspace user to start the Handle server after configuration. ```bash [dspace]/bin/start-handle-server ``` -------------------------------- ### AWS S3 Configuration Example Source: https://wiki.lyrasis.org/display/DSDOC9x/Storage%2BLayer?src=contextnavpagetreemode Example configuration for connecting to AWS S3 as the storage provider. ```properties # Set the provider: assetstore.jcloud.provider = aws-s3 # Configure AWS credentials: assetstore.jcloud.identity = assetstore.jcloud.credentials = # Define the S3 bucket assetstore.jcloud.container = ``` -------------------------------- ### Usage Examples Source: https://wiki.lyrasis.org/display/DSDOC9x/AIP%2BBackup%2Band%2BRestore?src=contextnavpagetreemode Examples of how to apply AIP configuration options via the command line and the Java API. ```APIDOC ## Usage Examples ### Command Line Use the -o or --option parameter with the dspace packager command: `[dspace]/bin/dspace packager -r -a -t AIP -o [option1]=[value] -e admin@myu.edu aip4567.zip` ### Java API Use the org.dspace.content.packager.PackageParameters class: ```java PackageParameters params = new PackageParameters(); params.addProperty("createMetadataFields", "false"); params.addProperty("ignoreParent", "true"); ``` ``` -------------------------------- ### Running Jython Installer Source: https://wiki.lyrasis.org/display/DSDOC9x/Curation%2Btasks%2Bin%2BJython Execute the Jython installer jar to install Jython. This is not strictly necessary for DSpace integration but can be used to obtain the necessary files. ```bash java -jar jython-installer-2.7.1.jar --console ``` -------------------------------- ### Default UI Configuration Example Source: https://wiki.lyrasis.org/display/DSDOC9x/User%2BInterface%2BConfiguration Example of default UI configuration settings in YAML format. This file serves as a base for overrides. ```yaml ui: ssl: false host: localhost port: 4000 # NOTE: Space is capitalized because 'namespace' is a reserved string in TypeScript nameSpace: / # The rateLimiter settings limit each IP to a 'max' of 500 requests per 'windowMs' (1 minute). rateLimiter: windowMs: 60000 # 1 minute max: 500 # limit each IP to 500 requests per windowMs ``` -------------------------------- ### Start Handle Server on Windows Source: https://wiki.lyrasis.org/display/DSDOC9x/Handle.Net%2BRegistry%2BSupport?src=contextnavpagetreemode Use this batch script to start the Handle server on a Windows system. ```batch [dspace]/bin/start-handle-server.bat ``` -------------------------------- ### Install DSpace Backend Source: https://wiki.lyrasis.org/display/DSDOC9x/Installing%2BDSpace?src=contextnavpagetreemode Installs the DSpace backend to the specified directory using the Ant build tool. ```bash cd [dspace-source]/dspace/target/dspace-installer ant fresh_install ``` -------------------------------- ### Example local.cfg Configuration Source: https://wiki.lyrasis.org/display/DSDOC9x/Configuration%2BReference A basic example of a local.cfg file demonstrating how to override default DSpace settings. This file is automatically copied to [dspace]/config/local.cfg during the build process. ```properties # This is a simple example local.cfg file which shows off options # for creating your own local.cfg # This overrides the default value of "dspace.dir" in dspace.cfg dspace.dir = C:/dspace/ # This overrides the default value of "dspace.server.url" in dspace.cfg dspace.server.url = https://dspace.myuniversity.edu/server # The overrides the default "dspace.ui.url" setting it to the same value as my "baseUrl" above dspace.ui.url = https://dspace.myuniversity.edu # If our database settings are the same as the default ones in dspace.cfg, # then, we may be able to simply customize the db.username and db.password db.username = myuser db.password = mypassword # For DSpace, we want the LDAP and Password authentication plugins enabled # This overrides the default AuthenticationMethod in /config/modules/authentication.cfg # Since we specified the same key twice, these two values are appended (see Configuration File Syntax above) plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.LDAPAuthentication plugin.sequence.org.dspace.authenticate.AuthenticationMethod = org.dspace.authenticate.PasswordAuthentication # We also can reference other configurations in values. # For instance, we can set the "mail.admin" and the "feedback.recipient" to be the same email mail.admin = myemail@myuniversity.edu feedback.recipient = ${mail.admin} # For the example, we'll override the default oai.path in /config/modules/oai.cfg # This puts our OAI-PMH interface at ${dspace.server.url}/oaipmh oai.path = oaipmh # We'll also override the default oai.solr.url in /config/modules/oai.cfg # Notice here we're referencing a configuration (solr.server) that only exists in dspace.cfg # This is allowed. Your local.cfg can reference configs from other *.cfg files. oai.solr.url = ${solr.server}/oaipmh # Finally, this local.cfg also supports adding "include=" statements, to include # additional local configuration files. # In this example, a local-rest.cfg and local-curate.cfg (in the same directory) # will automatically be included as part of this local.cfg. # This allows you to subdivide you local configs in as many (or few) config files # as you desire. include = local-rest.cfg include = local-curate.cfg ``` -------------------------------- ### Configure Multiple Local Filesystems (bitstore.xml) Source: https://wiki.lyrasis.org/display/DSDOC9x/Storage%2BLayer This example, specific to the older `bitstore.xml` configuration, demonstrates setting up multiple local filesystem bitstores. It defines two stores, `localStore` and `localStore2`, and sets `localStore2` as the incoming store. ```xml ``` -------------------------------- ### Type Field Example Source: https://wiki.lyrasis.org/display/DSDOC9x/COAR%2BNotify%2B-%2BLDN%2BServices The 'type' field indicates the nature of the notification action, such as 'Announce' or a specific action type like 'coar-notify:ReviewAction', guiding how the notification should be processed. ```json { "type": [ "Announce", "coar-notify:ReviewAction" ] } ``` -------------------------------- ### Sample Production DSpace Crontab Source: https://wiki.lyrasis.org/display/DSDOC9x/Scheduled%2BTasks%2Bvia%2BCron?src=contextnavpagetreemode This sample crontab provides a starting point for scheduling DSpace cron tasks. Remember to adjust the DSPACE variable and other settings to match your specific installation. ```bash ## SAMPLE CRONTAB FOR A PRODUCTION DSPACE ## You obviously may wish to tweak this for your own installation, ## but this should give you an idea of what you likely wish to schedule via cron. ## ## NOTE: You may also need to add additional sysadmin related tasks to your crontab ## (e.g. zipping up old log files, or even removing old logs, etc). #----------------- # GLOBAL VARIABLES #----------------- # Full path of your local DSpace Installation (e.g. /home/dspace or /dspace or similar) # MAKE SURE TO CHANGE THIS VALUE!!! DSPACE = [dspace] # Shell to use SHELL=/bin/sh # Add all major 'bin' directories to path PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin # Set JAVA_OPTS with defaults for DSpace Cron Jobs. # Only provides 512MB of memory by default (which should be enough for most sites). JAVA_OPTS= \ "-Xmx512M -Xms512M -Dfile.encoding=UTF-8" #-------------- # HOURLY TASKS (Recommended to be run multiple times per day, if possible) # At a minimum these tasks should be run daily. #-------------- # Send information about new and changed DOIs to the DOI registration agency # NOTE: ONLY NECESSARY IF YOU REGISTER DOIS USING DATACITE AS REGISTRATION AGENCY (Disabled by default) # 0 4,12,20 * * * $DSPACE/bin/dspace doi-organiser -u -q ; $DSPACE/bin/dspace doi-organiser -s -q ; $DSPACE/bin/dspace doi-organiser -r -q ; $DSPACE/bin/dspace doi-organiser -d -q #---------------- # DAILY TASKS # (Recommended to be run once per day. Feel free to tweak the scheduled times below.) #---------------- # Update the OAI-PMH index with the newest content at 12:15am every day # REQUIRED to update content available in OAI-PMH (However, it can be removed if you do not enable OAI-PMH) 15 0 * * * $DSPACE/bin/dspace oai import > /dev/null # Clean and Update the Discovery indexes at 12:15am every day # (This ensures that any deleted documents are cleaned from the Discovery search/browse index) # RECOMMENDED to ensure your search/browse index stays fresh. 15 0 * * * $DSPACE/bin/dspace index-discovery > /dev/null # run the index-authority script once a day at 12:45am to ensure the Solr Authority cache is up to date 45 0 * * * $DSPACE/bin/dspace index-authority > /dev/null # Cleanup Web Spiders from DSpace Statistics Solr Index at 01:00 every day # (This removes any known web spiders from your usage statistics) # RECOMMENDED if you are running Solr Statistics. 0 1 * * * $DSPACE/bin/dspace stats-util -f # Send out "daily" update subscription e-mails at 02:00 every day # (This sends an email to any users who have "subscribed" to a Community/Collection, notifying them of newly added content.) # (This job must run before the filter-media task, because filter-media may update the Solr index, which could delay sending subscription emails about the new content until the following day.) # REQUIRED for daily "Email Subscriptions" to work properly. 0 2 * * * $DSPACE/bin/dspace subscription-send -f D # Run the media filter at 03:00 every day. # (This task ensures that thumbnails are generated for newly add images, # and ensures full text search is available for newly added PDF/Word/PPT/HTML documents) # REQUIRED for Thumbnails to be generated & full-text indexing to work. 0 3 * * * $DSPACE/bin/dspace filter-media #---------------- # WEEKLY TASKS # (Recommended to be run once per week, but can be run more or less frequently, based on your local needs/policies) #---------------- # Send out "weekly" update subscription e-mails at 02:00 every Sunday # (This sends an email to any users who have "subscribed" to a Community/Collection, notifying them of newly added content.) # REQUIRED for weekly "Email Subscriptions" to work properly. 0 2 * * 0 $DSPACE/bin/dspace subscription-send -f W # Run the checksum checker at 04:00 every Sunday # By default it runs through every file (-l) and also prunes old results (-p) # (This ``` -------------------------------- ### Unzipping Jython Installer Jar Source: https://wiki.lyrasis.org/display/DSDOC9x/Curation%2Btasks%2Bin%2BJython Use this command to extract jython.jar and the Lib directory from the Jython installer. This is an alternative to running the installer. ```bash unzip -d [dspace]/lib/ jython-installer-2.7.1.jar jython.jar Lib/ unzip -d [dspace]/webapps/server/WEB-INF/lib/ jython-installer-2.7.1.jar jython.jar Lib/ ``` -------------------------------- ### Start DSpace UI with Node.js Source: https://wiki.lyrasis.org/display/DSDOC9x/Installing%2BDSpace?src=contextnavpagetreemode Quickly start and test the DSpace UI using Node.js. This method is not recommended for production as it does not provide logs. Ensure you are in the deployment directory before running. ```bash # You MUST start the UI from within the deployment directory cd [dspace-ui-deploy] # Run the ``"server/main.js"`` `file to startup the User Interface` node ./dist/server/main.js # Stop the UI by killing it via Ctrl+C ``` -------------------------------- ### Display Bitstore Migration Help Source: https://wiki.lyrasis.org/display/DSDOC9x/Storage%2BLayer Displays the usage instructions and available options for the bitstore-migrate command. ```bash [dspace]/bin/dspace bitstore-migrate ``` -------------------------------- ### Unzipping Jython Installer Jar Source: https://wiki.lyrasis.org/display/DSDOC9x/Curation%2Btasks%2Bin%2BJython?src=contextnavpagetreemode Use this command to extract `jython.jar` and the `Lib` directory from the Jython installer. Ensure the destination path `[dspace]/lib/` or `[dspace]/webapps/server/WEB-INF/lib/` is correct for your DSpace installation. ```bash unzip -d [dspace]/lib/ jython-installer-2.7.1.jar jython.jar Lib/ unzip -d [dspace]/webapps/server/WEB-INF/lib/ jython-installer-2.7.1.jar jython.jar Lib/ ``` -------------------------------- ### Configure Handle Server Startup Arguments Source: https://wiki.lyrasis.org/display/DSDOC9x/Handle.Net%2BRegistry%2BSupport?src=contextnavpagetreemode Edit the `hdl` script to include Java system properties for log4j configuration and the DSpace Handle plugin configuration. These properties must be added before `net.handle.server.Main`. ```bash -Dlog4j.configuration=file:///hs/srv_1/log4j-handle-plugin.properties -Ddspace.handle.plugin.configuration=/hs/srv_1/handle-dspace-plugin.cfg ``` -------------------------------- ### Update DSpace Installation Source: https://wiki.lyrasis.org/display/DSDOC9x/Upgrading%2BDSpace?src=contextnavpagetreemode Commands to apply the new code and libraries to the existing installation directory. ```bash cd [dspace-source]/dspace/target/dspace-installer ant update ``` -------------------------------- ### Install Ghostscript on Debian/Ubuntu Source: https://wiki.lyrasis.org/display/DSDOC9x/ImageMagick%2BMedia%2BFilters Use this command to install Ghostscript, which is required for generating PDF thumbnails. ```bash apt-get install ghostscript ``` -------------------------------- ### Start Apache Fuseki Server Source: https://wiki.lyrasis.org/display/DSDOC9x/Linked%2B%28Open%29%2BData?src=contextnavpagetreemode Use this command to start the Fuseki server with DSpace's configuration. Ensure FUSEKI_HOME is set or provide the full path to the Fuseki executable. The --localhost flag restricts access to the local machine. ```bash export FUSEKI_HOME=/usr/local/jena-fuseki-1.0.1 $FUSKI_HOME/fuseki-server --localhost --config [dspace-install]/config/modules/rdf/fuseki-assembler.ttl ``` -------------------------------- ### Install ImageMagick on Debian/Ubuntu Source: https://wiki.lyrasis.org/display/DSDOC9x/ImageMagick%2BMedia%2BFilters Use this command to install the ImageMagick package on Debian or Ubuntu systems. ```bash apt-get install imagemagick ``` -------------------------------- ### Install Dependencies Source: https://wiki.lyrasis.org/display/DSDOC9x/Installing%2BDSpace?src=contextnavpagetreemode Run these commands within the dspace-angular directory to prepare the environment. ```bash # change directory to our repo cd [dspace-angular] # install the local dependencies npm install ``` -------------------------------- ### Bulk Ingest Example Source: https://wiki.lyrasis.org/display/DSDOC9x/Importing%2Band%2BExporting%2BContent%2Bvia%2BPackages?src=contextnavpagetreemode Example command for recursively ingesting a collection AIP zip file. ```bash [dspace]/bin/dspace packager -s -a -t AIP -e admin@myu.edu -p 4321/12 collection-aip.zip ``` -------------------------------- ### Alternative Handle Server Startup Source: https://wiki.lyrasis.org/display/DSDOC9x/Handle.Net%2BRegistry%2BSupport?src=contextnavpagetreemode If a passphrase is set for the Handle server, use this command to start it manually. Note that DSpace scripts currently do not support startup with a passphrase. ```bash [dspace]\bin\dspace dsrun net.handle.server.Main [dspace]\handle-server ``` -------------------------------- ### Install FFmpeg on Debian/Ubuntu Source: https://wiki.lyrasis.org/display/DSDOC9x/ImageMagick%2BMedia%2BFilters Use this command to install FFmpeg, which is required for generating MP4 video thumbnails. ```bash apt-get install ffmpeg ``` -------------------------------- ### Start Apache Fuseki with DSpace Configuration Source: https://wiki.lyrasis.org/display/DSDOC9x/Linked%2B%28Open%29%2BData Command to set the FUSEKI_HOME environment variable and launch the server with the DSpace assembler configuration. ```bash export FUSEKI_HOME=/usr/local/jena-fuseki-1.0.1; $FUSKI_HOME/fuseki-server --localhost --config [dspace-install]/config/modules/rdf/fuseki-assembler.ttl ``` -------------------------------- ### OAI Datacite Creators XML Example Source: https://wiki.lyrasis.org/display/DSDOC9x/OpenAIRE4%2BGuidelines%2BCompliancy Example XML structure for datacite creators in the oai_openaire format. ```xml Evans, R.J. Institute of Science and Technology 1234-1234-1234-1234 ``` -------------------------------- ### DSpace Task Configuration Example Source: https://wiki.lyrasis.org/display/DSDOC9x/Curation%2BSystem?src=breadcrumbs-expanded Illustrates how to assign locally named prefixes to tasks in 'curate.cfg' to prevent configuration collisions and improve portability. ```properties org.dspace.ctask.general.ClamAv = vscan org.community.ctask.ConflictTask = virusscan ``` -------------------------------- ### Example Relationship Entries Source: https://wiki.lyrasis.org/display/DSDOC9x/Importing%2Band%2BExporting%2BItems%2Bvia%2BSimple%2BArchive%2BFormat?src=contextnavpagetreemode Examples of various relationship types and identifier formats used in the 'relationships' file. ```text relation.isAuthorOfPublication 5dace143-1238-4b4f-affb-ed559f9254bb relation.isAuthorOfPublication 123456789/1123 relation.isOrgUnitOfPublication folderName:item_001 relation.isProjectOfPublication project.identifier.id:123 relation.isProjectOfPublication project.identifier.name:A Name with Spaces ``` -------------------------------- ### Build and Run DSpace UI with Mirador Source: https://wiki.lyrasis.org/display/DSDOC9x/IIIF%2BConfiguration Execute this command to build and start the DSpace UI with the Mirador viewer enabled in a single step. ```bash # This builds and runs the DSpace UI with the Mirador Viewer in a single step npm run start:mirador:prod ``` -------------------------------- ### Examples of 'relationships' file entries Source: https://wiki.lyrasis.org/display/DSDOC9x/Importing%2Band%2BExporting%2BItems%2Bvia%2BSimple%2BArchive%2BFormat Illustrates various ways to specify relationships using different identifiers like UUID, folder name, and project identifiers. ```text relation.isAuthorOfPublication 5dace143-1238-4b4f-affb-ed559f9254bb relation.isAuthorOfPublication 123456789 relation.isOrgUnitOfPublication folderName:item_001 relation.isProjectOfPublication project.identifier.id:123 relation.isProjectOfPublication project.identifier.name:A Name with Spaces ``` -------------------------------- ### Configure Sequence of Plugins Source: https://wiki.lyrasis.org/display/DSDOC9x/Business%2BLogic%2BLayer Example configuration for binding a sequence of implementation classes to an interface. ```properties plugin.sequence.org.dspace.eperson.AuthenticationMethod = \ org.dspace.eperson.X509Authentication, \ org.dspace.eperson.PasswordAuthentication, \ edu.mit.dspace.MITSpecialGroup ``` -------------------------------- ### Rioxx Metadata XML Example Source: https://wiki.lyrasis.org/display/DSDOC9x/Rioxx%2Bv3%2Bschema%2Bcompliance Example of the rioxx metadata format representing creator identifiers and funding information. ```xml https://orcid.org/0000-0001-7656-9453 Pathan, Nazima...16/152/01 ``` -------------------------------- ### Execute Media Filter via Command Line Source: https://wiki.lyrasis.org/display/DSDOC9x/Mediafilters%2Bfor%2BTransforming%2BDSpace%2BContent?src=breadcrumbs-parent Run the media filter system using the default configuration. ```bash [dspace]/bin/dspace filter-media ``` -------------------------------- ### IIIF Image Resource Annotation Example Source: https://wiki.lyrasis.org/display/DSDOC9x/IIIF%2BConfiguration Example of the JSON structure returned by the DSpace backend for an image resource. ```json resource: { @id: "https://imageserver.mycampus.edu/image-server/cantaloupe/iiif/2/4b415036-57a8-42f4-a971-c5e982f55f92/full/full/0/default.jpg", @type: "dctypes:Image", service: { @context: "http://iiif.io/api/image/2/context.json", @id: "https://imageserver.mycampus.edu/image-server/cantaloupe/iiif/2/4b415036-57a8-42f4-a971-c5e982f55f92", profile: "http://iiif.io/api/image/2/level1.json", protocol: "http://iiif.io/api/image" }, format: "image/jp2"} ``` -------------------------------- ### Ingest AIP Hierarchy Example Source: https://wiki.lyrasis.org/display/DSDOC9x/AIP%2BBackup%2Band%2BRestore?src=contextnavpagetreemode Example command to ingest a specific AIP file as a child of a parent object. ```bash [dspace]/bin/dspace packager -s -a -t AIP -e admin@myu.edu -p 4321/12 aip4567.zip ``` -------------------------------- ### Install Configuration Files Source: https://wiki.lyrasis.org/display/DSDOC9x/Validating%2BCheckSums%2Bof%2BBitstreams Run this command after modifying log4j.properties to apply changes to the logging configuration. ```bash [dspace]/bin/install_configs ``` -------------------------------- ### Build DSpace Installation Package Source: https://wiki.lyrasis.org/display/DSDOC9x/Installing%2BDSpace?src=contextnavpagetreemode Generates the DSpace installation package using Maven. Must be run as the 'dspace' user. ```bash cd [dspace-source] mvn package ```