SUNScholar/Install DSpace/S04/4.X

Back to Step 4

Introduction
With the release of DSpace versions => 3.X, a new way of configuring DSpace was introduced.

The critical core elements of the old "dspace.cfg" file have been superseded by a "build.properties" file.

The idea is to put all the custom configs in the "config" folder and use the build.properties file for the core "building" of DSpace.

Please Note:
Be careful to NOT comment out any settings, leave them as they are with blanks!!

''Use an email address with an SPF complaint domain for: %dspace-noreply@myu.edu%' ''

Procedure
To edit the build.properties file, type the following: nano $HOME//build.properties Check the file to make sure the following critical "Server Configuration" and "Database Configuration" is correct;

Server Configuration
Replace all the places with a pair of percent signs (%something%) in the example below with the settings for your system.  Description,Setting,Comments Installation Folder, dspace.install.dir = /home/dspace ,Make sure you have created the "dspace" user. Hostname for the repository, dspace.hostname = %scholar.sun.ac.za% ,This is the hostname you decided to use for your repository. Base URL for the repository, dspace.baseUrl = %http://scholar.sun.ac.za% ,Make sure to remove the "8080" port reference. The long name for the repository, dspace.name = %SUNScholar Research Repository% ,This is usually for the repository manager to decide. SOLR server connection, solr.server = http://localhost/solr ,Make sure that you deploy the SOLR java web app correctly and make sure to remove the "8080" port reference. The default language, default.language = %en_ZA% ,Make sure to select the correct language for your region.

Database Configuration
Replace all the places with a pair of percent signs (%something%) in the example below with the settings for your system.  Description,Setting,Comments Database name, db.name=postgres ,We selected the PostgreSQL database. Database driver, db.driver=org.postgresql.Driver</tt> ,We selected the PostgreSQL driver. Database connection URL, db.url=jdbc:postgresql://localhost:5432/dspace</tt> ,We connect locally on port 5432 to the "dspace" database. Database credentials, db.username=%dspace%</tt>   db.password=%dspace%</tt> ,Supply your own very secret credentials.

Example Config
Check the following example for the other settings.

Replace all the places with a pair of percent signs (%something%) in the example below with the settings for your system.
 * 1) DSpace build.properties
 * 2) This file should be customised to suit your build environment.
 * 3) Note that not all configuration is handled here, only the most common
 * 4) properties that tend to differ between build environments.
 * 5) For adjusting global settings or more complex settings, edit the relevant config file.
 * 6) IMPORTANT: Do not remove or comment out settings in build.properties
 * 7) When you edit the "build.properties" file (or a custom *.properties file),
 * 8) take care not to remove or comment out any settings. Doing so, may cause
 * 9) your final "dspace.cfg" file to be misconfigured with regards to that
 * 10) particular setting.  Instead, if you wish to remove/disable a particular
 * 11) setting, just clear out its value.  For example, if you don't want to be
 * 12) notified of new user registrations, ensure the "mail.registration.notify"
 * 13) setting has no value, e.g. "mail.registration.notify="
 * 1) setting has no value, e.g. "mail.registration.notify="


 * 1) SERVER CONFIGURATION #
 * 1) SERVER CONFIGURATION #


 * 1) DSpace installation directory. This is the location where you want
 * 2) to install DSpace. NOTE: this value will be copied over to the
 * 3) "dspace.dir" setting in the final "dspace.cfg" file. It can be
 * 4) modified later on in your "dspace.cfg", if needed.

dspace.install.dir = /home/dspace

dspace.hostname = %scholar.sun.ac.za%
 * 1) DSpace host name - should match base URL.  Do not include port number

dspace.baseUrl = %http://scholar.sun.ac.za%
 * 1) DSpace base host URL.  Include port number etc.

dspace.name = %SUNScholar Research Repository%
 * 1) Name of the site

solr.server = http://localhost/solr
 * 1) Solr server

default.language = %en_ZA%
 * 1) Default language for metadata values


 * 1) DATABASE CONFIGURATION #
 * 1) DATABASE CONFIGURATION #

db.name=postgres
 * 1) Database name ("oracle", or "postgres")

db.driver=org.postgresql.Driver db.url=jdbc:postgresql://localhost:5432/dspace db.username=%dspace% db.password=%dspace%
 * 1) Uncomment the appropriate block below for your database.
 * 2) postgres


 * 1) oracle
 * 2) db.driver= oracle.jdbc.OracleDriver
 * 3) db.url=jdbc:oracle:thin:@//localhost:1521/xe
 * 4) db.username=dspace
 * 5) db.password=dspace

db.schema =
 * 1) Schema name - if your database contains multiple schemas, you can avoid problems with
 * 2) retrieving the definitions of duplicate object names by specifying
 * 3) the schema name here that is used for DSpace by uncommenting the following entry

db.maxconnections = 200
 * 1) Maximum number of DB connections in pool

db.maxwait = 5000
 * 1) Maximum time to wait before giving up if all connections in pool are busy (milliseconds)

db.maxidle = 400
 * 1) Maximum number of idle connections in pool (-1 = unlimited)

db.statementpool = true
 * 1) Determine if prepared statement should be cached. (default is true)

db.poolname = dspacepool
 * 1) Specify a name for the connection pool (useful if you have multiple applications sharing Tomcat's dbcp)
 * 2) If not specified, defaults to 'dspacepool'


 * 1) EMAIL CONFIGURATION #
 * 1) EMAIL CONFIGURATION #

mail.server = %mail.sun.ac.za%
 * 1) SMTP mail server

mail.server.username= mail.server.password=
 * 1) SMTP mail server authentication username and password (if required)
 * 2) mail.server.username = myusername
 * 3) mail.server.password = mypassword

mail.server.port = 25
 * 1) SMTP mail server alternate port (defaults to 25)

mail.from.address = %scholar@sun.ac.za%
 * 1) From address for mail

mail.feedback.recipient = %scholar@sun.ac.za%
 * 1) Currently limited to one recipient!

mail.admin = %scholar@sun.ac.za%
 * 1) General site administration (Webmaster) e-mail

mail.alert.recipient = %hgibson@sun.ac.za%
 * 1) Recipient for server errors and alerts
 * 2) mail.alert.recipient = email-address-here

mail.registration.notify = %scholar@sun.ac.za%
 * 1) Recipient for new user registration emails
 * 2) mail.registration.notify = email-address-here


 * 1) HANDLE CONFIGURATION #
 * 1) HANDLE CONFIGURATION #

handle.canonical.prefix = http://hdl.handle.net/
 * 1) Canonical Handle URL prefix
 * 2) By default, DSpace is configured to use http://hdl.handle.net/
 * 3) as the canonical URL prefix when generating dc.identifier.uri
 * 4) during submission, and in the 'identifier' displayed in JSPUI
 * 5) item record pages.
 * 6) If you do not subscribe to CNRI's handle service, you can change this
 * 7) to match the persistent URL service you use, or you can force DSpace
 * 8) to use your site's URL, eg.
 * 9) handle.canonical.prefix = ${dspace.url}/handle/
 * 10) Note that this will not alter dc.identifer.uri metadata for existing
 * 11) items (only for subsequent submissions), but it will alter the URL
 * 12) in JSPUI's 'identifier' message on item record pages for existing items.
 * 13) If omitted, the canonical URL prefix will be http://hdl.handle.net/
 * 1) items (only for subsequent submissions), but it will alter the URL
 * 2) in JSPUI's 'identifier' message on item record pages for existing items.
 * 3) If omitted, the canonical URL prefix will be http://hdl.handle.net/
 * 1) If omitted, the canonical URL prefix will be http://hdl.handle.net/

handle.prefix = %10019.1%
 * 1) CNRI Handle prefix

http.proxy.host = %ez.sun.ac.za%
 * 1) PROXY CONFIGURATION #
 * 2) uncomment and specify both properties if proxy server required
 * 3) proxy server for external http requests - use regular hostname without port number
 * 1) uncomment and specify both properties if proxy server required
 * 2) proxy server for external http requests - use regular hostname without port number

http.proxy.port = %3128%
 * 1) port number of proxy server

loglevel.other = %WARN% loglevel.dspace = %WARN%
 * 1) LOGLEVEL SETTINGS #
 * 1) LOGLEVEL SETTINGS #
 * 1) loglevel.other: Log level for other third-party tools/APIs used by DSpace
 * 2) Possible values (from most to least info): DEBUG, INFO, WARN, ERROR, FATAL
 * 1) loglevel.dspace: Log level for all DSpace-specific code (org.dspace.*)
 * 2) Possible values (from most to least info): DEBUG, INFO, WARN, ERROR, FATAL

Save and exit the file.