### 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