Tuesday, April 27, 2010

DSpace Complete Repository



INTRODUCTIONS:
After I have finished working on ePrints I will try another lucky shot with the DSpace setup and lay out an awesome comparison as to which digital repository will have the better performance in the said applications.Well, both of the software are good with the promising features of their own ;yet, whichever systems offer excellent as of the moment would be my option.After a final evaluations of the two digital repositories , the next steps will be the implementations of the system live in the productions .

DSpace was a very popular digital repository software because it was deployed in the productions earlier than its counterparts (ePrints,FEZ) .Not just because of that reason but the impression of the fact the MIT reputations had when it comes to IT software research & developments (RD) ;no more questions are necessary to be asked ;Technology wise-I bowed my head to these guys.Well, what is essential is the applicability of the design not only to the robustness , flexibility and technos involved in it but somehow an appeal(user friendly) that a software must have to the client/s in the industry, nothing else- the user.


I have two tutorials in this blog which are all about DSpace repository installations;First, I am going to discuss the old Dspace version 1.4 .X : 50 MB down to its oldest archives which were released prior to this date- 2007-5-10 .These files had a different directories contained in its folder compared to the latest DSpace files,the directories were arranged into different packages for each respective functions. Secondly,the next explanation is installing DSpace version 1.5 to the latest stable release which had an ad-ons advantages as compared to the old packages.One for example is the additional maven to tomcat ant, which will be used in documentations and customizations.The other add ons is the java dbc jar driver, these will not require installer to put *.jar files of java into DSpace , because the latter has now a built in *.jar during installation process.So now I have contemplated someting a little bit treaky about the DSpace installations as long as it is getting OK then it is getting harder .You like it?

Well, let us install the oldies first.

DSpace Requirements:
Apache
Apache-Tomacat-Ant
Java 5 SDK
Apache-Tomcat
PostGreSql
DSpace

METHODOLOGY:

Add paths to /etc/profile: nano /etc/profileand add the following:

M2_HOME=/usr/local/apache-maven/
export M2_HOME
PATH=${PATH}:${M2}/bin

MAVEN_OPTS="-Xms256m -Xmx512m"
export MAVEN_OPTS

ANT_HOME=/usr/local/apache-ant
export ANT_HOME
PATH=${PATH}:${ANT_HOME}/bin

JAVA_HOME=/usr/local/java/
export JAVA_HOME
PATH=${PATH}:${JAVA_HOME}/bin

export PATH


Installing complete software package for DSpace(Linux)

1. Install Java 1.4 or later (standard SDK is fine, you don't need J2EE)
  • This step is required only if java is NOT already installed in the system
  • Download the RPM versions of java (e.g. j2sdk-1_4_2_04-linux-i586.rpm) and copy the file into Linux system.
  • You need to login as Linux root user to install
  • Use the command bellow to install
    • #rpm -ivh j2sdk-1_4_2_04-linux-i586.rpm
    • #rm /usr/bin/java [remove the original java binary if any]
    • #cd /usr/bin
    • #ln -s /usr/java/j2sdk1.4.2_04/bin/java java [create Symbolic link to newly installed java if any]
  • Define java home PATH by the commands:
    • #JAVA_HOME=/usr/java/j2sdk1.4.2_04 [ java gets installed in /usr directory]
    • #export JAVA_HOME
  • To set the environment variable JAVA_HOME permanently (get set at the time of system boot) do the following
    • Open the file /etc/profile
    • Add the two lines bellow at the end of the file.
JAVA_HOME=/usr/java/j2sdk1.4.2_04
export JAVA_HOME
  • Save the file, this will set the variable JAVA_HOME when system boots

2. Apache-ant installation
  • Check apache ant is already installed or not using the command: #which ant
  • You need to login as Linux root user
  • If not installed copy the file apache-ant-1.6.5-bin.tar.gz or apache-ant-1.6.5-bin.tar.bz2 to /usr/local directory
  • Use the following commands to install
    • #cd /usr/local
    • #gunzip apache-ant-1.6.5-bin.tar.gz or #bunzip2 apache-ant-1.6.5-bin.tar.bz2 (uncompress the file)
    • #tar -xvf apache-ant-1.6.5-bin.tar (extract files)
    • #mv apache-ant-1.6.5 apache-ant (rename the directory)
  • Define a path to the apache ant binary by the commands
    • #PATH=$PATH:/usr/local/apache-ant/bin
    • #export PATH
  • To add apache-ant path in PATH variable permanent do the following
    • Open the file /etc/profile and add the two line below towards the end of the file.
    • PATH=$PATH:/usr/local/apache-ant/bin
    • export PATH
  • Save the file


3. Installation of Apache Maven (Optional but recommended)
Explanations : Maven is a extended toolkit of Ant and is used for documentations and downloading
  • You have to become root user to do the following
  • Download the file like apache-maven-5.0.28.tar.gz and copy to /usr/local directory
  • Do the following
    • #cd /usr/local
    • #tar -xvf apache-maven-5.0.28.tar [extract files]
    • #mv apache-maven-5.0.28 tomcat [ rename the directory to smaller name]
  • Set the environment variable MAVEN_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8" by doing the following
    • #MAVEN_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8"
    • #export MAVEN_OPTS
  • To make it permanent do the following
    • Open the file /etc/profile and add the two line below towards the end of the file.
    • MAVEN_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8"
    • export MAVEN_OPTS



4. PostgreSQL installation
Installation From Source
  • You need to become Linux root user to install postgres
  • Download postgresql-8.4.4.tar.gz (or other versions of postgresql) file and copy to a directory where sufficient space available in your Linux system.
http://wwwmaster.postgresql.org/download/mirrors-ftp/source/v8.4.4/postgresql-8.4.4.tar.gz
  • Use the following commands to install
    • #bunzip2 postgresql-8.4.4.tar.bz2 or #gunzip postgresql-8.4.4.tar.gz (uncompress the file)
    • #tar -zxvf postgresql-8.4.4.tar (extract files)
    • #cd postgresql-8.4.4
    • #./configure --prefix=/usr/local/pgsql --enable-multibyte --enable-unicode --with-java
    • #make
    • #make install
    • /usr/sbin/adduser postgres [ create postgres user]
    • #cd /usr/local/pgsql
    • #mkdir /usr/local/pgsql/data
    • #chown -R postgres /usr/local/pgsql/data
    • #su - postrgres
  • Start posgres by doing the following
    • $/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
    • $/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start
  • If you using postgresql version 7.x then do the following
    • open the file /usr/local/pgsql/data/postgres.conf
    • look for the line with text #tcpip_socket = false
    • make it tcpip_socket = true and remove the comment
    • Save the file
  • For 8.0+, in /usr/local/pgsql/data/postgresql.conf uncomment the line starting:
  • listen_addresses = 'localhost'
  • Open the file /usr/local/pgsql/data/pg_hba.conf and add a line host dspace dspace 127.0.0.1 255.255.255.255 md5
    in the section # IPv4-style local connections:
  • Create a dspace database, owned by the dspace PostgreSQL user by doing the following
    • $/usr/local/pgsql/bin/createuser -U postgres -d -A -P dspace [Enter a password for the DSpace database]
    • $/usr/local/pgsql/bin/createdb -U dspace -E UNICODE dspace

5. Installation of Jakarta Tomcat
  • You have to become root user to do the following
  • Download the file like jakarta-tomcat-5.0.28.tar.gz and copy to /usr/local directory
  • Do the following
    • #cd /usr/local
    • #gunzip jakarta-tomcat-5.0.28.tar.gz [ uncompress]
    • #tar -xvf jakarta-tomcat-5.0.28.tar [extract files]
    • #mv jakarta-tomcat-5.0.28 tomcat [ rename the directory to smaller name]
  • Set the environment variable JAVA_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8" by doing the following
    • #JAVA_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8"
    • #export JAVA_OPTS
  • To make it permanent do the following
    • Open the file /etc/profile and add the two line below towards the end of the file.
    • JAVA_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8"
    • export JAVA_OPTS
  • Open the file /usr/local/tomcat/config/server.xml and do the following
    • locate the following section
and add the line URIEncoding="UTF-8" in this section like
URIEncoding="UTF-8" />

  • #chown -R dspace.dspace /usr/local/tomcat [ change the owner and group of tomcat directory to dspace, so as to run as dspace user
  • Save the file


  • 6. Installation of Dspace
    • You have to login as Linux root user
    • Create the DSpace Linux user by using the commands
      • #/usr/sbin/groupadd dspace [create group]
      • #/usr/sbin/useradd -g dspace dspace [ create dspace user]
    • Download the latest Dspace (dspace-source-1.x.tar.gz) file and copy the file to / directory
    • Do the following
      • #cd /
      • #gunzip dspace-source-1.3.2.tar.gz
      • #tar -xvf dspace-source-1.3.2.tar
    • It creates a directory name like dspace-1.3.2-source
    • Do the following
      • #mv dspace-1.3.2-source dspace [rename the long name dspace]
      • #cp /usr/local/pgsql/share/java/postgresql.jar /dspace/lib [ copy postgres jdbc driver to dspace/lib directory]
      • #chown -R dspace.dspace dspace [ change the owner and group of dspace directory to dspace]
      • #su -l dspace
      • $cd /dspace
    • Open the file /dspace/config/dspace.cfg and set the following properties
    dspace.url = [like http://144.16.72.131/dspace]
    dspace.hostname = [hotsname or IP address of server]
    dspace.name =[ dspace name like name of your Institution]
    db.password = [the password you entered in the last step of postgesql installation]
    mail.server =[hostname or IP address of server]
    mail.from.address = [email address]
    feedback.recipient =[email address]
    mail.admin = [email address of admin]
    alert.recipient =[email address (not essential but very useful!)]
    • Save the file
    • Compile and install DSpace by doing the following
      • $ant fresh_install
      • $cp /dspace/build/*.war /usr/local/tomcat/webapps
    • Create an initial administrator account by the command
      $/dspace/bin/create-administrator
      You need to provide some information like admin user name, email ID and so on 
    • Start tomcat by the command
      • $/usr/local/tomcat/bin/startup.sh
    • Point your browser to the URL: http://HOSTNAME_OR_IP_ADDRESS_OF_SERVER:8080/dspace
    • Access admin UI by point your browser to the URL: http://HOSTNAME_OR_IP_ADDRESS_OF_SERVER:8080/dspace/dspace-admin
    How about the errors?
    >BUILD FAILED
    > /usr/local/dspace-1.3.1-source/build.xml:266: Java returned: 1
    Please try to download postgresql-8.03.jdbc.jar from http://www.postgresql.com then copy it as /usr/local/dspace/lib/postgresql.jar

    [echo] ====================================================================
    [echo] The DSpace code has been installed, and the database initialized.
    [echo]
    [echo] To complete installation, you should do the following:
    [echo]
    [echo] * Install the DSpace UI (dspace.war) and OAI-PMH (dspace-oai.war)
    [echo] Web applications from the 'build' directory in the appropriate
    [echo] place for your servlet container. e.g. '/opt/tomcat/webapps'
    [echo]
    [echo] * Make an initial administrator account (an e-person) in DSpace:
    [echo]
    [echo] /usr/local/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://dspace.mainlib.upd.edu.ph:8080/dspace
    [echo]
    [echo] You should also be able to access the administrator UI:
    [echo]
    [echo] http://dspace.mainlib.upd.edu.ph:8080/dspace/dspace-admin
    [echo] ====================================================================
    [echo]

    BUILD SUCCESSFUL
    Total time: 31 seconds



    Detail(1): Data Center online DSpace


    Detail(2) : DSpace login /e-mail: registrations


    Detail(3): DSpace Administrator's Page


    Detail(4): DSpace e-mail/account confirmations


    Detail(5): Uploading /submitting files in DSpace Repository


    Detail(6) Uploaded data in the DSpace repository


    Detail(7) Search ->Title in the Depository( "Canon iRJ")


    REMARKS:


    CONCLUSIONS:

    1 comment:

    1. I am convinced now that becuase of rivalry in Digital online Library, librarian have a greater oppurtunity and options to choose what system to use either ePrints or DSpace.

      Well,the best one is to try it.

      And let see.

      Thanks

      E^3

      ReplyDelete