Monday, November 22, 2010

Koha from git

To install via GIT follow instructions below..
$ sudo apt-get install git-core git-email
$ git clone git://git.koha-community.org/koha.git kohaclone
$ cd kohaclone
$ git checkout -b myinstall origin

After above steps, follow normal Koha installation instructions like
perl Makefile etc..

How to upgrade Koha from git repository

cd /your path/kohaclone

git pull

If you are upgrading from a previous installation of Koha 3, you can
use the following:

perl Makefile.PL --prev-install-log /path/to/koha-install-log
make
make test
sudo make upgrade

Sunday, August 22, 2010

Opera on ubuntu 9.04

sudo gedit /etc/apt/sources.list
deb http://deb.opera.com/opera/ lenny non-free
sudo wget -O - http://deb.opera.com/archive.key | sudo apt-key add -
sudo apt-get update
sudo apt-get install opera

Saturday, March 06, 2010

Uninstall Ubuntu on dual boot Windows XP

Uninstall Ubuntu on dual boot Windows XP using Windows only
March, 06 2010
Quick instructions:
A.) Use Disk Manager in Windows to delete the Ubuntu partitions.

B.) Boot your Windows XP CD.
1. Choose “Repair” Press R on your keyboard

2. When it asks for the installation number, I put in “1″,

3. Enter Admin password.

4. At the command prompt type “fixmbr”, then confirm. Windows will overwrite the dual boot info in the MBR that Ubuntu put there.


5. At the command prompt type : exit
Machine will be restart and in the mean time please remove your Windows XP CD from CD-ROM.

Friday, February 26, 2010

Forgotten root Password : Centos

You can log in using single-user mode and create a new root password.

To enter single-user mode, reboot your computer. If you use the default boot loader, GRUB, you can enter single user mode by performing the following:

1.At the boot loader menu, use the arrow keys to highlight the installation you want to edit and type [A] to enter into append mode.
2.You are presented with a prompt that looks similar to the following:

grub append> ro root=LABEL=/

3. Press the Spacebar once to add a blank space, then add the word single to tell GRUB to boot into single-user Linux mode. The result should look like the following:

ro root=LABEL=/ single

4.Press [Enter] and GRUB will boot single-user Linux mode. After it finishes loading, you will be presented with a shell prompt similar to the following:

sh-2.05b#

5. You can now change the root password by typing

passwd root

You will be asked to re-type the password for verification. Once you are finished, the password will be changed. You can then reboot by typing reboot at the prompt; then you can log in to root as you normally would.

Friday, October 30, 2009

DSpace 1.5.2 installation procedure on CentOS 5.3

DSpace 1.5.2 installation procedure on CentOS 5.3
I have just complete a clean install of DSpace 1.5.2 on a CentOS 5.3 box.

Here is the installation process I followed:

Login as the root user and download dspace to /root:
lynx http://sourceforge.net/project/showfiles.php?group_id=19984%20%20

Create an account for the dspace user:
useradd dspace
passwd dspace

JAVA JDK

As root, and in the root users home directory, download the JDK from Sun and install it using the following commands:

https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_Developer-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=jdk-6u13-oth-JPR@CDS-CDS_Developer


chmod 755 jdk-6u13-linux-i586-rpm.bin\&File\=jdk-6u13-linux-i586-rpm.bin
./jdk-6u13-linux-i586-rpm.bin\&File\=jdk-6u13-linux-i586-rpm.bin

Edit /etc/profile and set the JAVA_HOME variable as follows:

JAVA_HOME=/usr/java/jdk1.6.0_13
export JAVA_HOME
PATH=${PATH}:${JAVA_HOME}/bin
export PATH

Change the symlink for Java to point to the new location:

rm /usr/bin/java
ln -siv /usr/java/jdk1.6.0_13/bin/java /usr/bin/java

The java -version command will now produce the following output:

java version "1.6.0_13"
Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
Java HotSpot(TM) Server VM (build 11.3-b02, mixed mode)


Download and install maven and ant:
cd /root
lynx http://maven.apache.org/download.html
mkdir /usr/local/apache-maven
mv apache-maven-2.1.0-bin.tar.gz /usr/local/apache-maven/
cd /usr/local/apache-maven
tar -xzvf apache-maven-2.1.0-bin.tar.gz

Apache Ant
cd /usr/local
lynx http://ant.apache.org/bindownload.cgi
mv /root/apache-ant-1.7.1-bin.tar.gz .
tar -xzvf apache-ant-1.7.1-bin.tar.gz

Add paths to /etc/profile:
nano /etc/profile

Add the following:
M2_HOME=/usr/local/apache-maven/apache-maven-2.1.0
export M2_HOME
MAVEN_OPTS="-Xms256m -Xmx512m"
export MAVEN_OPTS
M2=$M2_HOME/bin
export M2
PATH=${PATH}:${M2}
ANT_HOME=/usr/local/apache-ant-1.7.1
export ANT_HOME
PATH=${PATH}:${ANT_HOME}/bin
export PATH

Logout and log back in again so that the environment variables from /etc/profile are applied.

Check that maven and ant are installed:

mvn --version
Apache Maven 2.1.0 (r755702; 2009-03-18 19:10:27+0000)
Java version: 1.6.0_13
Java home: /usr/java/jdk1.6.0_13/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.18-92.1.22.el5xen" arch: "i386" Family: "unix"

ant -version
Apache Ant version 1.7.1 compiled on June 27 2008

Install the postgresql database and configure postgresql:

yum install postgresql postgresql-server
chkconfig --level 2345 postgresql on
service postgresql start

nano /var/lib/pgsql/data/postgresql.conf
For 8.0+, in
postgresql.conf uncomment the line starting:
listen_addresses = 'localhost'
#---------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#---------------------------------------------------------------------------
# - Connection Settings -
listen_addresses = 'localhost' # what IP address(es) to listen on;
# comma-separated list of addresses;
# defaults to 'localhost', '*' = all

nano /var/lib/pgsql/data/pg_hba.conf

Then don't tighten up security a bit by editing
pg_hba.conf as the default file is already too restrictive to allow creation of the dspace database. Just enter the following contents into the actual configuration section of the file and delete everything else from this section.

# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust

Check the databases already present:
su - postgres
-bash-3.2$ psql -l
List of databases
Name | Owner | Encoding
-----------+----------+----------
postgres | postgres | UTF8
template0 | postgres | UTF8
template1 | postgres | UTF8
(3 rows)

Create the user and database:
-bash-3.2$ createuser -U postgres -d -A -P dspace
Enter password for new role: XXXX
Enter it again: XXXX
Shall the new role be allowed to create more new roles? (y/n) n
CREATE ROLE
-bash-3.2$ createdb -U dspace -E UNICODE dspace
CREATE DATABASE

-bash-3.2$ psql -l
List of databases
Name | Owner | Encoding
-----------+----------+----------
dspace | dspace | UTF8
postgres | postgres | UTF8
template0 | postgres | UTF8
template1 | postgres | UTF8

service postgresql stop
Stopping postgresql service: [ OK ]
service postgresql start
Starting postgresql service: [ OK ]

nmap 127.0.0.1
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-04-10 08:47 BST
Interesting ports on localhost.localdomain (127.0.0.1):
Not shown: 1667 closed ports
PORT STATE SERVICE
25/tcp open smtp
80/tcp open http
443/tcp open https
631/tcp open ipp
3306/tcp open mysql
4444/tcp open krb524
5432/tcp open postgres
5801/tcp open vnc-http-1
5901/tcp open vnc-1
6001/tcp open X11:1
8009/tcp open ajp13
8080/tcp open http-proxy
9090/tcp open zeus-admin
Nmap finished: 1 IP address (1 host up) scanned in 0.120 seconds

As the root user, download and install Tomcat:

cd /root
lynx http://tomcat.apache.org/download-60.cgi
cp apache-tomcat-6.0.18.tar.gz /home/dspace
cd /home/dspace
chown dspace:dspace apache-tomcat-6.0.18.tar.gz
su - dspace
tar -xzvf apache-tomcat-6.0.18.tar.gz
exit

nano /etc/profile
and append the following lines:

JAVA_OPTS="-Xmx512M -Xms64M -Dfile.encoding=UTF-8"
export JAVA_OPTS

Here I tell DSpace/Tomcat to listen on port 8081 and AJP connector port 8010 (I have to do this as JBoss Tomcat used with LAMS is already listening on 8080 and 8009):

su - dspace
rm -rf apache-tomcat-6.0.18.tar.gz
cd apache-tomcat-6.0.18/conf
nano server.xml
In server.xml change any references to port 8080 to port 8081 and any references for port 8009 to port 8010.

cd /home/dspace/apache-tomcat-6.0.18/bin
./startup.sh
Using CATALINA_BASE: /home/dspace/apache-tomcat-6.0.18
Using CATALINA_HOME: /home/dspace/apache-tomcat-6.0.18
Using CATALINA_TMPDIR: /home/dspace/apache-tomcat-6.0.18/temp
Using JRE_HOME: /usr/java/jdk1.6.0_13

Just to confirm that DSpace/Tomcat is listening on port 8081:

nmap 127.0.0.1
Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2009-04-11 17:08 BST
Interesting ports on localhost.localdomain (127.0.0.1):
Not shown: 1666 closed ports
PORT STATE SERVICE
25/tcp open smtp
80/tcp open http
443/tcp open https
631/tcp open ipp
3306/tcp open mysql
4444/tcp open krb524
5432/tcp open postgres
5801/tcp open vnc-http-1
5901/tcp open vnc-1
6001/tcp open X11:1
8009/tcp open ajp13
8080/tcp open http-proxy
8081/tcp open blackice-icecap
9090/tcp open zeus-admin

./shutdown.sh
Using CATALINA_BASE: /home/dspace/apache-tomcat-6.0.18
Using CATALINA_HOME: /home/dspace/apache-tomcat-6.0.18
Using CATALINA_TMPDIR: /home/dspace/apache-tomcat-6.0.18/temp
Using JRE_HOME: /usr/java/jdk1.6.0_13

Now install DSpace:

su - root
cd /root
cp dspace-1.5.2-release.tar.gz /home/dspace
cd /home/dspace
chown dspace:dspace dspace-1.5.2-release.tar.gz


tar -xzvf dspace-1.5.2-release.tar.gz
cd dspace-1.5.2-release/dspace/config
nano dspace.cfg

The configuration settings shown below in dspace.cfg are just the settings I either changed or uncommented in the default file:

dspace.dir = /home/dspace
dspace.url = http://vleinternal.bromley.ac.uk/jspui
dspace.hostname = vleinternal.bromley.ac.uk
dspace.name = DSpace for eLearning Evaluation at Bromley College
db.name = postgres
db.url = jdbc:postgresql://localhost:5432/dspace
db.driver = org.postgresql.Driver
db.username = dspace
db.password = XXXX
mail.server=vleinternal.bromley.ac.uk
mail.from.address = dspace-noreply@vleinternal.bromley.ac.uk
feedback.recipient = dspace-help@vleinternal.bromley.ac.uk
mail.admin = dspace-help@vleinternal.bromley.ac.uk
default.language = en_GB

cd ..
mvn package
A lot of information now appears on the screen. Below are shown the last lines confirming success:
[INFO] Copying 861 files to /home/dspace/dspace-1.5.2-release/dspace/target/dspace-1.5.2-build.dir
[INFO]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] DSpace Addon Modules .................................. SUCCESS [30.453s]
[INFO] DSpace XML-UI (Manakin) :: Web Application ............ SUCCESS [1:14.611s]
[INFO] DSpace LNI :: Web Application ......................... SUCCESS [10.261s]
[INFO] DSpace OAI :: Web Application ......................... SUCCESS [6.427s]
[INFO] DSpace JSP-UI :: Web Application ...................... SUCCESS [8.017s]
[INFO] DSpace SWORD :: Web Application ....................... SUCCESS [5.869s]
[INFO] DSpace Assembly and Configuration ..................... SUCCESS [43.018s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2 minutes 59 seconds
[INFO] Finished at: Sun Apr 12 07:40:07 BST 2009
[INFO] Final Memory: 25M/255M
[INFO] ------------------------------------------------------------------------

exit

Now to set up postgresql to allow access to the dspace database:
nano /var/lib/pgsql/data/pg_hba.conf
Add the following line to end of the file:

host dspace dspace 127.0.0.1 255.255.255.255 md5

service postgresql restart

su - dspace
cd /home/dspace/dspace-1.5.2-release/dspace/target/dspace-1.5.2-build.dir
ant fresh_install
A lot of information now appears on the screen. Below are shown the last lines confirming success:
[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: /home/dspace/webapps/
[echo]
[echo] OR, copy any web applications from /home/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] /home/dspace/bin/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://vleinternal.bromley.ac.uk/dspace
[echo]
[echo] You should also be able to access the administrator UI:
[echo]
[echo] http://vleinternal.bromley.ac.uk/dspace/dspace-admin
[echo] ====================================================================
[echo]
BUILD SUCCESSFUL

cd /home/dspace/apache-tomcat-6.0.18/conf
nano server.xml and add the following to the end of the host section:
Note that the standard html opening and closing tag braces have been replaced by {} in this blog purely for display purposes.

{!-- DEFINE A CONTEXT PATH FOR DSpace JSP User Interface --}
{Context path="/jspui" docBase="/home/dspace/webapps/jspui" debug="0"
reloadable="true" cachingAllowed="false"
allowLinking="true"/}
{!-- DEFINE A CONTEXT PATH FOR DSpace OAI User Interface --}
{Context path="/oai" docBase="/home/dspace/webapps/oai" debug="0"
reloadable="true" cachingAllowed="false"
allowLinking="true"/}

cd /home/dspace/bin
./create-administrator

/home/dspace/apache-tomcat-6.0.18/bin
./shutdown.sh
./startup.sh

Now visit http://127.0.0.1:8081/jspui from the browser and it works !!!!!!

Monday, October 05, 2009

Installing DSpace 1.5 on Ubuntu 8.10

Reference documentation: http://www.dspace.org/index.php?option=com_content&task=view&id=152#checker

This is a revision of Installation on Ubuntu 8.04.

1. Ensure that you installed Ubuntu 8.10 Server with Tomcat and PotgreSQL (this can be selected during the installation process.
2. Install maven2 package for the maven build utility

sudo apt-get install maven2

3. Install ant package for installing DSpace

sudo apt-get install ant

4. Create the Unix 'dspace' user, update the passwd, create the directory in which you will install dspace, and ensure that the Unix 'dspace' user has write privileges on that directory:

sudo useradd -m dspace
sudo passwd dspace
sudo adduser dspace admin
sudo adduser dspace tomcat6
sudo mkdir /dspace
sudo chown dspace /dspace

5. Create the PostgreSQL 'dspace' user and the 'dspace' database. Using sudo as the Unix 'postgres' user, authorize the 'dspace' user. You will need to select a password, and specify 'n' to the create new roles prompt. Then, as the 'dspace' user, create the database.

sudo -u postgres createuser -U postgres -d -A -P dspace
sudo -u dspace createdb -U dspace -E UNICODE dspace

6. Stopping Tomcat 6

sudo service tomcat6 stop

7. Change ownership of the tomcat directories to the dspace user:

sudo chown -R dspace /var/cache/tomcat6
sudo chown -R dspace /var/lib/tomcat6
sudo chown -R dspace /var/log/tomcat6
sudo chown -R dspace /etc/tomcat6
sudo chown -R dspace /var/cache/tomcat6

8. Now perform the following tasks as the dspace user:

sudo su - dspace
bash

9. Using the release package:
1. Download DSpace src-release in any directory (In this tutorial it is /home/dspace) and unpack it. The new DSpace directory is referred to as [dspace-src]. (example: /home/dspace/dspace-1.5.0-release)

wget -c http://nchc.dl.sourceforge.net/sourceforge/dspace/dspace-1.5.2-src-release.zip
unzip dspace-1.5.2-src-release.zip

2. Configure [dspace-src]/dspace/config/dspace.cfg -- check to see if email configuration is required for Ubuntu, currently set to local-only
3. cd into the [dspace-src]/dspace directory.
4. Package the install:

mvn package

Your first run of Maven downloads a lot of dependencies. Be prepared for several minutes of download activity, followed by several minutes of build activity. Note that if you accidentally run Maven using gcj instead of Sun Java, and it fails, you should remove the ~/.m2 directory (rm -rf /home/dspace/.m2 before proceeding with the correct java).
5. cd into [dspace-src]/dspace/target/dspace-[version]-build.dir/
6. Initialize the database and install the software:

ant fresh_install

Remark: If the build fails two things are neccessary to do before a new attempt: 1. Remove the remains of the faild build (execute ant clean), 2. Remove the dspace tables from the database by dropping and recreating it (execute dropdb -U dspace dspace; createdb -U dspace -E UNICODE dspace). Of course the reason for the failing must be cured too.
10. Create the initial DSpace administrator:

/dspace/bin/create-administrator

11. Append the following lines to /etc/default/tomcat6 to set the preferences necessary for dspace:

TOMCAT6_USER=dspace
TOMCAT6_SECURITY=no

12. Modify the Tomcat properties in /etc/tomcat6/server.xml to use UTF-8 encoding. You can also change the port from the non-standard 8180 to 8080 to match the examples in DSpace documentation, and the dspace.cfg file:

maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true"
URIEncoding="UTF-8" />

Also in server.xml modify the webapps directory to point to /dspace/webapps:

unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">

13. Start Tomcat:

sudo service tomcat6 start

14. Open the new URL in your Web browser: http://hostname:8180/jspui or http://hostname:8180/xmlui (adjust for your hostname and port number, accordingly)

Retrieved from "http://wiki.dspace.org/index.php/Installing_DSpace_1.5_on_Ubuntu_8.10_Server"
Category: Installation

Monday, May 18, 2009

Digital Library Federation Spring Forum 2009 Presentations

Presentations from the Digital Library Federation Spring Forum 2009 are now available at http://www.diglib.org/forums/spring2009/2009springprogram.htm