Dspace tutorial

4,000 views

Published on

Step-by-step method to install DSpace digital library software.

Published in: Education
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,000
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
2
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Dspace tutorial

  1. 1. RAJEEV KUMAR Computer Programming Officer SAARC Doc. Centre, New Delhi Dspce
  2. 2. Required Software <ul><li>Operating System: </li></ul><ul><ul><li>Linux: Redhat/Fedora, Suse,Mandrake, Debian etc. </li></ul></ul><ul><ul><li>Unix: Solaris (Sun system) ‏ , HP-UX (Hewlett Packard) ‏ , AIX (IBM), Mac OS X </li></ul></ul><ul><li>Mail server (Sendmail/postfix) </li></ul><ul><li>RDBMS (postgres/oracle) </li></ul><ul><li>DSpace </li></ul><ul><li>Java compiler (jdk) </li></ul><ul><li>Java Servlet Container </li></ul><ul><li>Ant </li></ul><ul><ul><li>Java build tool, similar to make in the world of ‘C’ </li></ul></ul><ul><ul><li>Complies java programs of dspace source code, generates war files </li></ul></ul>
  3. 3. Role of RDBMS <ul><li>Database backend (postgres/oracle) of DSpace, stores information on: </li></ul><ul><ul><li>Communities </li></ul></ul><ul><ul><li>Collection </li></ul></ul><ul><ul><li>Members - passwords </li></ul></ul><ul><ul><li>E-groups etc. </li></ul></ul>
  4. 4. Step1: Linux Installation <ul><li>Strongly advise to Load Linux fully unless you are a Linux Guru </li></ul><ul><li>Make sure the following are installed </li></ul><ul><ul><li>Mail server </li></ul></ul><ul><li>Copy all the files provided on CD-ROM tar.gz files in /dspace directory </li></ul><ul><li>Or Download the following (or latest) files from Internet </li></ul><ul><ul><li>jdk1.5.0_02.tar.gz (java compiler) </li></ul></ul><ul><ul><li>apache-ant-1.7.0-bin.tar.gz (ant) </li></ul></ul><ul><ul><li>postgresql-8.2.7.tar.gz (RDBMS) </li></ul></ul><ul><ul><li>apache-tomcat-5.5.25.tar.gz (servlet container) </li></ul></ul><ul><ul><li>postgresql-8.3-603.jdbc2.jar (jdbc driver for postgres) </li></ul></ul><ul><ul><li>dspace-source-1.4.2.tar.gz (dspace software) </li></ul></ul>
  5. 5. Step 2: Installation of Java <ul><li>Install  Java 1.4 or later </li></ul><ul><li>You need to login as Linux root user to install </li></ul><ul><li>Use the command bellow to install </li></ul><ul><ul><li>#cd /dspace </li></ul></ul><ul><ul><li>#tar –zxvf   jdk1.5.0_02.tar.gz [to uncompress the file] </li></ul></ul><ul><ul><li>#rm /usr/bin/java [remove the original java binary if any] </li></ul></ul><ul><ul><li>#cd /usr/bin </li></ul></ul><ul><ul><li>#ln -s /dspace/jdk1.5.0_02/bin/java java [create Symbolic link to newly installed java if any] </li></ul></ul>
  6. 6. Step 2: Installation of Java (contd..) <ul><li>Define java home PATH by the commands: </li></ul><ul><ul><li>#JAVA_HOME=/dspace/jdk1.5.0_02 [ setting variable to point Java directory] </li></ul></ul><ul><ul><li>#export JAVA_HOME </li></ul></ul><ul><li>To set the environment variable JAVA_HOME permanently (get set at the time of system boot) do the following </li></ul><ul><ul><li>#vi /etc/profile (open /etc/profile file) </li></ul></ul><ul><ul><li>Add the two lines bellow at the end of the file. </li></ul></ul><ul><li>            JAVA_HOME=/dspace/jdk1.5.0_02 </li></ul><ul><li>            export JAVA_HOME </li></ul><ul><li>Save the file (press ESC :wq), this will set the variable JAVA_HOME when system boots </li></ul>
  7. 7. Step 3:Configuring Mail Server <ul><li>You may use any of the following mail servers </li></ul><ul><ul><li>Sendmail </li></ul></ul><ul><ul><li>Postfix </li></ul></ul><ul><ul><li>Exim </li></ul></ul><ul><ul><li>Note: Here sendmail is explained </li></ul></ul>
  8. 8. Step 3: Sendmail configuration: Simple approach <ul><li>Case I:If your organization has a mail server </li></ul><ul><ul><li>Open /etc/mail/sendmail.mc </li></ul></ul><ul><ul><li>Replace the line having </li></ul></ul><ul><ul><li>dnl define(`SMART_HOST', `smtp.your.provider')dnl </li></ul></ul><ul><ul><li>Remove dnl and enter your mail server name </li></ul></ul><ul><ul><li>Ex: </li></ul></ul><ul><ul><li>define(`SMART_HOST', `nsdl.niscair.res.in')dnl </li></ul></ul>
  9. 9. Step 3: sendmail configuration contd.. <ul><li>Case II: If you want to use the same system as mail server </li></ul><ul><li>Comment the following line </li></ul><ul><ul><li>DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl </li></ul></ul><ul><ul><li>Ex: </li></ul></ul><ul><ul><li>dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl </li></ul></ul>
  10. 10. Step 3: sendmail configuration contd.. <ul><li>Save the file (press ESC :wq) </li></ul><ul><li>Run </li></ul><ul><ul><li>#m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf </li></ul></ul><ul><ul><li>#service sendmail restart OR </li></ul></ul><ul><ul><li>#/etc/init.d/sendmail restart </li></ul></ul>
  11. 11. Step 4: Apache-ant installation <ul><li>Check apache ant is already installed or not using the command: </li></ul><ul><li>#which ant </li></ul><ul><li>You need to login as Linux root user </li></ul><ul><li>If not installed type the following commands to install </li></ul><ul><ul><li>#cd /dspace </li></ul></ul><ul><ul><li>#tar -zxvf apache-ant-1.7.0-bin.tar (extract files) </li></ul></ul>
  12. 12. Step 4: Apache-ant installation <ul><li>Define a path to the apache ant binary by the commands </li></ul><ul><ul><li>#PATH=$PATH:/dspace/apache-ant-1.7.0 /bin </li></ul></ul><ul><ul><li>#export PATH </li></ul></ul><ul><li>To add apache-ant path in  PATH variable permanently do the following </li></ul><ul><ul><li>Open the file /etc/profile and add the two line below towards the end of the file. </li></ul></ul><ul><ul><li>#vi /etc/profile </li></ul></ul><ul><ul><li>#PATH=$PATH:/dspace/apache-ant-1.7.0 /bin </li></ul></ul><ul><ul><li>#export PATH </li></ul></ul><ul><li>Save the file (Press ESC :wq) </li></ul>
  13. 13. Step 5: PostgreSQL installation <ul><li>You need to become Linux root user to install postgresql </li></ul><ul><li>Use the following commands to install </li></ul><ul><ul><li>#cd /dspace </li></ul></ul><ul><ul><li>#tar -zxvf postgresql-8.2.7.tar.gz (extract files) </li></ul></ul><ul><ul><li>#cd /dspace/postgresql-8.2.7 </li></ul></ul><ul><ul><li>#./configure (it will install postgres in /usr/local/pgsql directory) </li></ul></ul><ul><ul><li>#gmake </li></ul></ul><ul><ul><li>#gmake install </li></ul></ul><ul><ul><li>#useradd postgres [ create postgres user] </li></ul></ul><ul><ul><li>#mkdir /usr/local/pgsql/data </li></ul></ul><ul><ul><li>#chown -R postgres /usr/local/pgsql/data (change owner of the data directory to postgres) </li></ul></ul><ul><ul><li>#su - postrgres </li></ul></ul>
  14. 14. Step 5: PostgreSQL installation (contd..) <ul><li>Start posgres by doing the following </li></ul><ul><ul><li>$/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data </li></ul></ul><ul><ul><li>$/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start </li></ul></ul><ul><li>Create a dspace database, owned by the dspace –a PostgreSQL user by doing the following </li></ul><ul><ul><li>$/usr/local/pgsql/bin/createuser -U postgres -d -A -P dspace [Enter a password for the DSpace database] </li></ul></ul><ul><ul><li>$/usr/local/pgsql/bin/createdb -U dspace -E UNICODE dspace  </li></ul></ul><ul><li>$vi /usr/local/pgsql/data/postgresql.conf </li></ul><ul><ul><li>uncomment the line starting: </li></ul></ul><ul><ul><li>listen_addresses = 'localhost' (i.e. delete # at the beginning of line) </li></ul></ul><ul><li>$vi /usr/local/pgsql/data/pg_hba.conf </li></ul><ul><ul><li>add follwing line in the section # IPv4-style local connections </li></ul></ul><ul><ul><li>host dspace dspace 127.0.0.1 255.255.255.255 md5 </li></ul></ul><ul><li>Logout from postgres user </li></ul><ul><ul><li>#exit </li></ul></ul>
  15. 15. Step 6: Installation of Apache Tomcat <ul><li>You have to become root user and type the following commands </li></ul><ul><ul><li>#cd /dspace </li></ul></ul><ul><ul><li>#tar -zxvf apache-tomcat-5.5.25.tar.gz [extract files] </li></ul></ul><ul><li>  Set the environment variable JAVA_OPTS=&quot;-Xmx512M -Xms64M -Dfile.encoding=UTF-8&quot; by doing the following </li></ul><ul><ul><li>#JAVA_OPTS=&quot;-Xmx512M -Xms64M -Dfile.encoding=UTF-8&quot; </li></ul></ul><ul><ul><li>#export JAVA_OPTS </li></ul></ul><ul><li>To make it permanent do the following: </li></ul><ul><ul><li># vi /etc/profile </li></ul></ul><ul><ul><li>and add the two line below towards the end of the file. </li></ul></ul><ul><ul><ul><li>JAVA_OPTS=&quot;-Xmx512M -Xms64M -Dfile.encoding=UTF-8&quot; </li></ul></ul></ul><ul><ul><ul><li>export JAVA_OPTS </li></ul></ul></ul><ul><ul><li>Save the file (type ESC :wq) </li></ul></ul>
  16. 16. Step 6: Installation of Apache Tomcat <ul><li># vi /dspace/apache-tomcat-5.5.25/conf/server.xml </li></ul><ul><ul><li>locate the following section </li></ul></ul><ul><ul><li><!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --> <Connector port=&quot;8080&quot; maxThreads=&quot;150&quot; minSpareThreads=&quot;25&quot; maxSpareThreads=&quot;75&quot; enableLookups=&quot;false&quot; redirectPort=&quot;8443&quot; acceptCount=&quot;100&quot; connectionTimeout=&quot;20000&quot; disableUploadTimeout=&quot;true&quot; /> </li></ul></ul><ul><li>            and add the line URIEncoding=&quot;UTF-8&quot; in this section like </li></ul><ul><ul><li>        <!-- Define a non-SSL HTTP/1.1 Connector on port 80 --> < Connector port=&quot;80&quot; maxThreads=&quot;150&quot; minSpareThreads=&quot;25&quot;     maxSpareThreads=&quot;75&quot; enableLookups=&quot;false&quot; redirectPort=&quot;8443&quot; acceptCount=&quot;100&quot; connectionTimeout=&quot;20000&quot; disableUploadTimeout=&quot;true&quot; URIEncoding=&quot;UTF-8&quot; /> </li></ul></ul><ul><ul><li>Save the file (press ESC :wq) </li></ul></ul>
  17. 17. Step 7: Installation of Dspace <ul><li>You have to login as Linux root user </li></ul><ul><li>Create the DSpace Linux user by using the commands </li></ul><ul><ul><li>#groupadd dspace [create group] </li></ul></ul><ul><ul><li>#useradd dspace –g dspace [ create dspace user] </li></ul></ul><ul><ul><li>#chown -R dspace.dspace /dspace/apache-tomcat-5.5.25 [ change the owner and group of tomcat directory to dspace, so as to run as dspace user </li></ul></ul><ul><li>#cd /dspace </li></ul><ul><li>#tar -zxvf dspace-source-1.4.2.tar.gz </li></ul><ul><ul><li>It creates a directory name like dspace-1.4.2-source </li></ul></ul><ul><li>Copy jdbc driver for postgresql to /dspace/dspace-1.4.2-source/lib directory. To do this perform the following: </li></ul><ul><ul><li>Copy a jdbc driver for postgresql i.e. postgresql-8.3-603.jdbc2.jar file to /dspace/dspace-1.4.2-source/lib </li></ul></ul><ul><ul><li>#cp /dspace/ postgresql-8.3-603.jdbc2.jarr /dspace/dspace-1.4.2-source/lib </li></ul></ul><ul><li>#chown -R dspace.dspace /dspace/dspace-1.4.2-source [ change the owner and group of dspace directory to dspace] </li></ul>
  18. 18. Step 7: Installation of Dspace contd.. <ul><li>#su -l dspace </li></ul><ul><li>$cd /dspace/dspace-1.4.2-source </li></ul><ul><li>Open the file /dspace/dspace-1.4.2-source/config/dspace.cfg and set the following properties </li></ul><ul><li>$vi /dspace/dspace-1.4.2-source/config/dspace.cfg </li></ul><ul><li>        dspace.url = [like http://192.168.3.203/dspace] </li></ul><ul><li>        dspace.hostname = [hotsname or IP address of server] </li></ul><ul><li>dspace.name =[ dspace name like name of your Institution eg. NISCAIR Digital Library] </li></ul><ul><li>        db.password = [the password you entered in the last step of postgesql installation] </li></ul><ul><li>        mail.server =[hostname or IP address of server ex. mail.niscair.res.in] </li></ul><ul><li>        mail.from.address = [email address] </li></ul><ul><li>        feedback.recipient =[email address] </li></ul><ul><li>        mail.admin = [email address of admin] </li></ul><ul><li>        alert.recipient =[email address (not essential but very useful!)] </li></ul><ul><li>Save the file </li></ul><ul><li>$cd /dspace/dspace-1.4.2-source </li></ul>
  19. 19. Step 7: Installation of Dspace contd.. <ul><li>Compile and install DSpace by doing the following </li></ul><ul><ul><li>$/dspace/apache-ant-1.7.0 /bin/ant fresh_install </li></ul></ul><ul><ul><li>$cp /dspace/dspace-1.4.2-source/build/*.war /dspace/apache-tomcat-5.5.25/webapps/dspace/ </li></ul></ul><ul><li>Define CLASSPATH for dspace classes by doing following </li></ul><ul><ul><li>$vi /dspace/dspace-1.4.2-source/bin/dsrun </li></ul></ul><ul><li>Append following lines at the end of file </li></ul><ul><ul><li>CLASSPATH=$CLASSPATH:/dspace/apache-tomcat-5.5.25/webapps/dspace/WEB-INF/classes </li></ul></ul><ul><ul><li>FULLPATH=$CLASSPATH:$jJARS:$DSPACEDIR/config </li></ul></ul><ul><li>Create an initial administrator account by the command </li></ul><ul><ul><li>$/dspace/dspace-1.4.2-source/bin/create-administrator </li></ul></ul><ul><ul><li>You need to provide some information like admin user name, email ID and so on </li></ul></ul>
  20. 20. Step 7: Installation of Dspace contd.. <ul><li>Start tomcat by the command </li></ul><ul><ul><li>$/dspace/apache-tomcat-5.5.25 /bin/startup.sh </li></ul></ul><ul><li>Point your browser to the URL: http://HOSTNAME_OR_IP_ADDRESS_OF_SERVER/dspace </li></ul><ul><li>Access admin UI by point your browser to the URL: http://HOSTNAME_OR_IP_ADDRESS_OF_SERVER/dspace/dspace-admin </li></ul><ul><li>eg. http://192.168.3.203/dspace </li></ul>
  21. 21. Installation of Dspace- Summary <ul><li>Dspace is based on open source technlogy </li></ul><ul><li>The installation process is some what complex for new users </li></ul><ul><li>The following components should properly work : </li></ul><ul><ul><li>Postgresql server </li></ul></ul><ul><ul><li>Jdbc driver for postgres server </li></ul></ul><ul><ul><li>Apache tomcat </li></ul></ul><ul><li>Initially there may be few errors related to above components if not properly installed </li></ul>
  22. 22. Cron jobs <ul><li>To perform certain task periodically we may use cron jobs by typing following command: </li></ul><ul><li># crontab -e </li></ul><ul><li># Send out subscription e-mails at 01:00 every day 0 1 * * * /dspace/bin/sub-daily </li></ul><ul><li># Run the media filter at 02:00 every day 0 2 * * * /dspace/bin/filter-media </li></ul><ul><li># Generate full-text index at 2.15 an 15 2 * * * /dspace/bin/index-all </li></ul><ul><li># Clean up the database nightly at 2.40am 40 2 * * * vacuumdb --analyze dspace > /dev/null 2>&1&quot; > /var/spool/cron/dspace </li></ul>* * * * * Minute 0-59 Hour 0-23 (0 = midnight) Day 1-31 Month 1-12 Weekday 0-6 (0 = Sunday) ‏
  23. 23. Starting apache tomcat on boot <ul><li>To make your repository start at the boot time adds the following to /etc/rc.d/rc.local </li></ul><ul><li>su –l dspace –c ‘ /dspace/apache-tomcat-5.5.25/bin/startup.sh </li></ul>
  24. 24. Trouble shooting.. <ul><li>Check your environment variable by giving the following commands </li></ul><ul><li>echo $PATH </li></ul><ul><li>echo $JAVA_HOME </li></ul><ul><li>See whether java’s bin directory is in your PATH </li></ul><ul><li>JAVA_HOME is pointing to Java directory </li></ul><ul><li>Change your /dspace/.bash_profile </li></ul>
  25. 25. Trouble shooting: while fresh_install <ul><li>Mostly you get database related errors, the cause could be </li></ul><ul><ul><li>You did not copy jdbc drivers in dspace-source/lib directory </li></ul></ul><ul><ul><li>Or changes in the postgresql .conf file were not made at all, or done improperly </li></ul></ul>
  26. 26. Trouble shooting: Once you launch DSpace <ul><li>If you do not see dspace on the screen </li></ul><ul><ul><li>Tomcat was not launched </li></ul></ul><ul><ul><li>Or the port (8080) was already in use </li></ul></ul><ul><ul><li>You started tomcat second time </li></ul></ul><ul><ul><li>Solution </li></ul></ul><ul><ul><li>Kill tomcat if you have started second time (using ps –a | grep java or killall java </li></ul></ul><ul><ul><li>Change to another port in tomcat/config/server.xml </li></ul></ul><ul><li>Check $TOMCAT-HOME/logs/catalina.out </li></ul><ul><li>For specific problem identification </li></ul>
  27. 27. Troubleshooting: Internal System Error <ul><li>Most common error message </li></ul><ul><li>To generic and is not specific </li></ul><ul><li>The reasons could be many </li></ul><ul><li>Check /dspace/log/dspace.log file, which may provide the specific problem </li></ul>
  28. 28. Trouble-shooting: Fails to sendmal <ul><li>Mail configuration is wrong </li></ul><ul><li>You did not make mail server entry in /dspace/conf/dspace.cfg file </li></ul><ul><li>DNS problem </li></ul><ul><li>You do not have FQDN (Fully Qualified Domain Name) for you system </li></ul><ul><ul><li>It should hostname.domainname </li></ul></ul><ul><ul><ul><li>Ex: localhost.localdomain (not just localhost) ‏ </li></ul></ul></ul><ul><ul><ul><li>nsdl.niscair.res.in ( not jst nsdl) ‏ </li></ul></ul></ul>
  29. 29. LOG FILES <ul><li>$TOMCAT_HOME/logs/catalina.out </li></ul><ul><li>/dspace/log/dspace.log </li></ul>
  30. 30. Thanks

×