Issuu on Google+

Install_Dspace_Source

1

Install_Dspace_Source Introduction Now that the server has been prepared for the Dspace installation we proceed to do the actual Dspace installation. Please follow all the instructions of the facilitators during the installation. The installation will be done step-by-step so that everyone proceeds at the same pace.

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

[1]

Type the following on the command line to get the Dspace source code: wget http:/ / services. lib. sun. ac. za/ files/ dspace-1. 5. 2-src-release. tar. gz

Step 3. Unpack Dspace Type the following to untar the source code. tar -xzvf /home/dspace/dspace-1.5.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.5.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%/jspui 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


Install_Dspace_Source 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_GB

Step 5. Download the Maven2 packages from the Internet Type the following to enable a connection to internet: (This is for use on the campus of the University of Stellenbosch only.) export http_proxy="http:/ / lib-proxy. sun. ac. za:3128" Now change to the source folder as follows: cd /home/dspace/dspace-1.5.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, then check your Maven 2 config file and your campus proxy environment variable. The Maven 2 config file and the campus proxy environment variable must point to the same server. 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.5.2-release/dspace/target/dspace-1.5.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

2


Install_Dspace_Source [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.5.2-src-release/dspace/target/dspace-1.5.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:

3


Install_Dspace_Source [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

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. ***

4


Install_Dspace_Source

Step 8. Enable the java webapp on the Tomcat server The Dspace webapp has been compiled in the /home/dspace/webapps folder but Tomcat only serves up webapps in the /usr/share/tomcat5.5/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/tomcat55/webapps folder. To achieve this become the root user by typing as follows: sudo -i To change directory to the Tomcat55 webapps folder, type the following: cd /usr/share/tomcat5.5/webapps To create file system shortcuts to the "/home/dspace" folders, type the following line by line: ln -s /home/dspace/webapps/jspui/ ln -s /home/dspace/webapps/xmlui/ ln -s /home/dspace/webapps/oai/ ln -s /home/dspace/webapps/sword/ ln -s /home/dspace/webapps/lni/

Step 9. *** Setup UNIX file permissions for Dspace folders *** We need to setup the correct UNIX file permissions on the DSpace sub directories. The user account which Tomcat 5.5 uses, should have full read and write access to the following directories: • • • • •

assetstore log search upload config

To do this we will give the user "tomcat55" full user write permission and the user "dspace" full group write permission to the above folders as follows:

5


Install_Dspace_Source

Become "root" user To achieve this become the root user by typing as follows: sudo -i

Setup "assetstore" ownership and file permissions Type the following; chown tomcat55 -R /home/dspace/assetstore chmod g+w -R /home/dspace/assetstore

Setup "log" ownership and file permissions Type the following; chown tomcat55 -R /home/dspace/log chmod g+w -R /home/dspace/log

Setup "upload" ownership and file permissions Type the following; chown tomcat55 -R /home/dspace/upload chmod g+w -R /home/dspace/upload

Setup "config" ownership and file permissions Type the following; chown tomcat55 -R /home/dspace/config chmod g+w -R /home/dspace/config

Setup "exports" ownership and file permissions Type the following; mkdir /home/dspace/exports chown tomcat55 -R /home/dspace/exports chmod g+w -R /home/dspace/exports

6


Install_Dspace_Source

7

Check folder properties Type the following to check the links are correct: ls -l You should get the following output: root@server:/usr/share/tomcat5.5/webapps# ls -l total 0 lrwxrwxrwx 1 root root 27 2009-09-19 17:28 jspui -> /home/dspace/webapps/jspui/ lrwxrwxrwx 1 root root 25 2009-09-19 17:28 lni -> /home/dspace/webapps/lni/ lrwxrwxrwx 1 root root 25 2009-09-19 17:28 oai -> /home/dspace/webapps/oai/ lrwxrwxrwx 1 root root 27 2009-09-19 17:28 sword -> /home/dspace/webapps/sword/ lrwxrwxrwx 1 root root 27 2009-09-19 17:28 xmlui -> /home/dspace/webapps/xmlui/ Now go to the "/home/dspace" folder: cd /home/dspace Type the following to check file and folder permissions: ls -l You should get the following output: root@server:/home/dspace# ls -l total 4584 drwxrwxr-x 59 tomcat55 dspace 4096 drwxr-xr-x 2 dspace dspace 4096 drwxrwxr-x 6 tomcat55 dspace 4096 drwxr-xr-x 9 dspace dspace 4096 dspace-1.5.2-src-release -rwxr-xr-x 1 dspace dspace 4626034 dspace-1.5.2-src-release.tar.gz drwxr-xr-x 3 dspace dspace 4096 drwxr-xr-x 3 tomcat55 dspace 4096 drwxr-xr-x 2 dspace dspace 4096 drwxr-xr-x 2 dspace dspace 4096 drwxrwxr-x 2 tomcat55 dspace 4096 drwxr-xr-x 2 dspace dspace 4096 drwxr-xr-x 2 dspace dspace 4096 drwxrwxr-x 2 tomcat55 dspace 4096 drwxr-xr-x 7 dspace dspace 4096

2009-09-29 2009-10-02 2009-10-02 2009-04-14

16:37 assetstore 14:03 bin 14:03 config 10:23

2009-07-14 08:49 2009-10-02 2009-10-02 2009-09-29 2009-10-02 2009-09-29 2009-09-29 2009-09-29 2009-09-29 2009-10-02

Check that the "tomcat55" user owns the correct folders.

14:03 14:40 16:05 14:03 16:07 16:05 16:37 16:05 14:03

etc exports handle-server lib log reports search upload webapps


Install_Dspace_Source

Step 10. Login to the Dspace application as the "admin" user Type the following in your browser address bar; http:/ / %hostname%/ jspui or http:/ / %hostname%/ xmlui Click on "Edit Profile" with the "jspui" user interface or "Login" with the "xmlui" user interface and login with the 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. Consult your Dspace 1.5.2 manual for further configuration. The main Dspace wiki page has further details about other tasks you may want to accomplish with your Dspace installation.

Command Line Help Go to: http:/ / www. ubuntu. sun. ac. za/ wiki/ index. php/ SelfHelp for more help about the command line programs used in this procedure.

PDF Version The PDF version is downloadable from: • http:/ / services. lib. sun. ac. za/ files/ dspace/ Install_Dspace_Source. pdf

References [1] http:/ / wiki. dspace. org/ index. php/ Main_Page

8


Article Sources and Contributors

Article Sources and Contributors Install_ Dspace_ Source  Source: http://services.lib.sun.ac.za/wiki/index.php?title=Install_Dspace_Source  Contributors: Cls, Hgibson

9


Install DSpace 1.5.2 on Ubuntu 8.04 LTS