DSpace Backup

Leave a comment

Stop tomcat server:

/etc/init.d/tomcat6  AND restart postgresql server

Lonin in postgress database server and take backup dspace database-

Pg_dump –E UNICODE dspace>/home/dspace/dspace.sql

Copy dspace assetstore directory in your desired place

Cp /home/dspace/assetstore/* /desiredLocation/

Compress assetstore

tar cf- assetstore | gzip –c >assetstore.tgz

Copy database file and assetstore to your computer

Scp /home/dspace/dspace.sql root@remotemachine:/root/yourlocation/dspace.sql

Scp /home/dspace/assetstore.tgz root@remotemachine:/root/yourLocation/


Open Source OCR Tesseract installation on Ubuntu and use of it

Leave a comment

First of all you must have command line expertise to use this open source OCR software

At the beginning we are going to install Tesseract on Ubuntu

Open your terminal and write the following command

root@nur-HP:~#apt-get install tesseract-ocr

It will install OCR on your Ubuntu Operating System. Then install your desire language packages. Remember you do not to install English language package because it already installed with tesseract installation.

Here, I going to install Bangla language package

apt-get install tesseract-ocr-[lang]

root@nur-HP:~#apt-get install tesseract-ocr-ben    (This command will install Bangla language package)

If you like to install All language packages, try the following command

root@nur-HP:~#apt-get install tesseract-ocr-all

Our installation has completed. Now we are going to use it

tesseract [image_path] [file_name]

sample command:

root@nur-HP:~#tesseract /home/nurahammad/Dropbox/ForOCR/IMG_20171201_161244.jpg /home/nurahammad/Desktop/test

If you like to see the result on terminal, try below command

tesseract [image_path] stdout

root@nur-HP:~# tesseract /home/nurahammad/Dropbox/ForOCR/IMG_20171201_161244.jpg stdout

I think it will help you for processing your Repository/Digital Library files


DSpace Manual for BALID Trainee


Training on DSpace Institutional Repository Organized by BALID Institute of Information Management (BIIM)

1-2 May 2014



DSpace Installation on Debian

 Add root password and create dspace as a user and enter password for dspace at the time of Debian installation. While installing Debian, select Desktop Environment, SQL database, SSH server & Standard System options.

 First create a dspace user in debian for Dspace, if you did not add at the time of Debian installation.

root@dir:~#adduser dspace

Add source list

root@localhost:~#nano /etc/apt/sources.list

Comment or erase all and add the followings:

deb http://security.debian.org/ squeeze/updates main contrib

deb-src http://security.debian.org/ squeeze/updates main contrib non-free

deb http://http.us.debian.org/debian/ squeeze contrib non-free main

deb-src http://http.us.debian.org/debian/ squeeze contrib non-free main


Upgrade the Software.

root@localhost:~#sudo apt-get update

root@localhost:~#sudo apt-get dist-upgrade

Then install other softwares as prerequisites for Dspace installation. It is a good approach to install sun-java6-jdk.

root@dir:~# apt-get install sun-java6-jdk

root@dir:~# apt-get install tomcat6

root@dir:~#apt-get install maven2

root@dir:~#apt-get install postgresql-8.4


(In training we are skipping the above four packages installation. We are going to install the above five packages with one command from CD.  In Training kits, we provide a CD which has all pre-requisites of Dspace installation in .deb file extension. You can install all .deb packages with one command. )

First in enter in the directory which contain .deb files

 root@localhost:~#cd /media/cdrom/ dspacepackages/

root@localhost:/media/cdrom/dspacepackages# dpkg -i *.deb


After installing prerequisite softwares, create dspace database in postgresql for Dspace.


root@dir:~# cd /home/dspace/

root@dir:/home/dspace# su postgres

postgres@dir:/home/dspace$ createuser -U postgres -d -A -P dspace

Enter password for new role:

Enter it again:

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

postgres@dir:/home/dspace$ exit


root@dir:/home/dspace# su dspace

dspace@dir:~$ createdb -U dspace -E UNICODE dspace



Set Up Environment Variables:

root@dir:/home/dspace#sh -c ‘echo export PATH=$PATH:\”/usr/lib/jvm/java-6-sun/bin\” >> /etc/profile’

root@dir:/home/dspace# sh -c ‘echo export JAVA_HOME=\”/usr/lib/jvm/java-6-sun\” >> /etc/profile’

root@dir:/home/dspace# sh -c ‘echo export JRE_HOME=\”/usr/lib/jvm/java-6-sun/jre\” >> /etc/profile’


After that download the latest version of Dspace

root@dir:/home/dspace# wget http://skylink.dl.sourceforge.net/project/dspace/DSpace%20Stable/4.1/dspace-4.1-src-release.tar.gz


Untar the downloaded dspace

root@dir:/home/dspace#tar –zxvf dspace-4.1-src-release.tar.gz


We have dspace in training CD. We are not going to download it

root@dir:/home/dspace#tar –zxvf /media/cdrom/dspace-4.1-src-release.tar.gz


Set right configuration

root@dspace:/home/dspace# cd dspace-4.1-src-release/

root@dir:dapace-src-release#nano dspace/config/dspace.cfg


Thereafter build Dspace by running the following command

root@dir:/home/dspace/dspace-src-release#cd dspace

root@dir:/home/dspace/dspace-src-release/dspace# mvn package


[INFO] Scanning for projects…

Downloading: http://repo1.maven.org/maven2/org/dspace/dspace-pom/10/dspace-pom-10.pom

[WARNING] Unable to get resource ‘org.dspace:dspace-pom:pom:10’ from repository central

(http://repo1.maven.org/maven2): Error transferring file: repo1.maven.org

[INFO] ————————————————————————


[INFO] ————————————————————————

[INFO] Error building POM (may not be this project’s POM).

Project ID: org.dspace:dspace-parent:pom:1.8.2

Reason: Cannot find parent: org.dspace:dspace-pom for project: org.dspace:dspace

for project org.dspace:dspace-parent:pom:1.8.2


[INFO] ————————————————————————

[INFO] Trace

org.apache.maven.reactor.MavenExecutionException: Cannot find parent: org.dspace

If you have problem in your Internet connectivity, you will get the above messages. These messages

also can get, if you have proxy in your Internet connectivity. To solve this problem, set proxy in you

maven configuration file.


root@dir:/home/dspace/dspace-src-release/dspace#nano /etc/maven2/settings.xml


Uncomment and set you proxy in the following section-














root@dir:/home/dspace/dspace-src-release/dspace# mvn package

root@dir:/home/dspace/dspace-src-release/dspace# cd target/dspace-4.1-build/

root@dir:/home/dspace/dspace-src-release/dspace/target/dspace-4.1-buildr# ant fresh_install


To complete installation, you should do the following:

Setup your Web servlet container (e.g. Tomcat) to look for your DSpace web applications in:



copy any web applications from /home/dspace/webapps/ to the appropriate place for your servlet

container. (e.g. ‘$CATALINA_HOME/webapps’ for Tomcat)


root@dir:/home/dspace/dspace-src-release/dspace#cp -r /dspace/webapps/* /var/lib/tomcat6/webapps/



Create Dsapce administrator by using the command

root@dir:/home/dspace/dspace-src-release/dspace# /home/dspace/bin/dspace create-administrator


Assign permission to dspace installation directory

root@dir:/home/dspace/dspace-src-release/dspace#chmod -R 777 /dspace/*


Finally you can get your Dsapce by pointing the address in your web browser:



If ant fresh_install fail to download GeoLiteCity do the following-

In order to use DSpace Solr Usage Statistics, you will need to

manually re-run:

ant update_geolite


You may manually install this file by following these steps:

(1) Download the file from http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz

(2) Unzip it to create a file named ‘GeoLiteCity.dat’

(3) Copy that file to ‘/dspace/config/GeoLiteCity.dat’

Configuration and Customization of Dspace

We have to change the following sections at the time of DSpace installation. Before the command “mvn package”

The location of main Dspace configuration file is –   



##### Basic information ######


# DSpace installation directory

dspace.dir = ${dspace.install.dir} Put your Dspace installation Directory


# DSpace host name – should match base URL. Do not include port number.

dspace.hostname = ${dspace.hostname} Assign your hostname here


# DSpace base host URL. Include port number etc.

dspace.baseUrl = ${dspace.baseUrl}


# DSpace base URL. Include port number etc., but NOT trailing slash

# Change to xmlui if you wish to use the xmlui as the default, or remove

# “/jspui” and set webapp of your choice as the “ROOT” webapp in

# the servlet engine.

dspace.url = ${dspace.baseUrl}/xmlui


# Name of the site

dspace.name = ${dspace.name} Write your Dspace name here


# Default language for metadata values

default.language = ${default.language}


##### Database settings #####


# Database name (“oracle”, or “postgres”)

db.name = ${db.name}


# Database username and password

db.username = ${db.username}

db.password = ${db.password} Insert your database password here


# From address for mail

mail.from.address = ${mail.from.address} Put your E-mail Address here


# Currently limited to one recipient!

feedback.recipient = ${mail.feedback.recipient} Put your E-mail Address here


# General site administration (Webmaster) e-mail

mail.admin = ${mail.admin} Put your E-mail Address here


# Recipient for server errors and alerts

alert.recipient = ${mail.alert.recipient} Put your E-mail Address here


# Recipient for new user registration emails

registration.notify = ${mail.registration.notify} Put your E-mail Address here



# Boolean search operator to use, current supported values are OR and AND

# If this config item is missing or commented out, OR is used

# AND requires all search terms to be present

# OR requires one or more search terms to be present

search.operator = OR Define your default search operator here


##### Handle settings ######

#handle.canonical.prefix = ${dspace.url}/handle/ Uncomment it to use your own URL

# If omitted, the canonical URL prefix will be http://hdl.handle.net/

handle.canonical.prefix = ${handle.canonical.prefix} Comment it to use your own URL


# CNRI Handle prefix

handle.prefix = ${handle.prefix} Comment it to use your own URL


##### Settings for item count (strength) information ####

webui.strengths.show = false Change this to truefor enabling Item-counter


# The default is to use a cache

# webui.strengths.cache = true Uncomment this line


# Set to true to use local server URLs (i.e. http://myserver.myorg/handle/123456789/1)

webui.feed.localresolve = false Set it to true to use your own URL


#### Controlled Vocabulary Settings #####

# Enable or disable the controlled vocabulary add-on

# Warning: this feature is not compatible with WAI (it requires javascript to function)


# webui.controlledvocabulary.enable = true Uncomment this line to enable controlled vocabulary

Dspace-1.8.2 Installation on Centos-6.3


Add DSpace User in your System

root@localhost nurahammad~]#useradd dspace

Install prerequisite software

root@localhost nurahammad~]# yum install java-1.6.0-openjdk -y

root@localhost nurahammad~]# yum install tomcat6

root@localhost nurahammad~]# yum install postgresql postgresql-server postgresql-contrib

root@localhost nurahammad~]# service postgresql initdb

root@localhost nurahammad~]# yum install ant ant-nodeps

[root@localhost nurahammad]# /etc/init.d/postgresql start

Configure Postgres to listen localhost

[root@localhost nurahammad]# nano /var/lib/pgsql/data/postgresql.conf

listen_addresses = ‘localhost’ # what IP address(es) to listen on;

[root@localhost nurahammad]# nano /var/lib/pgsql/data/pg_hba.conf


# IPv4 local connections:

host dspace dspace trust

# “local” is for Unix domain socket connections only

local all all trust

Manually Download maven and Install. Maven is not in Default Centos-6.3 source

[root@localhost nurahammad~]# wget http://mirrors.ispros.com.bd/apache/maven/maven-3/3.0.4/binaries/apache-maven-3.0.4-bin.tar.gz

[root@localhost nurahammad]# tar -zxvf apache-maven-3.0.4-bin.tar.gz

[root@localhost nurahammad]# mv apache-maven-3.0.4 /usr/local

[root@localhost nurahammad]# cd /usr/local/

[root@localhost local]# ln -s apache-maven-3.0.4 maven

[root@localhost local]# nano /etc/profile

export M2_HOME=/usr/local/maven

export PATH=${M2_HOME}/bin:${PATH}

Create Database user and Database for DSpace

[root@localhost nurahammad]# su postgres

bash-4.1$ createuser -U postgres -d -A -P dspace

bash-4.1$ exit

[root@localhost nurahammad]# su dspace

[dspace@localhost nurahammad]$ createdb -U dspace -E UNICODE dspace

Download DSpace and configure

[root@localhost nurahammad]# wget http://garr.dl.sourceforge.net/project/dspace/DSpace%20Stable/1.8.2/dspace-1.8.2-src-release.tar.gz

[root@localhost nurahammad]# tar -zxvf dspace-1.8.2-src-release.tar.gz

[root@localhost nurahammad]# cd dspace-1.8.2-src-release/dspace

[root@localhost dspace]#nano config/dspace.cfg

Build DSpace

[root@localhost dspace]# mvn package

Install DSpace

[root@localhost dspace]# cd target/dspace-1.8.2-build/

[root@localhost dspace-1.8.2-build]# ant fresh_install


[echo] ====================================================================

[echo] The DSpace code has been installed, and the database initialized.


[echo] To complete installation, you should do the following:


[echo] * Setup your Web servlet container (e.g. Tomcat) to look for your

[echo] DSpace web applications in: /dspace/webapps/


[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] * Make an initial administrator account (an e-person) in DSpace:


[echo] /dspace/bin/dspace create-administrator


[echo] * Start up your servlet container (Tomcat etc.)


[echo] You should then be able to access your DSpace’s ‘home page’:


[echo] http://localhost:8080/xmlui


[echo] You should also be able to access the administrator UI:


[echo] http://localhost:8080/xmlui/dspace-admin

[echo] ====================================================================



Total time: 1 minute 46 seconds

[root@localhost dspace-1.8.2-build]# nano /etc/tomcat6/server.xml

  Change this section
<Host name=”localhost”  appBase=”webapps”
unpackWARs=”true” autoDeploy=”true”
xmlValidation=”false” xmlNamespaceAware=”false”>

As the following
<Host name=”localhost”  appBase=”/dspace/webapps”
unpackWARs=”true” autoDeploy=”true”
xmlValidation=”false” xmlNamespaceAware=”false”>

Then create DSpace Administrator account

[root@localhost dspace-1.8.2-build]# /dspace/bin/dspace create-administrator

Creating an initial administrator account

E-mail address: nurahammad@iub.edu.bd

First name: Nur

Last name: Ahammad

WARNING: Password will appear on-screen.


Again to confirm: Password

Is the above data correct? (y or n): y

Administrator account created

Set Permission and ownership for DSpace

[root@localhost nurahammad]#chmod -R 755 /home/dspace/

[root@localhost nurahammad]#chown -R dspace:dspace /home/dspace/

Finally you can get your Dsapce by pointing the address in your web browser:




Archivists Toolkit

Leave a comment

The Archivists’ Toolkit™, or the AT, is the first open source archival data management system to provide broad, integrated support for the management of archives. It is intended for a wide range of archival repositories. The main goals of the AT are to support archival processing and production of access instruments, promote data standardization, promote efficiency, and lower training costs. You can get more information from here

Enable Discovery and Mirage theme in DSpace

1 Comment

Mirage Theme of DSpace looks nice. Many people try to enable this theme. I am mentioning here the process of enabling Mirage theme and DSpace Discovery.

go /home/dspace/config/xmlui.xconf

comment Default Reference Theme and uncomment Atmire Mirage Theme


<!– Example configuration –>

<!– <theme name=”Test Theme 1″ handle=”123456789/1″ path=”theme1/”/> –>

<!– <theme name=”Test Theme 2″ regex=”community-list” path=”theme2/”/> –>

<!– Default theme –>

<theme name=”Default Reference Theme” regex=”.*” path=”Reference/” />

<!– Mirage theme, @mire contribution of new theme to support easier development and branding –>

<!– <theme name=”Atmire Mirage Theme” regex=”.*” path=”Mirage/” /> –>

<!– Classic theme, inspired by the JSP UI –>

<!– <theme name=”Classic” regex=”.*” path=”Classic/” /> –>

<!– Table based browse display –>

<!– <theme name=”Table Theme” regex=”.*” path=”TableTheme/” /> –>



Then go aspect section



@deprecated: the Artifact Browser has been devided into ViewArtifacts,

BrowseArtifacts, SearchArtifacts

ArtifactBrowser/” />


ViewArtifacts/” />

BrowseArtifacts/” />

SearchArtifacts/” />

<aspect name=”Administration” path=”resource://aspects/Administrative/” />

EPerson/” />

<aspect name=”Submission and Workflow” path=”resource://aspects/Submission/” />

<aspect name=”Statistics” path=”resource://aspects/Statistics/” />

<aspect name=”Original Workflow” path=”resource://aspects/Workflow/” />

<!–<aspect name="XMLWorkflow” path=”resource://aspects/XMLWorkflow/” />–>



To enable Discovery, uncomment this Aspect that will enable it

within your existing XMLUI

Also make sure to comment the SearchArtifacts aspect

as leaving it on together with discovery will cause UI overlap issues

<aspect name=”Discovery” path=”resource://aspects/Discovery/” />

comment Searching Artifacts and uncomment Discovery

And edit /home/dspace/config/dspace.cfg in Event System Configuration section

### Event System Configuration ####

# default synchronous dispatcher (same behavior as traditional DSpace)

event.dispatcher.default.class = org.dspace.event.BasicDispatcher


# uncomment below and comment out original property to enable discovery indexing

# event.dispatcher.default.consumers = search, browse, discovery, eperson, harvester


event.dispatcher.default.consumers = search, browse, eperson, harvester

add discovery above line

Then find

#### Additional configuration for Recent Submissions code ####

# the sort option name (from webui.itemlist.sort-option above) to use for

# displaying recent submissions. (this

# is used by the Recent Submissions system and any other time based

# browse query such as FeedServlet)


recent.submissions.sort-option = dateaccessioned

# how many recent submissions should be displayed at any one time

recent.submissions.count = 5

and change value 5 with 0

Ensure solr search port and tomcat port are same





# Configuration properties used solely by the Discovery #

# faceted-search system. #


##### Search Indexing #####

search.server = http://localhost:8080/solr/search

Finally run the command to enable DSpace Discovery

bin/dspace update-discovery-index


Leave a comment

Maarch is a Open Source Electronic Archiving and Document Management System.

You can get more information at http://www.maarch.com

Older Entries

%d bloggers like this: