Rafiqur Rahman Assistant Librarian (Electronic Resources) East West University, 43 Mohakhali, Dhaka-1212, Bangladesh This guide assumes that you have minimal experiences and understanding with linux system administration for executing the necessary steps to reach the predefined goals. 1. First install software dependencies as follows: apt-get install sun-java6-jdk OR apt-get install openjdk-6-jre apt-get install openjdk-6-jre-lib apt-get install openjdk-6-jdk -------------apt-get install apache2 (if you don't have previous installation) apt-get install tomcat6 apt-get install maven2 (Ant is bundled with this package. No need to install separately) apt-get install postgresql 2. To avoid Java runtime misconfiguration, you have to do this update-alternatives --config java Then select the selection number that says: /usr/lib/jvm/java-6-openjdk/jre/bin/java 1061 manual mode (for open jdk , option 2) /usr/lib/jvm/java-6-sun/jre/bin/java 63 manual mode (for Sunjava jdk, option 2) 3. Go to the following link location & download the latest src release of dspace http://sourceforge.net/projects/dspace/ You can use wget command with its actual location for downloading your desired version 4. Unpack the package. tar zxvf dspace-1.8.0-src-release.tar.gz 5. Create Linux user account for Dspace useradd -m dspace (-m option creates user home directory) This step depends upon your accessibility & privileges to the system

6. Change ownership of newly unpacked directory chown -R dspace:adm dspace-1.8.0-src-release This step depends on step 5 7. The next step involves Postgresql. It requires you to change the file system permission setting to trust localhost connections you do this by editing the pg_hba.conf file. gedit /etc/postgresql/8.4/main/pg_hba.conf When you open the file, scroll down to the last portion where you will see the following entries # Database administrative login by UNIX sockets #local all postgres ident >>>>>> comment this line and add line below local all postgres trust # TYPE DATABASE USER CIDR-ADDRESS METHOD # “local” is for Unix domain socket connections only #local all all ident >>>>>> comment this line and add line below local all all trust 8. Restart Postgresql to use the modified configuration /etc/init.d/postgresql restart 9. Create Postgresql user account for DSpace createuser -U postgres -d -A -P dspace createdb -U dspace -E UNICODE dspace key-in dspace when prompted for password and when asked to confirm password key-in y when prompted to take action on role 10. Change directory to the initial configuration files repository cd dspace-1.8.0-src-release/dspace/config/ gedit dspace.cfg particularly the following parameters: # DSpace host name dspace.hostname = dspace.your-domain-name.edu # DSpace base host URL dspace.baseUrl = http://dspace.your-domain.edu:8080 or http://ip_address:8080 NOTE – It is extremely important that you enter the correct information otherwise Dspace will not work – If hostname is used, then an entry on your DNS server is a must. In BIND for example dspace.xxxxxx.edu. IN A x.x.x.x # Name of the site dspace.name — Dspace for AIIAS Hardinge Library # Database name (“oracle”, or “postgres”) #db.name = ${default.db.name} >>>>>>comment this entry

db.name = postgres >>>>>>uncomment this #db.name = oracle # URL for connecting to database #db.url = ${default.db.url} >>>>>>comment this db.url = jdbc:postgresql://localhost:5432/dspace >>>>>> uncomment this # JDBC Driver #db.driver = ${default.db.driver} >>>>>> comment this db.driver = org.postgresql.Driver >>>>>> uncomment this # Database username and password #db.username = ${default.db.username} \__ comment these #db.password = ${default.db.password} / db.username = dspace \__ uncomment these db.password = dspace / # SMTP mail server mail.server = smtp.your-domain.edu # From address for mail mail.from.address = dspace-noreply@your-domain.edu # Currently limited to one recipient! feedback.recipient = dspace-help@your-domain.edu # General site administration (Webmaster) e-mail mail.admin = dspace-help@your-domain.edu 11. Change directory to /var then create dspace directory and chown directory ownership cd /var mkdir dspace chown dspace dspace 12. Build the Maven package cd dspace-1.8.0-src-release/dspace mvn package it will start downloading a lot of jar and pom files… until you see something like this:
[INFO] Copying files to /home/rafiq/dspace-1.8.0-src-release/dspace/target/dspace-1.8.0-build [INFO] [INFO] [INFO] -----------------------------------------------------------------------[INFO] Reactor Summary: [INFO] -----------------------------------------------------------------------[INFO] DSpace Addon Modules .................................. SUCCESS [6:13.698s] [INFO] DSpace XML-UI (Manakin) :: Web Application ............ SUCCESS [18:23.730s] [INFO] DSpace LNI :: Web Application ......................... SUCCESS [58.337s] [INFO] DSpace OAI :: Web Application ......................... SUCCESS [18.432s] [INFO] DSpace JSP-UI :: Web Application ...................... SUCCESS [59.002s]

[INFO] DSpace SWORD :: Web Application ....................... SUCCESS [5.667s] [INFO] DSpace SWORDv2 :: Web Application ..................... SUCCESS [2:39.825s] [INFO] DSpace SOLR :: Web Application ........................ SUCCESS [3:40.907s] [INFO] DSpace Assembly and Configuration ..................... SUCCESS [2:50.369s] [INFO] -----------------------------------------------------------------------[INFO] -----------------------------------------------------------------------[INFO] BUILD SUCCESSFUL [INFO] -----------------------------------------------------------------------[INFO] Total time: 36 minutes 14 seconds [INFO] Finished at: Wed Nov 16 15:17:21 EST 2011 [INFO] Final Memory: 56M/68M ------------------------------------------------------------------------

13. Change directory to Dspace source directory and run ant cd dspace-1.8.0-src-release/dspace/target/dspace-1.8.0-build ant fresh_install this will start a process, connecting database and updating a lot of files. Until you will see something like this:
[echo] [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: /dspace/webapps/ [echo] [echo] OR, copy any web applications from /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] /dspace/bin/dspace 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://localhost:8080/xmlui [echo] [echo] You should also be able to access the administrator UI: [echo] [echo] http://localhost:8080/xmlui/dspace-admin [echo] ==================================================================== [echo] BUILD SUCCESSFUL

Total time: 17 minutes 33 seconds

14. For your own sanity’s sake, instead of tweaking Tomcat as suggested by the installer, copy instead the DSpace webapps directory content to the Tomcat webapps directory. cp -R /dspace/webapps/* /var/lib/tomcat6/webapps/ 15. Create the initial administrator account. cd bin chmod 775 dspace ./dspace create-administrator Creating an initial administrator account E-mail address: xxxxxxx@xxxxx.edu First name: xxxxxxx Last name: xxxxxxx WARNING: Password will appear on-screen. Password: your_password Again to confirm: your_password Is the above data correct? (y or n): y Administrator account created 16. Check if Tomcat is running. Launch your favorite web browser and go to cp http://dspace_server_address:8080 A webpage should say something like IT WORKS 17. Access your Dspace home page at http://dspace_server_address:8080/jspui or access the administrator at http://dspace_server_address:8080/jspui/dspace-admin

Reference: http://ftanada.wordpress.com/2011/04/07/install-dspace-in-debian-6-0-squeeze/

Sign up to vote on this title
UsefulNot useful