Thursday, May 20, 2010

Koha Linux Installation -Fedora XX




Introductions:

We have now a software depositories ;what we want more are to tandem it with 'OPAC's and that our prospects -VuFind and Koha. Since Koha was very a prominent OPAC software I don't have a second options but to include it as a candidate for testing and evaluations .Another is the VuFind, as of now we have the impression that it has a more simplified version and is very promising software than its counterparts-well, let's see.

Let us first introduce Koha,this OPAC was originally developed for the Horowhenua Library Trust by Katipo Communications,New Zealand in 1999 (kiwi people). The first version of Koha went live at HLT in January 2005.And there are a lot of support being shared all around open source community with a dedicated team that enhance its bug , features and add-ons from time to time.

So now we proceed to actions ;debugging an OPAC powered by Koha-mwha!

Koha features:


-A full featured modern integrated library system (ILS).
-Award winning and open source no license fee, ever.
-Linux, Unix, Windows and Mac OS platform.
-Web Based.
-We can full integrate it into your website.
-Copy cataloging and z39.50.
-MARC21 and UNIMARC for professional catalogers.
-Tailored catalog module for special libraries.
-Use as a document manager or digital library.
-Manage online and off line resources with the same tool.
-RSS feed of new acquisitions.
-E-mail and/or text patron's overdues and other notices.
-Print your own barcodes.
-Serials management module.
-Full catalog, circulation and acquisitions system for library stock management.
-Web based OPAC system (allows the public to search the catalog in the library and at home).
-Simple, clear search interface for all users.
- Simple and comprehensive acquisition options.
- Koha is multi-tasking and enables updates of circulation, cataloging and issues to occur simultaneously.


Objectives:
To use Koha software package for online OPAC
To test Koha features
To compare Koha with VuFind
To evaluate Koha in production

Requirements:
Recommendations to install Koha:

  • Pentium II or a higher specs
  • Debian Linux package
  • Apache
  • MySQL
  • Perl
  • KOHA (http://download.koha.org/?C=N;O=D)
  • Software extras

Methodology:
Here are some straight forward method to succeed in installing,configuring and deploying KOHA.

1) Installing Perl compiler
root@localhost# yum install perl
root@localhost# perl-CPAN*

2) Install Perl libraries 
root@localhost# yum install perl-
(Please use Yum to download and install package)
mysql-devel,
libxml2-devel, quagga
libxslt-devel, tcl, bzip2-devel, gcc, ncftp,
wget, gdbm-devel, expat-devel, tcp_wrappers ,
libicu , libicu-devel
mysql-bench
mod_auth_mysql
php-mysql
mysql-connector-odbc
mysql-devel
yaz

Please use Cpan to install and download Pearl libraries and add-ons-(the mt. Everest of installations )
install XML::SAX
install XML::LibXMLinstall XML::LibXSLT
install XML::LibXML::SAX::Parserinstall XML::RSSinstall XML::SAX::Writer
install Algorithm::CheckDigits
install Test::Pod
install Test::Pod::Coverage
install Biblio::EndnoteStyle
force install DBD::mysql
force install DBD::SQLite2install GD
install DBIinstall FreezeThaw
install CGI::Session::Serialize::yamli
install CGI::Simple
install Class::Accessorinstall Class::Factory::Util
install Date::Calc
install Sub::Name
install ExtUtils::CBuilder
install Data::ICal
install Email::Date
install HTML::Template::Proinstall HTML::Scrubber
install HTML::Template::Proinstall MARC::Recordinstall MARC::Crosswalk::DublinCore
install MARC::File::XMLinstall MARC::Charsetinstall PDF::API2
install PDF::Reuse
install PDF::Reuse::Barcode
install Lingua::Stem
install Test::Distribution
install List::MoreUtils
install MIME::Lite
install Mail::Sendmail
install POE
install Tk
install Term::ReadKey
install Event
install Curses
install Schedule::At
install Text::CSV
install Text::CSV_XS
install Text::Iconv
install Test::Differences
install JSON
install YAML::Syck
install HTTP::OAI
install Net::Z3950
Install Net::Z3950::ZOOM
install Unix::Syslog
Note: here are some of the updates during my installations
install Biblio::EndnoteStyle 0.05
install Date::ICal 1.72
install Digest::SHA 5.43
install GD 2.39
install IPC::Cmd 0.46
install Net::Z3950::ZOOM 1.16
install SMS::Send 0.05
install Text::CSV::Encoded 0.09
install e XML::LibXSLT 1.59
install XML::RSS 1.31


3) Instal Mysql and libraries

root@localhost# yum install mysql*

3-1) Configure  mysql database
Set a new password 
root@localhost# service mysqld stop
root@localhost# mysqld_safe --skip-grant-tables &

3-2) Connect to mysql server using mysql client
root@localhost mysql -u root  password (just press enter)mysql> use mysql;
mysql> update user set password=PASSWORD("password1234") where User='root';
 mysql> flush privileges;
mysql> quit;

3-3) Create Database
mysql> create database koha;
mysql> grant all privileges on koha.* to 'kohaadmin'@'localhost' identified by 'password1234';

4) Install web container (Apache)
root@localhost# yum install httpd*

5) Download and Install koha
root@localhost# wget www.koha

5-1)Install Koha(latest version)
root@localhost#  cd PATH_Koha/
root@localhost# perl Makefile.Pl
root@localhost# make
root@localhost# make test
root@localhost# make install

5-2) Configure Koha:
5-2-1)Create a symlink in apache
root@localhost# ln -s /etc/koha/koha-httpd.conf /etc/httpd/conf.d/


5-2-2) To access koha on all IP(LAN/WAN)
root@localhost# vim /etc/httpd/conf.d/koha-httpd.conf
Check  this in koha-httpd.conf #Opac < VirtualHost *:80 >  #Intranet  < VirtualHost *:8080 > 


5-3) Test and browse Koha system
Client side
http://localhost:80

Administrator Side
http://localhost:8080

Detail(1) Successful installation of KOHA


Detail(2) Login


Detail(3) Installer -Step 1



Detail(4) Installer -Step 2


Detail(5) Installer  -Step 2


Detail(6) Installer -Step3


Detail(7)-Installer -MARC


Detail(8)- Optional Added


Detail(9)


Detail(10)- No Zebra


Detail(11) Successful/complete installations


Detail(12) Admin control panel


Detail(13) OPAC client window



Remarks:


Well, one thing to note if the guide you are following does not continue as it was expected perhaps you should read now how the "config","make","make install" created an error display.
I would enumerate those possible problems:
1) Please identify each equivalent/appropriate version,what I mean is the contemporary dates when all of the the required packages were compiled and had worked out.

2)Please not some --prefixes (the correct path file installations)

3) You need to check if it needs you to setup environment variable or rather use "export"

4)Never ever forget to activate "MySQL" they must be running for such an applications to create its own database: field,name,tables ,user name, password -sometimes that was an inevitable case.

5)But in KOHA particularly, the tweak will much occur in the CPAN installations ; you can just cut and paste all the commands for eache package s to be installed by CPAN- and these were posted above. Try to force the installation if it does not continue on the first time of command of installing it. Otherwise it has other package dependencies needed to be compiled yet .Oh! this group of YAZ :applications(Yaz.x.y.z.tar.gz,libyaz.x.y.z and libyaz-devel.x.y.z) ,was a little bit confusing to mine so much so of its progress or development to CentOS ;painstakingly how can we find file just as where and how to fix its right version. I would rather suggest , why not KOHA used other package instead of YAZ ?I think there are alot of alternatives application in replacement to YAZ-the community should be serious about it though.

6) Here is another important tips for installing Net::Z3950::ZOOM is to try all available encryptor / decryptor in YUM. As different OS may vary names for these(so better try yum install *crypt*) instead. Perhaps also wrappers, I was enchanted resolving Z3950 files and turn it out installing this way -yum install *wrap* (oh thanks for a wild characters -KoHA is getting wild).

7)Please take note that if your web browser displayed errors "403" or "404" which mean to say that your apache web server (or common httpd) does not allow your koha url to be accessible (index.html-mainpage.pl).So try to add this line and I had my directory located here-> /usr/local/koha) and all the compiled packages.Please put and enclosing the statement below.
===================================
AllowOverride All
Options MultiViews -Indexes Includes FollowSymLinks
Order allow,deny
Allow from all
==============
=====================
or this one
===================================
AllowOverride All
Options ExecCGI
==============
=====================
8) Don't forget to create a "koha " database usually this is the primary cause of an error .It could be avoided this way-create a database first before installing koha.

Given:
Database = "koha"
Administrator account ="kohaadmin"
Hostname =" localhost"
Password ="password"

#mysql -u root -p
password (just press enter)

mysql>create database koha;
mysql>grant all privileges on koha.* to 'kohaadmin'@'localhost' identified by 'password';

9) Well , better install all the files required by CPAN

10) If you are using Fedora X.X version, make sure that selinux is disabled.

That is all folks!

Conclusions:
Its free but not the painstakingly hardship debugging its installations- make you stressed after a success

Tuesday, May 4, 2010

Commecial Grade Repository(Eprints)


INTRODUCTIONS:
So, we 've finally finished exploring EPrints ,and found out that it really fitted to the applications of a Digital Repository.

But we're not through yet or have done it almost if we would refer on a commercialize or high-end web data repository.There are a needs to dig out some configurations files: in its web-url, database format,scripts and etc.One thing more, the best way to customize eprints is not so much on GUI published management "Admin:Config tools" but rather on the files that can be found in its subdirectories.There are more shell commands found in the /usr/local/eprints3/bin that are used to change eprints file systems (GUI,DB,etc)

In this follow up blog-article will show us an interest much on branding ,deploying and configuring the system on our preferred setup and lastly we would be able to appreciate the digital repository sytem and so much so is the legacy of EPrints.


OBJECTIVES:
1) To use e-Prints in building digital repository
2) To fully costumize eprints in the organizational data structure repository design
3) To design library depository scheme/methods other than "Library of Congress Index"
4) To deploy hi-end fully costumized commercial digital repository

METHODOLOGY:
1)Branding
Login to Admin->Home then click edit image , the html source page can be edited.

2)Adding Views


3)Policy/Guidelines

Create your simple policy html files in a notepad , then copy it as "guide.html" in the directory/path below.
root@localhost # /usr/local/eprints3/archives/Archive_ID/cfg/en/guide.html

4) Work Flow(Type:Division:Subjects)

5)Crontab for active maintainance(script scheduler)

The system administrator is usually logged in as "root", but making changes to another user's crontab file or simply looking at another user's crontab file is often necessary. For situations like this, you can append the "-u" flag followed by the desired username.For example, if logged in as root but you want to edit the crontab for the user "admin", you would do the following:
crontab -e -u admin
Note** Now,I expect that you know how to access the crontab,let's take a look at the syntax of the crontab entry itself.
A typical crontab entry might look like this: 30 0,12 * * * /usr/local/eprints3/bin/
OK, so what does that mean? Well, there are 2 parts to the entry you see above. In fact, any crontab entry has 2 parts:
Part 1 - The setting the scheduler
The schedule, which governs when the task will run, consists of a string of numbers, possible commas and asterisks (*).So, in the above example, the schedule is:
30 0,12 * * *
What you are seeing is actually split up into 5 sections. The following chart illustrates what each section of the schedule is for:
1. Minute - Minutes after the hour (0-59).
2. Hour - 24-hour format (0-23).
3. Day - Day of the month (1-31).
4. Month - Month of the year (1-12).
5. Weekday - Day of the week. (0-6, where 0 indicates Sunday).
* = An asterisk in a schedule field indicates "every". It means that the task will occur on "every" instance of the given field. So a "*" on the Month field indicates the the task will run "every" month of the year. A * in the Minutes field would indicate that the task would run "every" minute. , = A comma is used to input multiple values for a field. For example, if you wanted a task to run at hours 12, 15 and 18, you would enter that as "12,15,18".
Let's take a look at how this format fits into the syntax of a crontab entry:
_________________________ 1.Minutes after the hour (0-59)
|
| ______________________ 2. 24-hour format (0-23).
| |
| | ___________________ 3.Day of the month (1-31)
| | |
| | | ________________ 4. Month of the year (1-12)
| | | |
| | | | ______________5. Day of the week. (0-6, where 0 indicates Sunday)
| | | | |
30 0,12 * * * /some/script/or/command

So, when we combine all the schedule elements, we know when and how often this task will run. Going on the above example, this task would run: At 30 minutes past the hours of 0 (midnight) and 12 (noon), EVERY day of the month, EVERY month of the year and EVERY day of the week. In other words, the above task would run every single day at 12:30AM and 12:30PM.
Let's play around with the schedule a little bit and try something different. What if we had something like this:
15,45 0,12,6 20 1,2,3 0 ./ /usr/local/eprints3/bin/generate_views mainlib

Let's decipher it...
15,45 - This means that the task will run at 15 and 45 minutes past the hour. But what hours and what days? Well, that's coming up.
0.12.6 - The task will run during the hours of 0 (midnight), 12 (noon) and 6AM.
20 - The task will run on the 20th day of the month. But during what months?
1,2,3 - The task will run only during the months of January, February and March.
0 - The task will only run on a Sunday.

So, when we put all of this information together,the task is going to run at 0:15, 0:45, 6:15, 6:45, 12:15 and 12:45 on the 20th of January, February and March IF that day falls on a Sunday.
Part 2: The task needs to be executed
In the above example, the "task" to run would be: ./ /usr/local/eprints3/bin/generate_views mainlib .
actually, we have a lot of scripts to run , and that can be found in the directory of /usr/local/eprints3/bin/
6)Back Up

New Server:
Let may give you some clear procedures to back up your eprints.In your old server to your new eprints server. Here is the link of my previous post with regards eprints installations.
http://cobecoballes-linux.blogspot.com/2010/04/e-prints-complete-metadata-repository.html


Given:
user name 'mainlib'
data base name 'mainlib_DB'
data base password 'xxxxyyy'

Old Server:
1)Please back up the following files: /usr/local/eprints3 ; /var/lib/mysql/mainlib_DB
root@localhost# tar zxf eprints_backup.tar /usr/local/eprints3/
root@localhost# mysqladmin -u root password "XXXYYY"
root@localhost# mysqladmin -u root -p create mainlib_DB
root@localhost# mysqldump --opt mainlib_DB > eprints_db.sql -u mainlib -p
root@localhost# scp eprints_backup.tar root@IP_NEW_SERVER:/usr/local/eprints3/
root@localhost# scp eprints_db.sql root@IP_NEW_SERVER:/var/lib/mysql/

New server:

1)Install the same version of eprints.ver.3.x in the new server ,see to it that you can point the name to the local browser after the installations: http://name.eprints (example only)


2)Copy those : eprints_db.sql eprints_backup.tar

root@localhost# tar zxvf eprints_backup.tar
root@localhost# mysqladmin -u root password "XXXYYY"
root@localhost# mysqladmin -u root -p create mainlib_DB
root@localhost# mysql-u root -p mainlib_DB < style="font-style: italic;">root@localhost# "mysql mainlib_DB "
root@localhost# mysql> grant all privileges on mainlib_DB.* to mainlib@localhost identified by 'eprints1234';

EPRINTS COSTUMIZATIONS(Webpage Layout)


1)Changing captions
Log in to Admin -> Admin ->config tools-> Edit page phrases

2) Adding Eprint Type (Browse by Type)
root@localhost# /usr/local/eprints3/archives/Archive_ID/cfg/cdg.d/views.pl

3)Adding editing Eprint Material type
root@localhost# /usr/local/eprints3/archives/Archive_ID/cfg/namedsets/
root@localhost# vim eprint

ex: reports
root@localhost# vim /usr/local/eprints3/lib/lang/en/phrases/system.xml
root@localhost# vim /usr/local/eprints3/lib/lang/en/phrases/zz_wconfig.xml

4) Adding subject (Browse by Subject)
root@localhost# /usr/local/eprints3/archives/Archive_ID/
root@localhost# vim subject

5) Adding details (Publisher details) in a customized material type
root@localhost# vim /usr/local/eprints3/archives/mainlib/cfg/workflows/eprint/default.xml
Copy an old field of existing material type and change its type name by a new material type name; ie, "other" to "added_name". other'">


6) Upgrading repositories from an old to a new eprints version
root@localhost # cd /usr/local/eprints3/bin
root@localhost# sudo -u eprints ./ epadmin upgrade repository_id
7) Update eprints database structure to its latest meta-fields
root@localhost # cd /usr/local/eprints3/bin
root@localhost# sudo -u eprints ./epadmin update_database_structure repository_id
Importing and Exporting MARC protocolInstall the followiing perl modules for MARC
cpan > instal XML::SAX
cpan> install MARC::Record
cpan > install MARC::Charset
cpan > install MARC::XML
cpan > install MARC::File::XML

Note**
We can also you "yum" instead of "cpan" installation
ex:
root@localhost # yum install perl-MARC-XML
Then download the following files "EPrints-MARC_0.1.tar.gz" and extract it in the
root@localhost# cd /usr/local/eprints3/
copy the "marc.pl" file in the
root@locahost# cd /usr/local/eprints3/archives/Archived_ID/cfg/cfg.d/
Then goto eprints browser " manage depository" , [Import] and choose
"marc" then Bingoooo!


MULTIPLE EPRINTS REPOSITORIES(Virtual Directories)
o)Please follow the steps "CREATING AN ARCHIVE"
1) Create more than one archive
2) Give a DNS name for each archive

a) roots.localhost # /usr/local/eprints3/bin/ create epadmin engineering
a.1) hostname? engineering.mainlib.xxd.edu.ph

b) roots.localhost# /usr/local/eprints3/bin/ create epadmin mainlib
b.1) hostname? eprints.mainlib.xxd.edu.ph


REMARKS:

Hint!
If you had lost your "mysql" database root password elsewhere and your memories can't retrieve it any-more best thing is to these.

root@localhost # service mysqld stop
root@localhost@ mysqld_safe
open another tab for cli command,then...
root@localhost# mysql -u root mysql
Enter Password:

mysql>
update user set Password=PASSWORD('new-password-here!') WHERE User='root';
Query OK, 2 rows affected (0.04 sec)

Rows matched: 2 Changed: 2 Warnings: 0


mysql> flush privileges;

Query OK, 0 rows affected (0.02 sec)
mysql> exit
Bye

and you wouldn't be worrying any more.....alligator!

If Eprints is running yet some features are not available you may try to add some module or addons to supplement your requirements, and it is important to know if some software were installed already such as:

root@localhost# vim /usr/local/eprints3/perl_lib/EPrints/SystemSettings.pm
-------------------------------------------------------------------------------
'executables' => {
'convert' => '/usr/bin/convert',
'tar' => '/bin/tar',
'rm' => '/bin/rm',
'dvips' => '/usr/bin/dvips',
'gunzip' => '/bin/gunzip',
'sendmail' => '/usr/sbin/sendmail',
'unzip' => '/usr/bin/unzip',
'elinks' => '/usr/bin/elinks',
'cp' => '/bin/cp',
'latex' => '/usr/bin/latex',
'perl' => '/usr/bin/perl',
'pdftotext' => '/usr/bin/pdftotext',
'wget' => '/usr/bin/wget',
'antiword' => '/usr/bin/antiword'
},
-------------------------------------------------------------------------------
for example:Antiword for viewing pdf; to know if antiword is installed , pls type
root@localhost # which antiword
then must appear where the exectables is loaded
root@localhost# /usr/bin/antiword
After eprints migrations not all previous service are active ;therefore there is a need to familiarise the script in just to make it working again:root@localhost # /usr/local/eprints3/bin
To change to a new apache configurations
0) root@localhost # ./generate_apacheconf archive_ID

To change new browsing
1)root@localhost # ./generate_views archive_ID

To change new text record
2) root@localhost # ./generate_abstract archive_ID

To restore a archives
3)root@localhost # ./generate_static archive_ID

For restoring thumbnail preview
4)root@localhost # ./epadmin redothumbnails archive_ID
To generate video preview
5)root@localhost # ./generate_video_preview


For some advance tricks about eprints....check this out!http://imageweb.zoo.ox.ac.uk/wiki/index.php?title=DefiningImageAccess/Tool/Eprints&printable=yes#Customizing_the_browsing_interface

CONCLUSIONS: