الجمعة، 4 يناير 2013

DSpace Installation on Ubuntu 12.04

This installation steps will let you have the working DSpace on your system, but it has not discussion about the full details of configuration and customization of DSpace , if you want to have more information, you can go to the DSpace Documentation
Here we will be discussing Simple Installation only:
Prerequisite Packages Installation:
For Java packages installation on Ubuntu 12.04, See installation sun-java6-jdk 
Afterwards make it available system wide:
update-java-alternatives -v -s java-6-sun
The screen output should be something like the following.
resetting java alternatives
update-alternatives: using /usr/bin/gij-4.4 to provide /usr/bin/java (java) in auto mode.
update-alternatives: using /usr/bin/gkeytool-4.4 to provide /usr/bin/keytool (keytool) 
in auto mode.
update-alternatives: error: no alternatives for mozilla-javaplugin.so.
update-alternatives: using /usr/bin/gorbd-4.4 to provide /usr/bin/orbd (orbd) in auto mode.
update-alternatives: using /usr/bin/grmid-4.4 to provide /usr/bin/rmid (rmid) in auto mode.
update-alternatives: using /usr/bin/grmiregistry-4.4 to provide /usr/bin/rmiregistry (rmiregistry) 
in auto mode.
update-alternatives: error: no alternatives for xulrunner-1.9-javaplugin.so.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/java to provide /usr/bin/java (java) 
in manual mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/keytool to provide /usr/bin/keytool 
(keytool) in manual mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/orbd to provide /usr/bin/orbd (orbd) 
in manual mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/rmid to provide /usr/bin/rmid (rmid) 
in manual mode.
update-alternatives: using /usr/lib/jvm/java-6-sun/jre/bin/rmiregistry to provide /usr/bin/rmiregistry 
(rmiregistry) in manual mode.
update-alternatives: error: no alternatives for mozilla-javaplugin.so.
update-alternatives: error: no alternatives for xulrunner-1.9-javaplugin.so.
Note. Do not worry about error messages as long as the main "java" link is ok.
Check the alternative by typing as follows:
update-java-alternatives -l
You should get the following
java-6-sun 63 /usr/lib/jvm/java-6-sun
Other Required Packages:
Type follow:
Install Java Ant Compiler & Maven Java Installer
sudo apt-get install ant ant-optional maven2 
Setup Tomcat Java Webapp Server
sudo apt-get install tomcat6
Installing PostgreSQL
Dspace uses the PostgreSQL database server for  catalog database.
sudo apt-get install postgresql libpg-java
Start Configuring....
Edit /etc/default/tomcat6 and add below line at top
TOMCAT6_SECURITY=no
Edit /etc/postgresql/9.1/main/pg_hba.conf
change the METHOD "peer"  to be "trust"
Create PostgreSQL 'dspace' user  & database 
sudo -u postgres psql "-c CREATE USER dspace WITH PASSWORD 'dspace' CREATEDB;"
Create PostgreSQL 'dspace' database
createdb -U dspace -E UNICODE dspace
exit
Configure Tomcat for DSpace Webapp
sudo vi /etc/tomcat6/server.xml
#Insert the following lines just above the closing </Host>:
<!-- Define a new context path for all DSpace web apps -->
<Context path="/xmlui" docBase="/usr/local/dspace/webapps/xmlui" allowLinking="true"/>
<Context path="/sword" docBase="/usr/local/dspace/webapps/sword" allowLinking="true"/>
<Context path="/oai"   docBase="/usr/local/dspace/webapps/oai"   allowLinking="true"/>
<Context path="/jspui" docBase="/usr/local/dspace/webapps/jspui" allowLinking="true"/>
<Context path="/lni"   docBase="/usr/local/dspace/webapps/lni"   allowLinking="true"/>
<Context path="/solr"  docBase="/usrl/local/dspace/webapps/solr"  allowLinking="true"/>
Download and Install DSpace
Create a Directory & Download DSpace package
sudo mkdir /usr/local/dspace
cd /usr/local/dspace
wget http://sourceforge.net/projects/dspace/files/DSpace%20Stable/1.8.2/dspace-1.8.2-src-release.tar.gz/download
Unpack the package
sudo tar -xvzf  dspace-1.8.2-src-release.tar.gz
sudo chown tomcat6.dspace -R /usr/local/dspace
sudo chmod 0775 /usr/local/dspace
Edit the DSpace Configuration
sudo gedit dspace-1.8.2-src-release/dspace/config/dspace.cfgi
Change the value according to your settings:
eg
dspace.dir = /usr/local/dspace
dspace.name = Demo DSpace 
db.driver = org.postgresql.Driver
db.username = dspace
db.password = dspace
Maven Package Installation
cd /usr/local/dspace/dspace-1.8.2-src-release
sudo mvn -U package
[INFO].....................................

[INFO] BUILD SUCCESSFUL
Comple DSpace Java Webapp
cd /usr/local/dspace/dspace-1.8.2-src-release/dspace/target/dspace-1.8.2-build
sudo ant fresh_install 
[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: /usr/local/dspace/webapps/
     [echo] 
     [echo]    OR, copy any web applications from /usr/local/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]    /usr/local/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: 1 minute 7 seconds
Create  DSpace Admin User
sudo /usr/local/dspace/bin/create-administrator -e dspace -f DSpace -l User -c en -p dspace
Now Login through Browser:
Admin Page:http://localhost:8080/jspui/dspace-admin {email : dspace & password : dspace}
User page: http://localhost:8080/jspui 
OR
Instead of going for all steps, run this script

ليست هناك تعليقات:

إرسال تعليق