Cron Jobs setup for DSpace production system

1 Comment

Add crob jobs with the following lines in crob jobs
root@dspace#crontab -e

@hourly /home/dspace/bin/dspace itemcounter

@hourly /home/dspace/bin/dspace stats-util -f
@hourly /home/dspace/bin/dspace stats-util -i
@daily /home/dspace/bin/dspace stats-util -u
@daily /home/dspace/bin/dspace stats-util -m

@daily /home/dspace/bin/dspace update-discovery-index -o
@weekly /home/dspace/bin/dspace update-discovery-index -b -f
@monthly /home/dspace/bin/dspace update-discovery-index -c

@weekly /home/dspace/bin/dspace checker -u -d2h -p
@weekly /home/dspace/bin/dspace checker-emailer -a
@monthly /home/dspace/bin/dspace cleanup

10 0 * * * /home/dspace/bin/dspace embargo-lifter

0 1 * * * /home/dspace/bin/dspace sub-daily

10 1 * * * /home/dspace/bin/dspace stat-general
20 1 * * * /home/dspace/bin/dspace stat-monthly

10 2 * * * /home/dspace/bin/dspace stat-report-general
20 2 * * * /home/dspace/bin/dspace stat-report-monthly

@weekly /home/dspace/bin/dspace filter-media
0 3 * * * /home/dspace/bin/dspace index-update
0 6 * * * /home/dspace/bin/dspace generate-sitemaps

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

[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

[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:

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:




Providing First World Library services By using Koha, DSpace, vufind and Drupal

Leave a comment

Providing First World Library services By using Koha, DSpace, vufind and Drupal

Library Automation and Digitization at Chittagong Veterinary and Animal Sciences University 6 December 2012 Providing First World Library services By using Koha, DSpace, vufind and Drupal Presented By Nur Ahammad Consultant of the project- Modernization of Central Library of CVASU

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

Dspace installation on Debian Squeeze


I am mentioning my practical experience of Dspace installation on Debian Squeeze. I hope, you can do
it and this will help you.
First make a dspace user in debian for Dspace.
root@dir:~#adduser dspace
Then install other softwares as prerequisites for Dspace installation. It is a good approach to
install sun-java6.
root@dir:~# apt-get install sun-java6-jdk
root@dir:~#update-java-alternatives -v -s java-6-sun
root@dir:~# apt-get install tomcat6
root@dir:~#apt-get install maven2
root@dir:~#apt-get install postgresql-8.4
After installing prerequisite softwares, create dspace database in postgresql for Dspace use.
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
After that download the latest version of Dspace and set right configuration
root@dir:/home/dspace/dspace-1.8.2-src-release#nano dspace/config/dspace.cfg
Thereafter build Dspace by running the following command
root@dir:/home/dspace/dspace-1.8.2-src-release/dspace# mvn package
[INFO] Scanning for projects…
[WARNING] Unable to get resource ‘org.dspace:dspace-pom:pom:10’ from repository central
( Error transferring file:
[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-parent:pom:1.8.2
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-1.8.2-src-release/dspace#nano /etc/maven2/settings.xml
Uncomment and set you proxy in the following section-


root@dir:/home/dspace/dspace-1.8.2-src-release/dspace# mvn package
root@dir:/home/dspace/dspace-1.8.2-src-release/dspace# cd target/dspace-1.8.2-build/
root@dir:/home/dspace/dspace-1.8.2-src-release/dspace/target/dspace-1.8.2-build# 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)
Create E-person in Dsapce by using the command-
root@dir:/home/dspace/dspace-1.8.2-src-release/dspace# /home/dspace/bin/dspace create-administrator

Set Permission and owner for DSpace

root@dir:~#chmod -R 755 /home/dspace/

root@dir:~#chown -R dspace:dspace /home/dspace/
Finally you can get your Dsapce by pointing the address in your web browser:



Remove DSpace port number in Debian

Leave a comment

There is a easy way to remove port number in DSpace URL. Just add port number 80 instead of 8080 in /etc/tocat6/server.xml. But is dangerous for production system. we have to use apache as fornt webserver instead of tomcat. This can be possible by using mod_proxy and mod_prory_ajp module of apache. And there is a another procedure which is port forwarding by using iptable. Port forwarding is the most easy to do that.

First see your present iptable by running the command

#iptables -L

This will produce the following output

 Chain INPUT (policy ACCEPT)
 target     prot opt source               destination

 Chain FORWARD (policy ACCEPT)
 target     prot opt source               destination

 Chain OUTPUT (policy ACCEPT)
 target     prot opt source               destination

This means it allows anyone access to anything from anywhere.

Lets make your own iptable

nano /etc/iptables.test.rules

Add your common rules and add the following line


-A PREROUTING -d your.ipad.ofma.chnn -p tcp –drop 80 -j DNAT — to your.ipad.ofyr.macn:8080


Activate this rules

iptables-restore < /etc/iptables.test.rules

Look the difference

iptables -L

Save this rules in master iptable file

iptables-save > /etc/iptables.up.rules

To make sure the iptables rules are started on a reboot we’ll create a new file:

nano /etc/network/if-pre-up.d/iptables

Add these lines to it:


/sbin/iptables-restore < /etc/iptables.up.rules

The file needs to be executable so change the permissions:

chmod +x /etc/network/if-pre-up.d/iptables

%d bloggers like this: