SUNScholar/Install DSpace

From Libopedia
Jump to navigation Jump to search
It is vitally essential that you have first completed the preparation of Ubuntu for the installation of DSpace.

If you have not, please do so now.

Introduction

Step 1. Login to the remote server

On your client PC with the Ubuntu desktop live CD, click on: Applications => Accessories => Terminal to open a command line terminal.

Login to your remote server as the "dspace" user by typing as follows in the terminal

ssh dspace@%hostname%

Replace %hostname% with the hostname of your server.

Step 2. Get DSpace version 1.6.2

Click on the link above and download the DSpace 1.6.2 source code to the dspace home folder.

Step 3. Unpack DSpace

Type the following to extract the source code.

tar -xzvf /home/dspace/dspace-1.6.2-src-release.tar.gz

Step 4. *** Edit the DSpace configuration ***

Type the following to edit the Dspace (dspace.cfg) config file:

nano /home/dspace/dspace-1.6.2-src-release/dspace/config/dspace.cfg

Replace all the places with a pair of percent signs (%something%) with the settings for your campus.

dspace.dir = /home/dspace
dspace.url = http://%hostname%
dspace.hostname = %hostname%
dspace.name = DSpace for My University
db.name = postgres
db.url = jdbc:postgresql://localhost:5432/dspace
db.driver = org.postgresql.Driver
db.username = dspace
db.password = dspace
mail.server = %my_university_mail_server_address%
mail.from.address = %my_email_address%
feedback.recipient = %my_email_address%
mail.admin = %my_email_address%
alert.recipient = %my_email_address%
registration.notify = %my_email_address%
default.language = en_ZA

Step 5. Maven packages installation

Change to the source folder as follows:

cd /home/dspace/dspace-1.6.2-src-release

Type the following to download the maven2 packages. Ensure you have an open connection to the internet first.

mvn package

A lot of stuff will be downloaded and scroll on the screen.

If nothing downloads, check your maven config file and ask for an open connection to the internet for your server from your IT department.

If the downloads start, then go make a cup coffee and check your emails.. this takes quite a while with slow internet connections !!

When complete you will get a message like this:

[INFO] Copying 861 files to /home/dspace/dspace-1.6.2-release/dspace/target/dspace-1.6.2-build.dir
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] DSpace Addon Modules .................................. SUCCESS [30.453s]
[INFO] DSpace XML-UI (Manakin) :: Web Application ............ SUCCESS [1:14.611s]
[INFO] DSpace LNI :: Web Application ......................... SUCCESS [10.261s]
[INFO] DSpace OAI :: Web Application ......................... SUCCESS [6.427s]
[INFO] DSpace JSP-UI :: Web Application ...................... SUCCESS [8.017s]
[INFO] DSpace SWORD :: Web Application ....................... SUCCESS [5.869s]
[INFO] DSpace Assembly and Configuration ..................... SUCCESS [43.018s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 59 seconds
[INFO] Finished at: Sun Apr 12 07:40:07 BST 2009
[INFO] Final Memory: 25M/255M
[INFO] ------------------------------------------------------------------------

Step 6. Compile the DSpace Java webapp

Change directory to the build directory by typing as follows:

cd /home/dspace/dspace-1.6.2-src-release/dspace/target/dspace-1.6.2-build.dir

Type the following in the above named directory:

ant fresh_install

A lot of information now appears on the screen. Below are shown the last lines confirming success:

[echo] ====================================================================
[echo] The DSpace code has been installed, and the database initialized.
[echo]
[echo] To complete installation, you should do the following:
[echo]
[echo] * Setup your Web servlet container (e.g. Tomcat) to look for your
[echo] DSpace web applications in: /home/dspace/webapps/
[echo]
[echo] OR, copy any web applications from /home/dspace/webapps/ to
[echo] the appropriate place for your servlet container.
[echo] (e.g. '$CATALINA_HOME/webapps' for Tomcat)
[echo]
[echo] * Make an initial administrator account (an e-person) in DSpace:
[echo]
[echo] /home/dspace/bin/create-administrator
[echo]
[echo] * Start up your servlet container (Tomcat etc.)
[echo]
[echo] You should then be able to access your DSpace's 'home page':
[echo]
[echo] http://vleinternal.bromley.ac.uk/dspace
[echo]
[echo] You should also be able to access the administrator UI:
[echo]
[echo] http://vleinternal.bromley.ac.uk/dspace/dspace-admin
[echo] ====================================================================
[echo]
BUILD SUCCESSFUL

Please note: If you change anything later then rebuild your Dspace.

Step 7. *** Create the DSpace admin user ***

If you get a "build successful" message from the previous step, then add an admin user for your Dspace installation as follows:

/home/dspace/bin/create-administrator

Fill in all the details when prompted and keep the credentials a secret.

Creating an initial administrator account
E-mail address: %emailaddress%
First name: Hilton
Last name: Gibson
WARNING: Password will appear on-screen.
Password: dspace
Again to confirm: dspace
Is the above data correct? (y or n): y
Administrator account created

This is what should happen. Change the %emailaddress% to your email address.

*** Do not let any unauthorised persons have access to your Dspace admin account. ***

Step 8. Enable the DSpace java webapps on the java Tomcat webapp server

The Dspace webapp has been compiled in the /home/dspace/webapps folder but Tomcat only serves up webapps in the /usr/share/tomcat6/webapps folder.

So, how do we get all the files into the Tomcat webapps folder ?

There are several methods, but we are going to set it up so that if you change anything in the Dspace /home/dspace/webapps folder and re-compile then the changes automatically occur in the Tomcat /usr/share/tomcat6/webapps folder.

To achieve this become the root user by typing as follows:

sudo -i

Now we create the shortcuts to the Dspace webapps in the default Tomcat webapps folder by typing as follows:

cd /usr/share/tomcat6/webapps
ln -s /home/dspace/webapps/xmlui
ln -s /home/dspace/webapps/jspui
ln -s /home/dspace/webapps/sword
ln -s /home/dspace/webapps/oai
ln -s /home/dspace/webapps/lni

Step 8.1 Enable the default DSpace java webapp on the java Tomcat webapp server

Step 9. Setup the "jspui" or "xmlui" interface as the default interface.

Click on the heading above.

Step 10. Login to the DSpace application as the "admin" user

Type the following in your browser address bar:

http://%hostname-of-your-new-repository%

Click on "Edit Profile" and login with the DSpace admin email address and password.

Conclusion

Well done with the Dspace installation !!

Now you can pat yourself on the back for a job well done. Download and consult the Dspace 1.6.2 manual for further configuration.