Difference between revisions of "SUNScholar/Install DSpace/S04/3.X"

From Libopedia
Jump to navigation Jump to search
 
(73 intermediate revisions by the same user not shown)
Line 1: Line 1:
With the release of DSpace 3.2 came a new way of configuring DSpace. The old "dspace.cfg" file has been superseded by a "build.properties" file. The idea is to put all the custom configs in the "config" folder and use this config file for the core "building" of DSpace.
+
<center>
 +
'''[[SUNScholar/Install_DSpace/S04|Back to Step 4]]'''
 +
</center>
 +
==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!!''
  
To edit the "build.properties" file, type the following:
+
''Use an email address with an [[PKP/Bug_Fixes/SPF|SPF complaint domain]] for: %dspace-noreply@myu.edu%''
nano /home/dspace/dspace-3.2-src-release/build.properties
 
See example below.
 
  
Replace all the places with a pair of percent signs ('''%something%'''), with the settings for your system.
+
==Procedure==
 +
To edit the '''[https://github.com/DSpace/DSpace/blob/dspace-3_x/build.properties build.properties]''' file, type the following:
 +
nano $HOME/{{Source}}/build.properties
 +
<font color="red">'''Check the file to make sure the following critical "Server Configuration" is correct;'''</font>
 +
===Server 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
 +
Installation Folder,'''<big><tt>dspace.install.dir = /home/dspace</tt></big>''',[[SUNScholar/Install_Ubuntu/S03/DSpace_User|Make sure you have created the "dspace" user]].
 +
Hostname for the repository,'''<big><tt>dspace.hostname = %scholar.sun.ac.za%</tt></big>''',[[SUNScholar/Install_Ubuntu/S03/Hostname|This is the hostname you decided to use for your repository]].
 +
Base URL for the repository,'''<big><tt>dspace.baseUrl = %http://scholar.sun.ac.za%</tt></big>''',Make sure to remove the "8080" port reference.
 +
The long name for the repository,'''<big><tt>dspace.name = %SUNScholar Research Repository%</tt></big>''',This is usually for the repository manager to decide.
 +
SOLR server connection,'''<big><tt>solr.server = http://localhost/solr</tt></big>''',[[SUNScholar/Install_DSpace/S06|Make sure that you deploy the SOLR java web app correctly and make sure to remove the "8080" port reference]].
 +
The default language,'''<big><tt>default.language = %en_ZA%</tt></big>''',[[SUNScholar/Language|Make sure to select the correct language for your region]].
 +
</tab>
  
<font color="red">
+
===Database Configuration===
#'''Be careful to NOT comment out any settings, leave them as they are with blanks!!'''
+
Replace all the places with a pair of percent signs ('''%something%''') in the example below with the settings for your system.
#'''Check the [[Install DSpace/S04/1.8.2|1.8.2 config help]] for important comments about critical settings.'''
+
<tab width="100%" class="wikitable" sep=comma head=top>
</font>
+
Description,Setting,Comments
 +
Database name,'''<big><tt>db.name=postgres</tt></big>''',[[SUNScholar/Prepare_Ubuntu/S06|We selected the PostgreSQL database]].
 +
Database driver,'''<big><tt>db.driver=org.postgresql.Driver</tt></big>''',[[SUNScholar/Prepare_Ubuntu/S06|We selected the PostgreSQL driver]].
 +
Database connection URL,'''<big><tt>db.url=jdbc:postgresql://localhost:5432/dspace</tt></big>''',We connect locally on port 5432 to the "dspace" database.
 +
Database credentials,'''<big><tt>db.username=%dspace%</tt></big>'''<br>'''<big><tt>db.password=%dspace%</tt></big>''',''Supply your own very secret credentials.''
 +
</tab>
 +
 
 +
===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.
 
<pre>
 
<pre>
 
# DSpace build.properties
 
# DSpace build.properties
Line 39: Line 71:
 
dspace.install.dir = /home/dspace
 
dspace.install.dir = /home/dspace
  
# DSpace host name - should match base URL. Do not include port number
+
# DSpace hostname.
dspace.hostname = %localhost%
+
dspace.hostname = %scholar.sun.ac.za%
  
# DSpace base host URL.  Include port number etc.
+
# DSpace URL.
dspace.baseUrl = %http://localhost%
+
dspace.baseUrl = %http://scholar.sun.ac.za%
  
 
# Name of the site
 
# Name of the site
dspace.name = %DSpace at My University%
+
dspace.name = %SUNScholar Research Repository%
  
 
# Solr server
 
# Solr server
solr.server = %http://localhost/solr%
+
solr.server = http://localhost/solr
  
 
# Default language for metadata values
 
# Default language for metadata values
Line 80: Line 112:
  
 
# Maximum number of DB connections in pool
 
# Maximum number of DB connections in pool
db.maxconnections = %300%
+
db.maxconnections = %200%
  
 
# Maximum time to wait before giving up if all connections in pool are busy (milliseconds)
 
# Maximum time to wait before giving up if all connections in pool are busy (milliseconds)
Line 86: Line 118:
  
 
# Maximum number of idle connections in pool (-1 = unlimited)
 
# Maximum number of idle connections in pool (-1 = unlimited)
db.maxidle = -1
+
db.maxidle = %400%
  
 
# Determine if prepared statement should be cached. (default is true)
 
# Determine if prepared statement should be cached. (default is true)
Line 166: Line 198:
 
</pre>
 
</pre>
  
{{NANO}}
+
Save and exit the file.
  
'''[[SUNScholar/Install_DSpace/S04|Back to Step 4]]'''
+
==References==
 +
*https://wiki.duraspace.org/display/DSDOC3x/Configuration#Configuration-Thebuild.propertiesConfigurationPropertiesFile
 +
*https://github.com/DSpace/DSpace/blob/dspace-3_x/build.properties
 +
*https://github.com/DSpace/DSpace/blob/dspace-3_x/dspace/config/dspace.cfg
 +
 
 +
[[Category:Installation]]

Latest revision as of 12:32, 22 June 2016

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/source/build.properties

Check the file to make sure the following critical "Server 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. <tab width="100%" class="wikitable" sep=comma head=top> 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. </tab>

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 name,db.name=postgres,We selected the PostgreSQL database. Database driver,db.driver=org.postgresql.Driver,We selected the PostgreSQL driver. Database connection URL,db.url=jdbc:postgresql://localhost:5432/dspace,We connect locally on port 5432 to the "dspace" database. Database credentials,db.username=%dspace%
db.password=%dspace%,Supply your own very secret credentials. </tab>

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.

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

##########################
# SERVER CONFIGURATION #
##########################

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

dspace.install.dir = /home/dspace

# DSpace hostname.
dspace.hostname = %scholar.sun.ac.za%

# DSpace URL.
dspace.baseUrl = %http://scholar.sun.ac.za%

# Name of the site
dspace.name = %SUNScholar Research Repository%

# Solr server
solr.server = http://localhost/solr

# Default language for metadata values
default.language = %en_ZA%

##########################
# DATABASE CONFIGURATION #
##########################

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

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

# oracle
#db.driver= oracle.jdbc.OracleDriver
#db.url=jdbc:oracle:thin:@//localhost:1521/xe
#db.username=dspace
#db.password=dspace

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

# Maximum number of DB connections in pool
db.maxconnections = %200%

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

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

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

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

#######################
# EMAIL CONFIGURATION #
#######################

# SMTP mail server
mail.server = %smtp.example.com%

# SMTP mail server authentication username and password (if required)
# mail.server.username = myusername
# mail.server.password = mypassword
mail.server.username=
mail.server.password=

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

# From address for mail
mail.from.address = %dspace-from-email-address@myu.edu%

# Currently limited to one recipient!
mail.feedback.recipient = %dspace-feedback@myu.edu%

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

# Recipient for server errors and alerts
#mail.alert.recipient = email-address-here
mail.alert.recipient = %dspace-alert@myu.edu%

# Recipient for new user registration emails
#mail.registration.notify = email-address-here
mail.registration.notify = %dspace-registration-notify@myu.edu%


########################
# HANDLE CONFIGURATION #
########################

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

# CNRI Handle prefix
handle.prefix = 123456789

#######################
# PROXY CONFIGURATION #
#######################
# uncomment and specify both properties if proxy server required
# proxy server for external http requests - use regular hostname without port number
http.proxy.host =

# port number of proxy server
http.proxy.port =

Save and exit the file.

References