Usefull PostgreSql commands

Leave a comment

 To show list of databases
postgresql: \l
postgresql: SELECT datname FROM pg_database;

To connect/use a particular database

mysql: use database_name;

Postgresql: \c database_name


To show list of tables in your database
postgresql: \d
postgresql: SELECT table_name FROM information_schema.tables WHERE table_schema = ‘public’;


To show list of columns in a particular table / schema use :
postgresql: \d table_name
postgresql: SELECT column_name FROM information_schema.columns WHERE table_name =’table‘;



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

Koha with Solr

Leave a comment

Now Solr is available with koha. This will provide more accurate result than previous. It is more helpful for other language search.

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

Blog migration from blogger to wordpress

1 Comment

It is easy to migrate a blog from Google blogger to WordPress. I am stating here the step by step process of migration:-

1. Go your WordPress admin panel and click on Tools >import


2. Then you will get the following Screen:-


and click on blogger.

3. After clicking on blogger you will get the following screen:-

The above screen you will get if your blog is private. First make your blogger blog as public then try to import and you will get all of your blogs.


The above screen shows your blog information. Just click on import on you can do this by uploading your blogger export file in the following way:-


Enjoy your WordPress blog.

Older Entries Newer Entries

%d bloggers like this: