Tuesday, January 24, 2012

Problems with PDFbox Extension in Greenstone 2.85

The new features document for 2.85 indicates that there is significant improvement in the PDFbox extension which is usually an add-in to the Apache web server.

When you run Greenstone it pops up a message box noting the PDFbox extension has not been installed and listing a URL for the greenstone developer's TRAC site.

Problem #1

The files referenced by the URL in the box and on the developer's blog are not valid archive files. Both the .zip file and the .gz file are 8kb in size instead of the expect 9mb and cannot be opened in an archive manager. So you cannot get the latest version. Searching the TRAC site is a lesson in frustration.

I tried packaging the source files from the TRUNK and adding them manually to the greenstone\ext folder but when launching the GLI it fails to load until they are removed. Next i looked at the pdfbox project page but their files don't seem compatible. So i decided to use the an older version.

Problem #2

Finding an old version was a bit of work but i managed to find a link in the TRAC site and to download the .zip (9mb) and to extract the files to the greenstone\ext folder. Ran the GLI and configured the PDFplugin to use the PDFbox  extension. Created a new collection and imported a bunch of small PDF files. Only 2 got imported as the others were rejected. The problem was a 'writable error'. I checked the pdf-box folder in greenstone\gli and it was marked as read-only so i reset the permissions for the folder and its contents and re-ran the GLI and the import. This time it looked liked the files were imported but the PDFbox failed with a java error. The workaround was to untick the pdfbox checkbox in the pdfplugin. Now all the pdf's were imported ok but none of the enhanced features offered by pdfbox were available.

After wasting a morning chasing this problem down I had to advise the students NOT to use pdfbox but to go back to the old workarounds of converting their PDF files to older 1.4 versions. A big disappointment!

Wednesday, January 11, 2012

Installing Greenstone 2.85 on Windows 7

Do Not Install Greenstone 2.85 as Administrator in Window 7 Ultimate 32-bit

I removed greenstone 2.84 from my machine in prep for the new version. The old version had worked fine and had been installed as admin to c:\program files\greenstone. I also got another laptop over xmas for testing win stuff so i installed 2.85 to that. It runs Windows 7 Home Premium 64 bit (argh why so many versions?) and the install was straightforward and ended up in c:\program files\greenstone so i didn't anticpate any problems.



Ran Greenstone-2.85-windows.exe as Administrator and it installed OK to c:\progam files\greenstone but when I ran the GLI and the following error message was returned:

Cannot initialize Network (reason WSASYSNOTREADY)


So we shut down greenstone and removed the software and tried the install again with the same result. We shut it down and then checked to see if anything was conflicting with it's web server. We opened a terminal window and ran netstat:


C:\Users\gnickers>netstat -an |find /i "Listening"
  TCP    0.0.0.0:135            0.0.0.0:0
  TCP    0.0.0.0:445            0.0.0.0:0
  TCP    0.0.0.0:3390           0.0.0.0:0
  TCP    0.0.0.0:5357           0.0.0.0:0
  TCP    0.0.0.0:17500          0.0.0.0:0
  TCP    0.0.0.0:34378          0.0.0.0:0
  TCP    0.0.0.0:49152          0.0.0.0:0
  TCP    0.0.0.0:49153          0.0.0.0:0
  TCP    0.0.0.0:49154          0.0.0.0:0
  TCP    0.0.0.0:49155          0.0.0.0:0
  TCP    0.0.0.0:49156          0.0.0.0:0
  TCP    127.0.0.1:80           0.0.0.0:0




And oddly enough there were 2 instances of a web server running on port 80. We ran a ports check cports using  and found two processes listed but when we went to kill them in the windows task manager they were not there!   Looks like greenstone did not clean up after itself!


Only a hard reset got rid of them. We next did an install of Greenstone but not as the administrator and this installed the program to users\gnickers\greenstone and it ran fine. We shut it down and checked the active ports with netstat and the httpd instance had shut down correctly. 


So the change is that unlike 2.84 the new version cannot be installed using admin privileges (which makes sense). Would have be nice to put this in the release notes.


Those who are installing greenstone for the first time may also run into the problem of some other program using port 80 which is the standard port for web traffic. Older versions of Skype were bad for doing this. 


To check type cmd in the start text box and press ENTER. The run netstat using the above syntax. The cports program (search on Google) provides more info that netstat but you must run it as admin. If you have Skype using port 80 set your skype options in the Connection tab to use a different port such as 34378 or something. A list of ports is available on Wikipedia and other sources.

The other solution is to install Greenstone and then select Start >  Programs > Greenstone 2.85 > Greenstone Server and select File, Settings from the menu. Now change the Port Number from 80 to something like 8080  or some other port not in use.



Friday, November 25, 2011

Upgrading to Ubuntu 11.10

We decided to upgrade the HP compaq 8510p laptop to the latest desktop and then to add the server stuff we need (LAMP, various lamp apps, etc). The old 80gig hard drives were too small and we were running ver 9.x which did not support the wireless. So we replaced the hard drive with a new 500gig Seagate hybrid hard drive (SSD/SATA) that should be a lot faster.

Installing was quick and it did fix the wireless problem. However, there are a number of issues with the new release (some minor, some major)

  • The Unity interface is annoying (slower to find what you want)
  • Windowshade is not longer an option for windows
  • Synaptic package manager is not longer included
The first issue was to switch back to Gnome.  First we installed it by entering the terminal and doing:

   sudo apt-get install gnome-shell

and then restarting and logging in again. This provides some login option. First time around we choose Gnome but the screen menus were scrambled and the unity right side dock would appear!  Logging out and choose Gnome Classic at login solved that problem. I can't figure out to how to get windows to roll up, a feature i've been using since mac os 7 and one that is much more usable than having to minimize windows in the way and then go all the way down to the bottom bar to retrieve them. I also seem to recall Unity had that annoying Windows 7 behavior that when you move a window to the side of the screen it maximizes the window. What dumb idea, you move windows to the side to get them out of the way because you can't roll them up. It is fast to just throw a window to the side, doing that does NOT mean i now want it to take up the whole screen. Dumb usability ideas - don't they test these things with real users?

The next step is to download and install all my regular apps and then install LAMP. I did this many versions ago using TASKSEL and the results were awful - lots of problems. So i have to decide between 3 install methods:

Method 1 - TASKSEL(easy but does it work better now?)

sudo apt-get install tasksel
sudo  tasksel
select LAMP Server

Method 2 - Manually (more work to install but possibly most stable?)

sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php5 libapache2-mod-php5 php5-mysql
sudo /etc/init.d/apache2 restart
sudo apt-get install phpmyadmin

Method 3 - 'Bundle' method (newer so maybe give it a whirl?)

sudo apt-get install lamp-server

Of course I have yet to find an informed article that can discuss the pros/cons of the 3 approaches. So it is trial and error.

On the plus side, the laptop is very snappy. Next to get back my apps... Ah good, the Ubuntu software center has synaptic so let's start with that...

PS - one new app that is interesting is under Internet, Desktop Sharing. We will be trying this out as we need to find a good way to showing distance ed students how to do particular tasks. We having been taking screen shots and turning them into movies using Camtasia Studio but that is proprietary and you have to update them when things change. I'd like to be able to stream my desktop to 1 or more students so they can see a process and ask questions.

Friday, November 11, 2011

Lucicat eBook Server

We downloaded the .zip file from http://lucidor.org/lucicat/ and unzipped them into a lucicat folder in the root of the web site.

Next we opened lucicat.ini in a text editor and set the following settings:

db_type: mysql
db_host: localhost
db_name: lucicat
db_user: lucicat
db_password: lucicat
db_prefix: luci_

We then go to the phpMyAdmin page and create the blank lucicat database and a user called lucicat with a password of lucicat who has all privileges on that database on localhost.

Next we edit lucicat/server/lucicat_settings.php and set the following:

$db_addr = 'localhost';
$db_name='lucicat';
$db_user='lucicat';
$db_password='lucicat';

Next we have to figure out how to set the catalog but i can't seem to load the manual into Calibre.

Tomorrow

Read manual and create a catalog


Thursday, October 27, 2011

Adding MARC Records to Koha


Now that the laptop is running fine we decide to add some records to our system. We have a number of downloaded MARC records from various sources such as the library of congress, weldon library, in batches of 25, 50, 500, 2000 etc for testing.  All files have an extension of .MRC

To batch load records

Log in to the staff menu (http://localhost/kohaadmin)

  1. Select Tools, Stage MARC records for import
  2. Click Browse
  3. Select a .mrc file
  4. Click Upload File
  5. Click Stage for Import
  6. Click Manage Staged Records
  7. Click Import This Batch into the catalog

We first try 2000 records and begin the import into the catalog at 10:11am. This took 40 minutes! Obviously we are not running a fast server but a low-end laptop (2ghz duo core, 3 gig ram).


Tuesday, October 18, 2011

New Koha Laptop

We had been using Mizstik's Koha Live CD to install Koha to USB sticks. This worked fine for the 32bit version and on my old Eurocom labtop but the new release 8 is 64 bit and that poses a problem.  It is harder to create a USB stick in newer versions of Ubuntu as it is now a install with manual partitioning of the USB 'hard disk'. The old version had an install to USB option that was automatic. The other problem is that students may have 32bit systems at home so their USB stick may not work. Finally the Eurocom had a 32bit cpu and only 1 gig or ram so time to upgrade.

The 'new' Koha laptop is a compaq 8510p with 4 gig. I tried installing a mini-pci wireless card but the machine uses a proprietary connector but the wireless USB stick that came with my DVD worked fine. It ran the 64bit liveCD no problem and installed perfectly to the hard drive. This version is 3.2.5,  has all the language packs, Zebra support and is a Z39.50 server. There is a Google discussion group at http://groups.google.com/group/kohalivecd

Next we set up Koha:

  1. run firefox and go to http://localhost/kohaadmin
  2. the username is kohaadmin and the password is kohalivecd
  3. we select en as the language
  4. the mysql database is koha running on port 3306 under user kohaadmin
The mysql root password is kohasqlpwd, we will install a mySQL client for database admin, although you can also use the web-based phpMyAdmin (http://localhost/phpmyadmin).

The public Z39.50 server uses:

  • port 9998 for bibliographic records with a database name of biblios
  • port 9999 for authorities with a database name of authorities

No username or password is required to search the Z39.50 databases.

Once the tables are populated it's time to set the configuration for Koha We select the MARC21 format for our records (see: http://www.loc.gov/marc/bibliographic/)
We select the following options:

  • Matching Rules for bibliographic records
  • Fast Add minimal record format (for ILL)
  • Simple MARC format (for multimedia)
  • Default values for departments, status etc
  • Coded Values
  • Z39.50 servers list
  • Sample patron types and categories
  • Sample Label and Patron Card data
  • Item Types
  • Sample Libraries
  • Sample News
  • Default Messages
  • Message Transports
  • Sample patrons
  • Sample Holidays and all the rest
The import process starts at 3:02 and finishes in under a minute. The next question is the indexer/search engine. Koha can use Zebra but it is a manual process to configure and to update. Since it is only required if you go over about 10,000 records and for doing demos on a laptop we don't need that many records we decided to skip Zebra for now.

Once installed we decide to test it out. Running a terminal and typing ifconfig procides us with the IP address of the koha laptop. First we test out the admin login by goint to http://192.168.1.114:8080/ and the staff client page is displayed.


Next we test out the OPAC by going to http://192.168.1.114/opac (which is running on port 8081) and the OPAC screen is displayed.



If you just go to the default port for the web server you get a message that:

This is the default web page for this server.
The web server software is running but no content has been added, yet.

This means you can create a library portal that incorporates a number of services or apps along with the library catalog in Koha. I've always wanted to show students how to install a CMS and then to create a portal that is linked to Koha.

To test out the Z39.50 we run Greenstone 2.84  and click the Download tab and fill in the z39.50 settings


Only problem is the Greenstone Z39.50 client seems broken again. It was working before as we had downloaded batches of 500 records from the Library of Congress LCDB database server (lx2.loca.gov:210).  A search for SQL in the book title would be @attr 1=4 "SQL", a search for books on php and mysql would be @attr 1= 21 @and mysql php and an author search for JK Rowling would be @attr 1 = 1003 Rowling,J.K. I'll have to try this in the lab where i think it was working correctly last term. See: Library Of Congress Z39.50

We decide to look for a standalone client and end up at http://www.biblio-tech.com/html/z39_50_clients.html which lists 5 clients and http://www.loc.gov/z3950/agency/resources/software.html which has a lot more information. We hit on the
Mercury Z39.50 freeware client which we download from http://www.basedowinfosys.com/projects/mzc in ZIP file format. Once installed we click search, database and it has goodly list of servers from Acadia to York. The Add button allows you to add a server. But there is no place to put the 9998 port number. There is a list of port numbers used but no 9998 and no way is indicated of adding a number although we suspect you could edit \Mercury Z39.50 Client\databases\ztargets.xml. We try anyway and as expected:

192.168.1.114
Result Count: 0
Records Returned: 0
Error Message: Connect failed (10000) 192.168.1.114

Then we try adding the port number to the address and we get:

192.168.1.114:9998
Result Count: 0
Records Returned: 0
Error Message: Database unavailable (109) Default

Which seems to indicate the connection was successful. We test against LC and it works and we export the results as a MARC file and view the .mrc file in MARCedit and it looks ok:

=LDR  00775nam  22002295a 4500
=001  13962025
=005  20050511163127.0
=008  050511s2006\\\\inu\\\\\\\\\\\000\0\eng\\
=906  \\$a0$bibc$corignew$d2$eepcn$f20$gy-gencatlg
=925  0\$aacquire$b2 shelf copies$xpolicy default
=955  \\$apc03 2005-05-11
=010  \\$a  2005927399
=020  \\$a0672328429 (pbk.)
=040  \\$aDLC$cDLC
=042  \\$apcc
=100  1\$aFells, David.
=245  10$aAdvanced MYSQl database programming /$cDavid Fells; [edited by] Shelley Johnston.
=250  \\$a1st ed.
=260  \\$aIndianapolis, IN :$bSams Pub.,$c2006.
=263  \\$a0602
=300  \\$ap. cm.
=963  \\$aVanessa Evans; phone: (317) 428.3211; fax: (317) 428.3310; email: vanessa.evans@pearsoned.com; bc: vanessa.evans@pearsoned.com

ToDo:
The thing to do now is to load up Koha with some records which means i'll have to refresh myself on how Koha works. I bought the packt "Koha 3 Library Management" book so will give it a read tonight.

Friday, September 23, 2011

Bootable USB Stick and Ubuntu 11


It's taken awhile but i've gotten to like 11.04 but there is one function from 9.04 that i truly miss. In the older version you could easily create a bootable usb stick by selecting System, Administration, USB Startup Disk Creator which automated the process.

That is now gone and the Startup Disk Creator just installs a bootable 'LiveCd' on your USB stick which is not the same thing. A google search reveals lots about installing Ubuntu from a USB but nothing much on installing a real system to a USB. Eventually i figured it out and the process is logical as it is the same as any manual install, but it takes more work than the old USB startup disk creator functionality.

In case someone has to do this here is how i did it. This process used an 8 gig usb stick and the 32bit desktop LiveCD for widest compatibility, a larger stick is better. I decided to create 4 partitions and to use all the space on the stick.

Boot a computer with the LiveCD. This requires your boot priority to have the optical disc 1st. If the Live CD does not boot check your BIOS boot settings (press DEL or F1 or F2 or F10 at startup to enter the BIOS)

When Ubuntu has started insert your USB stick and double-click the Install Ubuntu 11.04 icon

Tick the Install 3rd Party Software checkbox and click FORWARD

At the Allocated Drive Space dialog select the Something Else radio button and click FORWARD

This displays the drive partitioning tool which is used to manually set up Ubuntu. A single existing hard drive in the computer is listed as /dev/sda  formatted as NTFS. Your USB stick is listed as /dev/sdb1 with a FAT32 partition and a size of 8018mb


Select /dev/sdb from the Device for boot loader installation pull-down menu and then select your USB stick (/dev/sdb1) and click NEW PARTITIONTABLE to wipe out any existing data

You need to create the following drive partitions:

/boot which is the boot partition. This is where programs critical for booting the system reside
/ which is the root directory. Programs used for running the OS are installed here
swap which is reserved disk space for use as virtual memory
/home which is your home directory for storing files

Select Free Space under /dev/sdb and click ADD to display the Edit Partition dialog. Type 128 in the New Partition Size text box, select /boot from the Mount Point pull-down menu and click OK

Select Free Space under /dev/sdb and click ADD to display the Edit Partition dialog. Type 2000 in the New Partition Size text box, select swap area from the Use As pull-down menu and click OK

Select Free Space under /dev/sdb and click ADD to display the Edit Partition dialog. Type 3000 in the New Partition Size text box, select / from the Mount Point pull-down menu and click OK

Select Free Space under /dev/sdb and click ADD to display the Edit Partition dialog. Type 2891 (or whatever is the remaining space) in the New Partition Size text box, select /home from the Use As pull-down menu and click OK






Click INSTALL NOW to being the Ubuntu installation process

When the Who Are You? Dialog is displayed type in your full name and choose a name for your computer like gnickers, enter a username and a password and select the Log in Automatically radio button
Click FORWARD and Ubuntu is installed to your USB stick (this takes awhile....)
When complete Remove the LiveCD and press ENTER to restart the computer to the USB stick