SUNScholar/Install DSpace/S04/5.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. Default user interface, dspace.ui = xmlui ,We selected the XMLUI. The URL link used, dspace.url = ${dspace.baseUrl} ,Make sure to remove the "/${dspace.ui}". 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%</tt> ,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. <tab width="100%" class="wikitable" sep=comma head=top> Description,Setting,Comments 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.ui = xmlui
 * 1) The user interface you will be using for DSpace. Common usage is either xmlui or jspui

dspace.url = ${dspace.baseUrl}
 * 1) Full link your end users will use to access DSpace. In most cases, this will be the baseurl followed by
 * 2) the context path to the UI you are using.
 * 3) Alternatively, you can use a url redirect or deploy the web application under the servlet container root.
 * 4) In this case, make sure to remove the /${dspace.ui} from the dspace.url property.
 * 1) In this case, make sure to remove the /${dspace.ui} from the dspace.url property.

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.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
 * 2) problems with retrieving the definitions of duplicate object names by
 * 3) specifying the schema name that is used for DSpace.
 * 4) ORACLE USAGE NOTE: In Oracle, schema is equivalent to "username". This means
 * 5) specifying a "db.schema" is often unnecessary (i.e. you can leave it blank),
 * 6) UNLESS your Oracle DB Account (in db.username) has access to multiple schemas.

db.maxconnections = 50
 * 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 = 150
 * 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 = %smtp.example.com%
 * 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 = %dspace-noreply@myu.edu%
 * 1) From address for mail

mail.feedback.recipient = %dspace-help@myu.edu%
 * 1) Currently limited to one recipient!

mail.admin = %dspace-help@myu.edu%
 * 1) General site administration (Webmaster) e-mail

mail.alert.recipient = %dspace-help@myu.edu%
 * 1) Recipient for server errors and alerts

mail.registration.notify = %dspace-help@myu.edu%
 * 1) Recipient for new user registration emails


 * 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 = %123456789%
 * 1) CNRI Handle prefix

http.proxy.host =
 * 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 =
 * 1) port number of proxy server

loglevel.other = INFO loglevel.dspace = INFO
 * 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.