DSpace Installation (Manual) in Redhat Linux

ເດືອນກໍລະກົດ 22, 2008

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. PostgreSQL installation

Installation From Source

  • You need to become Linux root user to install postgres
  • Download postgresql-8.0.3.tar.bz2 (or other versions of postgresql) file and copy to a directory where sufficient space available in your Linux system.
  • Use the following commands to install
    • #bunzip2 postgresql-8.0.3.tar.bz2 or  #gunzip postgresql-8.0.3.tar.gz (uncompress the file)
    • #tar -xvf postgresql-8.0.3.tar (extract files)
    • #cd postgresql-8.0.3
    • #./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

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

    <!– Define a non-SSL HTTP/1.1 Connector on port 8080 –> <Connector port=”8080″ maxThreads=”150″ minSpareThreads=”25″ maxSpareThreads=”75″ enableLookups=”false” redirectPort=”8443″ acceptCount=”100″ connectionTimeout=”20000″ disableUploadTimeout=”true” />

and add the line URIEncoding=”UTF-8″ in this section like

<!– Define a non-SSL HTTP/1.1 Connector on port 8080 –> <Connector port=”8080″ maxThreads=”150″ minSpareThreads=”25″     maxSpareThreads=”75″ enableLookups=”false” redirectPort=”8443″ acceptCount=”100″ connectionTimeout=”20000″ disableUploadTimeout=”true” 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

  • 5. 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%5D

    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!)]


    DSpace Installation on Windows

    ເດືອນກໍລະກົດ 22, 2008

    S/W requirements

    We have tested the software on Windows XP, Windows 2000 Professional and Windows 2003 server

    • Windows OS (Windows XP/Windows 2000 professional/Windows 2000 Server/Windows 2003 Server)

    Following other packages to run on Windows platform

    Installation of Java (JDK):

    1. Download Java 1.4 or later (standard SDK is fine, you don’t need J2EE).

    Note: Apache-tomcat-5.5.17 works with jdk-1_5.x+

    2. Double click the file jdk-1_5_0_06-windows-i586-p.exe and follow the instructions

    Select the folder to install jdk

    3. Put the java program into system path by setting PATH environment variable.

    Right click My Computer->Properties->Advance->Environment Variables->System Variables->path->Edit

    Add the text “Program Files\java\jdk1.5.0_06\bin and press Ok.

    4. Define JAVA_HOME environment variable.

    Right click My Computer->Properties->Advance->Environment Variables->System Variables->path->New

    Set the environment variable as above. Click Ok to save it.

    Installation of apache-ant

    This package is needed to compile Dspace source

    1. Download the zip file of the windows version of Apache-Ant (apache-ant-1.6.2-bin.zip)

    2. Extract into a folder like C drive.

    3. It creates a folder apache-ant-1.6.2. Rename it as ant

    4. Add C:\ant\bin into PATH environment variable.

    5. Right click My Computer->Properties->Advance->Environment Variables->System Variables->path->Edit

    Click Ok to save it

    Installation of Postgres database server

    Note: Make sure your C or any other drive where Postgres is to be installed is formatted as NTFS file system.

    If not use the command below to convert it to NTFS. At command prompt type the command:

    convert c: /FS:NTFS

    and press enter. It will ask to schedule it at next booting time. Enter yes and reboot the system.

    When you boot the system it will convert the FAT32 file system to NTFS.

    It takes some time to do it. Now system is ready to install Postgres database server.

    Steps

    1. Download the file postgresql-8.1.3-1.zip or any other version of Postgres database software for Windows.
    2. Extract it to any directory like C:\pgsql.
    3. Double click the file postgresql-8.1.exe from the extracted folder (C:\pgsql) (Windows installer package)

    and follow the instructions.

    Click Start

    Click Next

    Click Next

    Select the location (select default location) and click Next

    Set the password for a account postgres to run PostgreSQL database server.

    If this account does not exist in the Windows, then will be prompted to create it. Say yes to create account.

    Select the default option and click Next

    Select default option and click Next

    Complete the installation by clicking Finish.

    Create dspace user and dspace database in PostgreSQL database server

    1. Start->Run and type the command cmd to go to command prompt
    2. Type the following commands
    3. cd C:\Program Files\PostgreSQL\8.1\bin
    4. createuser -U postgres -d -A -P dspace

    Enter password for new role: (Enter dspace database user password)

    Enter it again: (confirm it)

    Shall the new role be allowed to create more new roles? (y/n): ( Enter yes)

    1. createdb -U dspace -E UNICODE dspace

    Password: (Enter dspace password)

    Installation of Jakarta Tomcat

    1. Download the file apache-tomcat-5.5.17.exe (or apache-tomcat-5.5.17+)
    2. Double click the file apache-tomcat-5.5.17.exe and follow the instructions

    Choose the port 8080 and admin password

    Locate the JRE path if not detected by default

    Installation of Dspace

    1. Download Dspace source and extract into a directory like C:\Dspace (Rename to Dspace)
    2. Copy the PostgreSQL JDBC driver C:\Program Files\PostgreSQL\8.1\jdbc\postgresql-8.1-404.jdbc3.jar

    to C:\Dspace\lib folder

    1. Open the file C:\Dspace\config\dspace.cfg and make changes

    dspace.dir = C:/dspace

    dspace.url = http://IP_No_of_Machine or hostname/:8080/dspace

    dspace.hostname = hostname or IP No of M/C

    dspace.name = DSpace repository name (like IR@youruniversity)

    config.template.log4j.properties = c:/dspace/config/log4j.properties

    config.template.log4j-handle-plugin.properties = c:/dspace/config/log4j-handle-plugin.properties

    config.template.oaicat.properties = c:/dspace/config/oaicat.properties

    mail.server=host or IP no of your server

    mail.from.address = dspace-noreply@your_email_ID

    1. Go to command prompt (Start->Run then type cmd)
    2. ant fresh_install
    3. Create Initial Administrator Account
    4. You need to download two files (dsrun.bat, buildpath.bat) from the sites http://wiki.dspace.org/DSpaceOnWindows?action=AttachFile&amp;do=get&amp;target=dsrun.bat and http://wiki.dspace.org/DSpaceOnWindows?action=AttachFile&amp;do=get&amp;target=buildpath.bat
    5. Copy these two files in C:\Dspace\bin and run the command
    6. dsrun org.dspace.administer.CreateAdministrator
    7. Supply the password
    8. Copy the files dspace.war and dspace-oai.war from the folder C:\Dspace\build to

    C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps folder

    1. Restart tomcat (Start->Programs->Apache Tomcat 5.5->Monitor Tomcat->Restart)
    2. Open browser and browse the URL http://IP_No_of_Machine:8080/dspace

    The default home page of Dspace looks like below: