### Copy Example local.cfg Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945788/Configuration%2BReference This command copies the example `local.cfg` file to be used as the active configuration file. This is the starting point for customizing DSpace settings. ```bash cd [dspace-source]/dspace/config/ cp local.cfg.EXAMPLE local.cfg ``` -------------------------------- ### Start Handle Server Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945740/Handle.Net%2BRegistry%2BSupport Execute this command as the dspace user to start the Handle server after configuration. ```bash [dspace]/bin/start-handle-server ``` -------------------------------- ### Start Apache Fuseki Server Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944792/Linked%2BOpen%2BData?src=contextnavpagetreemode This command starts the Apache Fuseki server with DSpace's configuration. Ensure FUSEKI_HOME is set to your Fuseki installation directory. The --localhost option 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 ``` -------------------------------- ### Filesystem Path Configuration Example Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945785/administrators.action Example of configuring a filesystem path for DSBitStore. This path can be a local filesystem, mounted drive, or networked filesystem. ```plaintext /dspace/assetstore /opt/data/assetstore ``` -------------------------------- ### Install DSpace Backend Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944708/Installing%2BDSpace?src=contextnavpagetreemode Installs DSpace to the specified directory using the generated installation package. Run as the 'dspace' UNIX user. ```bash cd [dspace-source]/dspace/target/dspace-installer ant fresh_install ``` -------------------------------- ### Start Handle Server on Windows Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945740/Handle.Net%2BRegistry%2BSupport Use this batch script to start the Handle server on a Windows system. ```batch [dspace]/bin/start-handle-server.bat ``` -------------------------------- ### S3BitStore Configuration Example Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945785/administrators.action Example of configuring S3BitStore with bucket name, access key, secret key, and optional region or subfolder. ```plaintext s3://dspace-assetstore-xyz ``` -------------------------------- ### Example Deployment Directory Structure Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944708/Installing%2BDSpace?src=contextnavpagetreemode Illustrates the expected directory structure after copying the compiled UI for deployment. ```text [dspace-ui-deploy] /dist /browser (compiled client-side code) /server (compiled server-side code, including "main.js") /config (Optionally created in the "Configuration" step below) /config.prod.yml (Optionally created in the "Configuration" step below) ``` -------------------------------- ### Example OAI-PMH Identify Request URL Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944783/OAI?src=contextnavpagetreemode An example of a specific URL to test the OAI-PMH server's Identify verb, assuming a local DSpace installation. ```http http://localhost:8080/server/oai/request?verb=Identify ``` -------------------------------- ### Start DSpace UI with Node.js Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944708/Installing%2BDSpace?src=contextnavpagetreemode This command sequence shows how to navigate to the DSpace UI deployment directory and start the UI using Node.js. This method is recommended for quick testing. ```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 ``` -------------------------------- ### Example Configuration for Thumbnail Task Profiles Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944770/Curation%2BSystem?src=contextnavpagetreemode This example demonstrates how to configure different profiles for a single task by using distinct configuration files and task names in curate.cfg. ```properties org.dspace.ctask.general.ThumbnailTask = thumbnail org.dspace.ctask.general.ThumbnailTask = thumbnail.force ``` -------------------------------- ### Display Help for a Specific DSpace CLI Operation Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945736/Command%2BLine%2BOperations To get detailed information about a specific operation, append its name and the -h flag to the dspace command. This example shows how to get help for the 'cleanup' operation. ```bash bin/dspace cleanup -h ``` -------------------------------- ### Task Configuration Example (curate.cfg) Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944770/Curation%2BSystem This example shows how to configure multiple tasks with the same class but different local names to avoid configuration collisions. ```properties org.dspace.ctask.general.ClamAv = vscan, org.community.ctask.ConflictTask = virusscan, .... ``` -------------------------------- ### Example local.cfg Configuration Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945788/Configuration%2BReference This snippet demonstrates a basic `local.cfg` file with common overrides for DSpace settings. It includes examples for directory paths, server URLs, database credentials, authentication methods, email recipients, OAI-PMH configuration, and including other configuration files. ```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 ``` -------------------------------- ### Start PM2 in Cluster Mode via Command Line Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945744/administrators.action Alternatively, start your PM2 application in cluster mode using command-line flags. This command achieves the same result as the JSON configuration example, scaling across all CPUs with a specified memory limit. ```bash # Start the "dspace-ui" app. Cluster it across all available CPUs with a maximum memory of 500MB per CPU. # This command is equivalent to the example cluster settings in the "dspace-ui.json" file above. pm2 start dspace-ui.json -i max --max-memory-restart 500M ``` -------------------------------- ### Start Handle Server with Specific Class (Alternative) Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945740/Handle.Net%2BRegistry%2BSupport?src=contextnavpagetreemode Alternative method to start the Handle server, useful if a passphrase is set (though not recommended). ```bash [dspace]\bin\dspace dsrun net.handle.server.Main [dspace]\handle-server ``` -------------------------------- ### Get DSpace Version Information Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945753/Troubleshooting%2BInformation Use the `dspace version` command to quickly obtain basic information about your DSpace installation and its supporting software. This is useful for diagnosing issues and confirming configurations. ```bash $ bin/dspace version DSpace version:  4.0-SNAPSHOT   SCM revision:  da53991b6b7e9f86c2a7f5292e3c2e9606f9f44c     SCM branch:  UNKNOWN             OS:  Linux(amd64) version 3.7.10-gentoo Discovery enabled. Lucene search enabled.            JRE:  Oracle Corporation version 1.7.0_21    Ant version:  Apache Ant(TM) version 1.8.4 compiled on June 25 2012  Maven version:  3.0.4    DSpace home:  /home/dspace $ ``` -------------------------------- ### Schedule Solr Sharding with Cron Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944943/SOLR%2BStatistics%2BMaintenance?src=breadcrumbs-parent Example cron entry to schedule the Solr sharding process to run annually on January 1st at midnight. Replace '[dspace]' with the actual DSpace installation path. ```bash # At 12:00AM on January 1, "shard" the DSpace Statistics Solr index. Ensures each year has its own Solr index - this improves performance. 0 0 1 1 * [dspace]/bin/dspace stats-util -s ``` -------------------------------- ### METSRights with Embargo Dates for Item Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945730/DSpace%2BAIP%2BFormat This example demonstrates METSRights with start and end dates for embargo functionality on an Item. It defines permissions for GENERAL PUBLIC and a Staff group with specific date constraints. ```xml Staff ``` -------------------------------- ### General Plugin Configuration Example Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945788/Configuration%2BReference?src=contextnavpagetreemode This example demonstrates how to configure the plugin classpath, which is a colon-separated list of directories and JAR files searched for third-party plugin classes. ```plaintext plugin.classpath /opt/dspace/plugins/aPlugin.jar:/opt/dspace/moreplugins ``` -------------------------------- ### Access Task Output Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945759/Curation%2BTasks The status code, reporting stream, and result string are accessed or set using methods on the Curator object. This example shows how to get the status and result for a specific task. ```java Curator curator = new Curator(); curator.setReporter(new OutputStreamWriter(System.out)); curator.addTask("vscan").curate(coll); int status = curator.getStatus("vscan"); String result = curator.getResult("vscan"); ``` -------------------------------- ### Retrieve Site Metadata in Angular Component Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/425331895/Editing%2BCMS%2Bmetadata Access and retrieve site-specific metadata within an Angular component by subscribing to route data and using the 'firstMetadataValue' method. This example shows how to get a metadata value for a specific key and language. ```typescript this.site$ = this.route.data.pipe( map((data) => data.site as Site), ); this.homeHeaderMetadataValue$ = combineLatest({ site: this.site$, language: this.locale.getCurrentLanguageCode(), }).pipe( take(1), map(({ site, language }) => site?.firstMetadataValue('your.metadata.key', { language })), ); ``` -------------------------------- ### Theme Configuration Examples Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944956/User%2BInterface%2BConfiguration Configure themes for DSpace, including matching by handle, regex, or UUID, and extending other themes. Also shows how to prefetch CSS and inject head tags. ```yaml themes: # Add additional themes here. In the case where multiple themes match a route, the first one # in this list will get priority. It is advisable to always have a theme that matches # every route as the last one # # # A theme with a handle property will match the community, collection or item with the given # # handle, and all collections and/or items within it # - name: 'custom', # handle: '10673/1233' # # # # A theme with a regex property will match the route using a regular expression. If it # # matches the route for a community or collection it will also apply to all collections # # and/or items within it # - name: 'custom', # regex: 'collections/e8043bc2.*' # # # # A theme with a uuid property will match the community, collection or item with the given # # ID, and all collections and/or items within it # - name: 'custom', # uuid: '0958c910-2037-42a9-81c7-dca80e3892b4' # # # # The extends property specifies an ancestor theme (by name). Whenever a themed component is not found # # in the current theme, its ancestor theme(s) will be checked recursively before falling back to default. # - name: 'custom-A', # extends: 'custom-B', # # Any of the matching properties above can be used # handle: '10673/34' # # # # - name: 'custom-B', # # extends: 'custom', # # handle: '10673/12' # # # # A theme with only a name will match every route # name: 'custom' # # # # This theme will use the default bootstrap styling for DSpace components # - name: BASE_THEME_NAME # - name: dspace # # This theme's CSS will be prefetched via https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/prefetch # # to improve peformance & style stability on initial load. # # Can be omitted for themes that only apply to a specific handle, regex or uuid to save bandwidth. # prefetch: true    # Whenever this theme is active, the following tags will be injected into the of the page.    # Example use case: set the favicon based on the active theme.    headTags:  - tagName: link     attributes:      rel: icon      href: assets/dspace/images/favicons/favicon.ico      sizes: any  - tagName: link     attributes:      rel: icon      href: assets/dspace/images/favicons/favicon.svg      type: image/svg+xml  - tagName: link     attributes:      rel: apple-touch-icon      href: assets/dspace/images/favicons/apple-touch-icon.png  - tagName: link     attributes:      rel: manifest      href: assets/dspace/images/favicons/manifest.webmanifest ``` -------------------------------- ### Installing Jython via Console Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945760/Curation%2Btasks%2Bin%2BJython Installs Jython using its console installer. This is an alternative to manually unzipping the installer JAR. ```bash java -jar jython-installer-2.7.1.jar --console ``` -------------------------------- ### Logging Configuration Example Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945788/Configuration%2BReference This example shows how to configure the logging initialization path and the directory where DSpace logs are stored. It utilizes properties defined in log4j2.xml. ```properties log.init.config = ${dspace.dir}/config/log4j2.xml ``` ```properties log.dir = ${log4j:configParentLocation}/../log ``` -------------------------------- ### Update DSpace Installation Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944710/Upgrading%2BDSpace Update the DSpace installation directory with the new code and libraries. This command is run from the DSpace installer directory. ```bash cd [dspace-source]/dspace/target/dspace-installer ant update ``` -------------------------------- ### Multiple Asset Store Configuration Example Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945785/administrators.action Illustrates configuring multiple asset stores, including filesystem and S3, with sequential numbering. ```plaintext assetstore0 is /dspace/assetstore assetstore1 at /data/assetstore1 assetstore2 could be s3://dspace-assetstore-xyz ``` -------------------------------- ### Install Local Dependencies Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944708/Installing%2BDSpace?src=contextnavpagetreemode Navigate to the dspace-angular directory and install local dependencies using npm. ```bash # change directory to our repo cd [dspace-angular] # install the local dependencies npm install ``` -------------------------------- ### Task Configuration Example Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944770/Curation%2BSystem?src=breadcrumbs-expanded This example shows how tasks can be configured in curate.cfg to avoid name collisions by using locally assigned names as prefixes for task properties. ```properties org.dspace.ctask.general.ClamAv = vscan, org.community.ctask.ConflictTask = virusscan, .... ``` -------------------------------- ### Metadata Security Configuration Example Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/438698074/Metadata%2Bsecurity%2Bconfiguration Example configuration for setting metadata visibility levels in metadata-security.cfg. ```properties metadatavalue.visibility.settings = [0 1 2] metadatavalue.visibility.Person.settings = [0 1] metadatavalue.visibility.Person.dc.date.available.settings = [0 1] ``` -------------------------------- ### Third Party S3 Configuration (MinIO Example) Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945785/Storage%2BLayer?src=contextnavpagetreemode Example configuration for using a third-party S3-compatible storage provider like MinIO. This includes setting the provider to 's3', configuring credentials, bucket name, and importantly, specifying the custom endpoint URL. ```properties # Set the provider to s3: assetstore.jcloud.provider = s3 # Configure Credentials assetstore.jcloud.identity = assetstore.jcloud.credentials = # Define the S3 bucket assetstore.jcloud.container =   # Specify the an endpoint assetstore.jcloud.endpoint = https://minio.yourdomain.com # Ensure that MinIO is running and accessible, and that the bucket has been created with the necessary permissions. ``` -------------------------------- ### Ingest Content from Standard Input (URL) Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944826/Importing%2Band%2BExporting%2BContent%2Bvia%2BPackages?src=contextnavpagetreemode This example demonstrates ingesting content by piping the output of a URL retrieval (using wget) directly into the packager command, reading from standard input. ```bash wget -O - http://alum.mit.edu/jarandom/my-thesis.pdf | [dspace]/bin/dspace packager -e admin@myu.edu -p 4321/10 -t PDF - ``` -------------------------------- ### Example: Test MARC Dissemination Crosswalk Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408945788/Configuration%2BReference?src=contextnavpagetreemode Example of testing the 'marc' dissemination crosswalk for handle '123456789/3'. ```bash [dspace]/bin/dspace dsrun org.dspace.content.crosswalk.XSLTDisseminationCrosswalk marc 123456789/3 ``` -------------------------------- ### Start DSpace UI with Node.js Source: https://wiki.lyrasis.org/spaces/DSDOC10x/pages/408944708/administrators.action Quickly starts the DSpace UI for testing purposes using Node.js. This method does not provide logs and is not recommended for production. Ensure you are in the deployment directory. ```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 ```