Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Removal of all odd ' ' characters

...

  • UNIX-like OS (Linux, HP/UX etc) : Many distributions of Linux/Unix come with some of the dependencies below pre installed or easily installed via updates, you should consult your particular distributions documentation to determine what is already available.¬†
  • Microsoft Windows: (see full Windows Instructions for full set of prerequisites)

...

  • Default Release (dspace-<version>-release.zip)
    • This distribution will be adequate for most cases of running a DSpace instance. It is intended to be the quickest way to get DSpace installed and running while still allowing for customization of the themes and branding of your DSpace instance. ¬†
    • This method allows you to customize DSpace configurations (in dspace.cfg) or user interfaces, using basic pre-built interface "overlays".¬†
    • It downloads "precompiled" libraries for the core dspace-api, supporting servlets, taglibraries, aspects and themes for the dspace-xmlui, dspace-xmlui and other webservice/applications.¬†
    • This approach exposes the parts of the application that the DSpace committers would prefer to see customized. All other modules are downloaded from the 'Maven Central Repository' ¬†The The directory structure for this release is the following:
      • Wiki Markup
        _\[dspace-source\]_
        • dspace/ - DSpace 'build' and configuration module
        • pom.xml - DSpace Parent Project definition
  • Source Release (dspace-<version>-src-release.zip)
    • This method is recommended for those who wish to develop DSpace further or alter its underlying capabilities to a greater degree.¬†
    • It contains all dspace code for the core dspace-api, supporting servlets, taglibraries, aspects and themes for Manakin (dspace-xmlui), and other webservice/applications.
    • Provides all the same capabilities as the normal release. ¬†The The directory structure for this release is more detailed:
      • Wiki Markup
        _\[dspace-source\]_
        • dspace/ - DSpace 'build' and configuration module
        • dspace-api/ - Java API source module
        • dspace-jspui/ - JSP-UI source module
        • dspace-oai - OAI-PMH source module
        • dspace-xmlui - XML-UI (Manakin) source module
        • dspace-lni - Lightweight Network Interface source module
        • dspace-sword – SWORD (Simple Web-serve Offering Repository Deposit) deposit service source module
        • dspace-test – DSpace Tests (Unit and Integration Tests)
        • pom.xml - DSpace Parent Project definition

...

  1. For Production use: Follow this procedure to set up SSL on your server. Using a "real" server certificate ensures your users' browsers will accept it without complaints. In the examples below, $CATALINA_BASE is the directory under which your Tomcat is installed.
    1. Create a Java keystore for your server with the password changeit, and install your server certificate under the alias "tomcat". This assumes the certificate was put in the file server.pem:
      Code Block
      $JAVA_HOME/bin/keytool -import -noprompt -v -storepass changeit
      	-keystore $CATALINA_BASE/conf/keystore -alias tomcat -file
      	myserver.pem
    2. Install the CA (Certifying Authority) certificate for the CA that granted your server cert, if necessary. This assumes the server CA certificate is in ca.pem:
      Code Block
       $JAVA_HOME/bin/keytool -import -noprompt -storepass changeit
      	-trustcacerts -keystore $CATALINA_BASE/conf/keystore -alias ServerCA
      	-file ca.pem
      
    3. Optional – ONLY if you need to accept client certificates for the X.509 certificate stackable authentication module See the configuration section for instructions on enabling the X.509 authentication method. Load the keystore with the CA (certifying authority) certificates for the authorities of any clients whose certificates you wish to accept. For example, assuming the client CA certificate is in client1.pem:
      Code Block
      $JAVA_HOME/bin/keytool -import -noprompt -storepass changeit
      	-trustcacerts -keystore $CATALINA_BASE/conf/keystore  -alias client1
      	-file client1.pem
      
    4. Now add another Connector tag to your server.xml Tomcat configuration file, like the example below. The parts affecting or specific to SSL are shown in bold. (You may wish to change some details such as the port, pathnames, and keystore password)
      Code Block
           <Connector port="8443"
                     maxThreads="150" minSpareThreads="25"
      	           maxSpareThreads="75"
                     enableLookups="false"
      	           disableUploadTimeout="true"
                     acceptCount="100" debug="0"
                    scheme="https" secure="true" sslProtocol="TLS"
      	keystoreFile="conf/keystore" keystorePass="changeit" clientAuth="true" - ONLY if using client X.509 certs for authentication!
      	truststoreFile="conf/keystore" trustedstorePass="changeit" />
      
      Also, check that the default Connector is set up to redirect "secure" requests to the same port as your SSL connector, e.g.:  
      Code Block
      <Connector port="8080"
                       maxThreads="150" minSpareThreads="25"
      	             maxSpareThreads="75"
                       enableLookups="false"
      	             redirectPort="8443"
                       acceptCount="100" debug="0"  	/>
      
  2. Quick-and-dirty Procedure for Testing: If you are just setting up a DSpace server for testing, or to experiment with HTTPS, then you don't need to get a real server certificate. You can create a "self-signed" certificate for testing; web browsers will issue warnings before accepting it but they will function exactly the same after that as with a "real" certificate.  In In the examples below, $CATALINA_BASE is the directory under which your Tomcat is installed.
    1. Optional РONLY if you don't already have a server certificate. Follow this sub-procedure to request a new, signed server certificate from your Certifying Authority (CA):  
      • Create a new key pair under the alias name "tomcat". When generating your key, give the Distinguished Name fields the appropriate values for your server and institution. CN should be the fully-qualified domain name of your server host. Here is an example:
        Code Block
        $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -keysize
        	1024 \
          -keystore $CATALINA_BASE/conf/keystore -storepass changeit
        	-validity 365 \
          -dname 'CN=dspace.myuni.edu, OU=MIT Libraries, O=Massachusetts
        	Institute of Technology, L=Cambridge, S=MA, C=US'
        
        
      • Then, create a CSR (Certificate Signing Request) and send it to your Certifying Authority. They will send you back a signed Server Certificate. This example command creates a CSR in the file tomcat.csr
        Code Block
         $JAVA_HOME/bin/keytool -keystore $CATALINA_BASE/conf/keystore
        	-storepass changeit \
           -certreq -alias tomcat -v -file tomcat.csr
        
      • Before importing the signed certificate, you must have the CA's certificate in your keystore as a trusted certificate. Get their certificate, and import it with a command like this (for the example mitCA.pem):
        Code Block
         $JAVA_HOME/bin/keytool -keystore $CATALINA_BASE/conf/keystore
        	-storepass changeit \
             -import -alias mitCA -trustcacerts -file mitCA.pem
        
      • Finally, when you get the signed certificate from your CA, import it into the keystore with a command like the following example: (cert is in the file signed-cert.pem)
        Code Block
         $JAVA_HOME/bin/keytool -keystore $CATALINA_BASE/conf/keystore
        	-storepass changeit \
             -import -alias tomcat -trustcacerts -file signed-cert.pem
        
        Since you now have a signed server certificate in your keystore, you can, obviously, skip the next steps of installing a signed server certificate and the server CA's certificate. 
    2. Create a Java keystore for your server with the password changeit, and install your server certificate under the alias "tomcat". This assumes the certificate was put in the file server.pem:
      Code Block
       $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA -keystore
      	$CATALINA_BASE/conf/keystore -storepass changeit
      
      When answering the questions to identify the certificate, be sure to respond to "First and last name" with the fully-qualified domain name of your server (e.g. test-dspace.myuni.edu). The other questions are not important.
    3. Optional – ONLY if you need to accept client certificates for the X.509 certificate stackable authentication module See the configuration section for instructions on enabling the X.509 authentication method. Load the keystore with the CA (certifying authority) certificates for the authorities of any clients whose certificates you wish to accept. For example, assuming the client CA certificate is in client1.pem:
      Code Block
       $JAVA_HOME/bin/keytool -import -noprompt -storepass changeit
      	-trustcacerts -keystore $CATALINA_BASE/conf/keystore  -alias client1
      	-file client1.pem
      
    4. Follow the procedure in the section above to add another Connector tag, for the HTTPS port, to your server.xml file.

...

  • You don't have to use CNRI's Handle system. At the moment, you need to change the code a little to use something else (e.g PURLs) but that should change soon.
  • You'll notice that while you've been playing around with a test server, DSpace has apparently been creating handles for you looking like hdl:123456789/24 and so forth. These aren't really Handles, since the global Handle system doesn't actually know about them, and lots of other DSpace test installs will have created the same IDs.They're only really Handles once you've registered a prefix with CNRI (see below) and have correctly set up the Handle server included in the DSpace distribution. This Handle server communicates with the rest of the global Handle infrastructure so that anyone that understands Handles can find the Handles your DSpace has created.¬†
    If you want to use the Handle system, you'll need to set up a Handle server. This is included with DSpace. Note that this is not required in order to evaluate DSpace; you only need one if you are running a production service. You'll need to obtain a Handle prefix from the central CNRI Handle site.

...

  1. Wiki Markup
    To configure your DSpace installation to run the handle server, run the following command:  _\[dspace\]/bin/dspace make-handle-config_ Ensure that \_\[dspace\]/handle-server_ matches whatever you have in _dspace.cfg_ for the _handle.dir_ property.
  2. Wiki Markup
    Edit the resulting _\[dspace\]/handle-server/config.dct_ file to include the following lines in the _"server_config"_ clause: 
    Code Block
    "storage_type" = "CUSTOM"
    "storage_class" = "org.dspace.handle.HandlePlugin"
    
    This tells the Handle server to get information about individual Handles from the DSpace code. 
  3. Once the configuration file has been generated, you will need to go to http://hdl.handle.net/4263537/5014 to upload the generated sitebndl.zip file. The upload page will ask you for your contact information. An administrator will then create the naming authority/prefix on the root service (known as the Global Handle Registry), and notify you when this has been completed. You will not be able to continue the handle server installation until you receive further information concerning your naming authority.
  4. Wiki Markup
    When CNRI has sent you your naming authority prefix, you will need to edit the _config.dct_ file. The file will be found in _/\[dspace\]/handle-server_. Look for _"300:0.NA/YOUR_NAMING_AUTHORITY"_Replace \_YOUR_NAMING_AUTHORITY_ with the assigned naming authority prefix sent to you.
  5. Now start your handle server (as the dspace user):  
    Code Block
    [dspace]/bin/start-handle-server
    Note that since the DSpace code manages individual Handles, administrative operations such as Handle creation and modification aren't supported by DSpace's Handle server.

...

Wiki Markup
When running _\[dspace\]/bin/generate-sitemaps_ the script informs Google that the sitemaps have been updated. For this update to register correctly, you must first register your Google sitemap index page (_/dspace/sitemap_) with Google at [http://www.google.com/webmasters/sitemaps/|http://www.google.com/webmasters/sitemaps/|http://www.google.com/webmasters/sitemaps/]. If your DSpace server requires the use of a HTTP proxy to connect to the Internet, ensure that you have set _http.proxy.host_ and _http.proxy.port_ in _\[dspace\]/config/dspace.cfg_

...

  1. DSpace Configuration for Accessing Solr. In the dspace.cfg file review the following fields to make sure they are uncommented:
    Code Block
    solr.log.server = ${dspace.baseUrl}/solr/statistics
    solr.dbfile = ${dspace.dir}/config/GeoLiteCity.dat
    solr.spiderips.urls = http://iplists.com/google.txt, \
                          http://iplists.com/inktomi.txt, \
                          http://iplists.com/lycos.txt, \
                          http://iplists.com/infoseek.txt, \
                          http://iplists.com/altavista.txt, \
                          http://iplists.com/excite.txt, \
                          http://iplists.com/misc.txt, \
                          http://iplists.com/non_engines.txt
  2. DSpace logging configuration for Solr. If your DSpace instance is protected by a proxy server, in order for Solr to log the correct IP address of the user rather than of the proxy, it must be configured to look for the X-Forwarded-For header.  This feature can be enabled by ensuring the following setting is uncommented in the logging section of dspace.cfg:
    Code Block
    useProxies = true
  3. DSpace configuration for fields indexed into Solr Event records for search. In the dspace.cfg file, review the following property keys to make sure they are uncommented:
    Code Block
    statistics.items.dc.1=dc.identifier
    statistics.items.dc.2=dc.date.accessioned
    statistics.items.type.1=dcinput
    statistics.items.type.2=date
    statistics.default.start.datepick = 01/01/1977
  4. Configuration Control. In the dspace.cfg set the following property key:_statistics.item.authorization.admin=true_This will require the user to sign on to see that statistics. Setting the statistics to "false" will make them publicly available. 
  5. Final steps.  
    • Perform the following step: ¬†
      Code Block
      cd [dspace-source]/dspace
      mvn package
      cd [dspace-source]/dspace/target/dspace-<version>-build.dir
      ant -Dconfig=[dspace]/config/dspace.cfg update
      cp -R [dspace]/webapps/* [TOMCAT]/webapps
      
      Wiki Markup
      If you only need to build the statistics, and don't make any changes to other web applications, you can replace the copy step above with:  _cp \-R \[dspace\]/webapps/solr \[TOMCAT\]/webapps_
    • Restart your webapps (Tomcat/Jetty/Resin)¬†

Windows Installation

Pre-requisite Software

...

  1. Download the DSpace source from SourceForge and untar it (WinZip will do this)
  2. Ensure the PostgreSQL service is running, and then run pgAdmin III (Start -> PostgreSQL 8.0 -> pgAdmin III). Connect to the local database as the postgres user and:
    • Create a 'Login Role' (user) called dspace with the password dspace
    • Create a database called dspace owned by the user dspace, with UTF-8 encoding
  3. Wiki Markup
    Update paths in _\[dspace-source\]\dspace\config\dspace.cfg_. *Note:* Use forward slashes / for path separators, though you can still use drive letters, e.g.:_dspace.dir = C:/DSpace_Make sure you change all of the parameters with file paths to suit, specifically:  
    Code Block
            dspace.dir
            config.template.log4j.properties
            config.template.log4j-handle-plugin.properties
            config.template.oaicat.properties
            assetstore.dir
            log.dir
            upload.temp.dir
            report.dir
            handle.dir
    
  4. Create the directory for the DSpace installation (e.g. C:\DSpace)
  5. Wiki Markup
    Generate the DSpace installation package by running the following from command line (cmd) from your _\[dspace-source\]/dspace/_ directory: 
    Code Block
    mvn package
    
    Wiki Markup
    Note #1: This will generate the DSpace installation package in your _\[dspace-source\]/dspace/target/dspace-\[version\]-build.dir/_ directory.Note #2: Without any extra arguments, the DSpace installation package is initialized for PostgreSQL. If you want to use Oracle instead, you should build the DSpace installation package as follows:  
    Code Block
    mvn -Ddb.name=oracle package
    
  6. Wiki Markup
    Initialize the DSpace database and install DSpace to _\[dspace\]_ (e.g. _C:\DSpace_) by running the following from command line from your _\[dspace-source\]/dspace/target/dspace-\[version\]-build.dir/_ directory:
    Code Block
    ant fresh_install
    
    Note: to see a complete list of build targets, run
    Code Block
    ant help
    
  7. Wiki Markup
    Create an administrator account, by running the following from your _\[dspace\]_ (e.g. _C:\DSpace_) directory_\[dspace\]\bin\dspace create-administrator_and enter the required information information
  8. Wiki Markup
    Copy the Web application directories from _\[dspace\]\webapps to Tomcat's webapps dir, which should be somewhere like C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps_
    • Wiki Markup
      Alternatively, Tell your Tomcat installation where to find your DSpace web application(s). As an example, in the _<Host>_ section of your _\[tomcat\]/conf/server.xml_ you could add lines similar to the following (but replace _\[dspace\]_ with your installation location):
      Code Block
      <!-- DEFINE A CONTEXT PATH FOR DSpace JSP User Interface  -->
      <Context path="/jspui" docBase="[dspace]\webapps\jspui" debug="0"
      	reloadable="true" cachingAllowed="false"
      	allowLinking="true"/>
      
      <!-- DEFINE A CONTEXT PATH FOR DSpace OAI User Interface  -->
      <Context path="/oai" docBase="[dspace]\webapps\oai" debug="0"
      	reloadable="true" cachingAllowed="false"
      	allowLinking="true"/>
      
  9. Start the Tomcat service
  10. Browse to either http://localhost:8080/jspui or http://localhost:8080/xmlui. You should see the DSpace home page for either the JSPUI or XMLUI, respectively.

...

  • Wiki Markup
    System is up and running.  _User can see the DSpace home page. \[Tomcat/Jetty, firewall, IP assignment, DNS\]_
  • Wiki Markup
    Database is running and working correctly.  _Attempt to create a user, community or collection \[PostgreSQL, Oracle\]_{_}Run the test database command to see if other issues are being report:__\[dspace\]/bin/dspace test-database_
  • Wiki Markup
    Email subsystem is running. The The user can issue the following command to test the email system. t attempts to send a test email to the email address that is set in dspace.cfg (mail.admin). If it fails, you will get messages informing you as to why, will refer you to the DSpace documentation.  _\[dspace\]/bin/test-email_

...

  • Database errors occur when you run ant fresh_install: There are two common errors that occur. If your error looks like this-- ¬†
    Code Block
    [java] 2004-03-25 15:17:07,730 INFO
    	    org.dspace.storage.rdbms.InitializeDatabase @ Initializing Database
    [java] 2004-03-25 15:17:08,816 FATAL
    	    org.dspace.storage.rdbms.InitializeDatabase @ Caught exception:
    [java] org.postgresql.util.PSQLException: Connection refused. Check
    	    that the hostname and port are correct and that the postmaster is
    	    accepting TCP/IP connections.
    [java]     at
    	    org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJd
    bc1Connection.java:204)
    [java]     at org.postgresql.Driver.connect(Driver.java:139)
    Wiki Markup
    it usually means you haven't yet added the relevant configuration parameter to your PostgreSQL configuration (see above), or perhaps you haven't restarted PostgreSQL after making the change. Also, make sure that the _db.username_ and _db.password_ properties are correctly set in _\[dspace-source\]/config/dspace.cfg_.An easy way to check that your DB is working OK over TCP/IP is to try this on the command line:  
    Code Block
    psql -U dspace -W -h localhost
    Enter the dspacedatabase password, and you should be dropped into the psql tool with a dspace=> prompt.Another common error looks like this:  
    Code Block
    [java] 2004-03-25 16:37:16,757 INFO
    	    org.dspace.storage.rdbms.InitializeDatabase @ Initializing Database
    [java] 2004-03-25 16:37:17,139 WARN
    	    org.dspace.storage.rdbms.DatabaseManager @ Exception initializing DB
    	    pool
    [java] java.lang.ClassNotFoundException: org.postgresql.Driver
    [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    [java]     at java.security.AccessController.doPrivileged(Native
    	   Method)
    [java]     at
    	   java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    Wiki Markup
    This means that the PostgreSQL JDBC driver is not present in _\[dspace-source\]/lib_. See above.
  • Tomcat doesn't shut down: If you're trying to tweak Tomcat's configuration but nothing seems to make a difference to the error you're seeing, you might find that Tomcat hasn't been shutting down properly, perhaps because it's waiting for a stale connection to close gracefully which won't happen. To see if this is the case, try:
    Code Block
    ps -ef | grep java
    and look for Tomcat's Java processes. If they stay around after running Tomcat's shutdown.sh script, trying kill_ing them (with _-9 if necessary), then starting Tomcat again.
  • Database connections don't work, or accessing DSpace takes forever: If you find that when you try to access a DSpace Web page and your browser sits there connecting, or if the database connections fail, you might find that a 'zombie' database connection is hanging around preventing normal operation. To see if this is the case, try:
    Code Block
    ps -ef | grep postgres
    You might see some processes like this:
    Code Block
    dspace 16325  1997  0  Feb 14  ?         0:00 postgres: dspace dspace
    	    127.0.0.1 idle in transaction
    This is normal--DSpace maintains a 'pool' of open database connections, which are re-used to avoid the overhead of constantly opening and closing connections. If they're 'idle' it's OK; they're waiting to be used. However sometimes, if something went wrong, they might be stuck in the middle of a query, which seems to prevent other connections from operating, e.g.:
    Code Block
    dspace 16325  1997  0  Feb 14  ?         0:00 postgres: dspace dspace
    	    127.0.0.1 SELECT
    This means the connection is in the middle of a SELECT operation, and if you're not using DSpace right that instant, it's probably a 'zombie' connection. If this is the case, try _kill_ing the process, and stopping and restarting Tomcat.