Wednesday, August 20, 2008

LAMP

I had been looking at setting up a LAMP development environment on Ubuntu as i use Wampserver on windows. Setting up lamp on the desktop version turned out to be more complicated than i imagined as there is no 'lamp' package. The server version has lamp running but getting the GUI installed was also more complicated than anticipated.

I did get xampp running on the Ubuntu desktop but then decided to rethink this a bit. I'm teaching a course in the winter and want to use LAMP but the IT department has made it difficult, so i've been researching wamp stacks that can run without being installed. Although the number of mac and linux students has gone up most students are using windows and the lab computers run only windows.

The other problem is i need to do some maintenance on an old application written for php4 and mysql4 that does not run on php5 so i need a lamp stack that can be 'downgraded' (sort of like vista). Xampp does this but the windows version has an installer. I do like the stuff it bundles such as webalizer but the security settings on the computers will not allow students to install. Hmnn - the Zip version does not seem to require an install - you just unzip and run a batch file. Let's try this out.

We go to the XAMPP home page at :
http://www.apachefriends.org/en/xampp-windows.html#641
and find the windows zip download which is about 88 mb.

Basically it looks like you unzip the files to a folder of your choice. This means it can be on an external drive, internal hd or a usb stick. If this works then our windows and linux development environments would be similar.

Once downloaded we extract the XAMPP folder from the archive to our E:\ drive which happens to be an external HD. We also copy the XAMPP folder to a USB stick.

The next step is to change to the XAMPP folder and run the setup_xampp.bat script which updates the configuration files with the path of the current location.

For the external hd that would be e:\xampp - the question is what about the USB stick? Since windows uses drive letters as mount points and assigns them based on the hardware in the machine the USB stick is mounted as drive G: in my configuration but will be drive E: or F: depending on which computer lab the students are in. We will have to see if this causes a problem - they may have to run setup_xampp.bat for each location change.

To test we will run the setup on G: and then move the stick to another machine and test if out there.

For now we open a terminal session by going to Start,Run and typing:

cmd
cd \xampp
dir *.bat

and we see the setup_xampp.bat file so we type the filename to run it. It generates a couple of messages and we are done.

Testing it Out

Back in the windows GUI we first run the port checking utility called xampp-portcheck.exe which shows if your port are free and we see the http ports 80,81 and 443 are free along with the mysql 3306 and ftp at 21 and the email ports of 25,110 and 143.

Next we run the xampp-control.exe utility which is the XAMPP Control Panel. This lists the current directory as c:\xampp but warns that there is a directory mismatch with the install directory. Not sure - will investigate later.

We click START to get Apache running. Green text indicates it is up. Next we START mysql. We do not start the filezilla FTP server or Mercury email.

Runing Firefox we goto http://localhost first and get the XAMPP splash screen. We click on English and the home page is displayed.

The Status menu item shows what is running and the standard phpinfo() entry shows that PHP version 5.2.6 is running. We have to figure out how to 'downgrade' to version 4.

One of the neat things about XAMPP vs other standalone stacks is that it ships with a number of demo applications such as a CD Collection app which can output the record list as a PDF document.

The next step is to bring over the files from our application which raises the question of where it should go. Looks like all content goes into XAMPP\htdocs so we will copy our folder to there.

We then stop and restart Apache just in clase, although we probably could have just entered the http://localhost/folder where folder is the one we just copied over. We run update.php and the application is displayed - of course most of the objects don't work as the database tables are missing. So our next step is to export the mysql tables and data from the old app and re-create it here. This gives us an idea. We are big fans of Navicat (http://www.navicat.com/) as a gui tool for mysql so we fire it up and create a connection using localhost as the IP address with a username of root and no password as this is the default insecure XAMPP setup.

The connect runs and we are able to see the databasees and tables. We create a new database as the target for our sql data transfer. One of the neat things about mysql and other sql databases is that you can replicate them with ease.

First we open a VPN connection to the server. This is not required by mysql but our IT folks don't allow any connection from the big, bad internet. Now we open a mysql connection to the mysql server and start to transfer some databases.

In Navicat this is as easy a creating a blank target database on your machine and then selecting Tools, Data Transfer from the menu and choosing what tables to bring over.

Unfortunately the data transfers fail. Why? We have done this a hundred times but not with the new VPN. Let's try another server that is not behind a security blanket. Of course it works like a charm. Is the server the problem or is it that fact the one server is running the latest version of mysql (5.x) while the other is running 4.x? and i am running an older version of the navicat tool? WE could test this out by downing a trial version of the latest client and trying a data transfer.

We do see a timeout on the server behind the firewall - we get a cannot connect message (nothing to do with a torrent of traffic...:) - in fact our transfers of the wordpress and wiki databases go really quickly so it is not a bandwidth issue. Error message is

"2003 - can't connect to mysql server on host (10060)"

We goto the navicat home page and download a 30 day trial of the new client. And that solves the problem - the move to mysql 5 breaks some older sql tools. We were able to transfer the databases with ease, even the large AOL queries database.

The server is 5.1.22 while the working one is verions 4.0.20. At least we were able to get the tables and data transferred over to the laptop. Now we have to set up the user for the database so the pages can connect.

We then use the updated client to data transfer the databases to the older machine and we are ready to get to work.

Ok we added the username for this database along with a password and restricted it to localhost and tested the app and it can read the database. So now it's maintenance time!

Just discovered something neat about WAMPserver - you can select PHP or MYSQL while it is running and choose Version, Get More and download older versions such as php4 or mysql4 and then choose then when you start up the service. Of course, you also have to 'downgrade' apache as the latest version does not work with php4.

Excellent! I can do the changes to the appz without having to figure out where they need to be updated for 5!

As usual it is a little more complicated than that as the versions i selected did not work together so i decided to replicate the existing environment as closely as possible using:

Apache 2.0.49
PHP 4.1.2
mySQL 4.1.20

Ok and we run wampserver again and the services start this time but the page gives errors - probably the modifications i was doing. Let's undo and see.

Nope - its the change in mysql - all the databases are not there in the other version. So we either have to replicate them between versions or....let's restore ver 5 and see what happens.

Cool - we closed the sql connection to localhost and changed to ver 5 in the wamp control panel and re-opened the mysql connection and all the databases are there. This lets us run a quick test.... the login page returns database errors:

Warning: mysql_connect() [function.mysql-connect]: Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\wamp\www\perl\login.php on line 17

Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\wamp\www\perl\login.php on line 21

Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in C:\wamp\www\perl\login.php on line 21

So lets try another test by changing the php version back to 5 and reload the page. Now it loads the page correctly but the data is not read and displayed from the database. However, that was with mysql 5 and php 5 so now we test by backing off mysql to ver 4.1.22 which results in the same errors.

So we need to change mysql version to 4.1.20 and those error messages go away. So let's replicate the database.

The problem was the Navicat tool we purchased back in 2004 cannot do a data transfer between a mysql 5 database server and a mysql 4 database server. The solution was to goto to the mysql 5 server and to dump each table to an SQL file over the network to the mysql 4 server and then to execute the .sql file to recreate the tables and load the data. This is basically the same method you can use to do a backup or a data transfer. SQL is so flexible and since the files are ASCII text you can even edit them or send them by email or whatever. It looks like this:

/*
MySQL Backup
Source Host: localhost
Source Server Version: 5.0.51b-community
Source Database: perl
Date: 2008/08/21 14:15:22
*/

use perl;
SET FOREIGN_KEY_CHECKS=0;
#----------------------------
# Table structure for authors
#----------------------------
CREATE TABLE `authors` (
`Author_ID` int(11) NOT NULL auto_increment,
`Fname` varchar(20) NOT NULL default '',
`Lname` varchar(40) NOT NULL default '',
PRIMARY KEY (`Author_ID`)
) ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;
#----------------------------
# Records for table authors
#----------------------------

insert into authors values
...

Ok - let's see how it works - no joy here. No errors - we connect to the database ok but the data is not read and displayed from the table. Why?

We decide this is the long way around so we find the old windows server which used to run things and plug it in. RODAN comes up fine for an ancient dual PII/512mb/scsi box. The old username and password gets us into the database but of course the version is too old for a direct data transfer from Navicat. We try to run the batch .sql files we used earlier but they also contain newer sql so we edit them to delete the charset statement. We then run the sql files and to create the database tables and insert the records. We now have the database and we create the user and copy over the files.

Now to test - we open Firefox and goto Rodan and run the application and viola! - finally some joy - the application gets it data from the database and displays it. WE figured it would work as this is the machine we developed the application on originally. The working versions are:

Apache 2.0.52
mySQL 4.0.18
PHP 4.3.9

These are not far off what we were trying to do on the desktop with Apache 2.0.49, PHP 4.1.2 and mySQL 4.1.20 so why the database does not work there remains a mystery.

At least a matching dev environment is up and running so the maintenance can begin...but after lunch.

Monday, August 4, 2008

Backup II

We had looked at backup options some months ago but nothing really seemed to fit. What we wanted was something similar to time machine for OSX - a backup that would not lose anything and would run to an external drive that could be restored in case of hard drive failure. We also have a backup motherboard and backup cpu's in case of real disaster. What we don't want to lose is the countless hours getting our system just right.

This has always been a problem on windows machines - you just get the machine set up right but when you upgrade or buy a new machine you have to spend so much time reconfiguring and re-installing.

Well last week we read about a program called flyback that seems to do the same things as time machine. The project web site is at: http://flyback-project.org/

It is a google code project and there is more info at http://code.google.com/p/flyback/ including some install instructions. It is not in the ubuntu repositories so you have to get it. Off to the terminal we go.

$ sudo apt-get install python python-glade2 python-gnome2 python-sqlite3 python-gconf rsync

which works. We already had most of the packages installed except for python sqlite. Now we do:

wget http://flyback.googlecode.com/files/flyback_0.4.0.tar.gz

Resolving flyback.googlecode.com... 209.85.173.82
Connecting to flyback.googlecode.com|209.85.173.82|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25,616 (25K) [application/x-gzip]

100%[====================================>] 25,616 135.79K/s

14:54:03 (135.06 KB/s) - `flyback_0.4.0.tar.gz' saved [25616/25616]

Now we do:

tar -zxvf flyback_0.4.0.tar.gz

to extact the compressed files from the archive. It extracts the following:

flyback/
flyback/flyback.py
flyback/backup_backend.py
flyback/viewer.glade
flyback/GPL.txt
flyback/config_backend.py
flyback/opengl_viewer.py
flyback/desktop.py
flyback/help_data.py

Now we change to the flyback directory and fire it up as a regular user (not as root) with:

python flyback.py

and the result is an error when the GUI runs:

The folder contents could not be displayed
error accessing 'file:///external_storage_location': File not found

Ok so now we do some digging. BTE it would be useful if the gui installed a menu entry under system. Looks like the error is not a problem you just have to change the default configuration under preferences. It suggests an external drive so we pull an 80gig usb drive out for a test run.

The drive mounts but it is a mac HFS+ partition that was used as a temp backup for the macbook when replacing the drive. So we should probably reformat this as an ext partition. On windows this can be done with partition magic. On linux the similar program is qparted which is installed. So we run it. The mac drive shows up as dev/sdc2

So we unmount the volume. We reformat the partition as ext3 and commit the changes. so we now an external vol called backup.

Returning to the flyback gui and in the Storage Location tab set the backup location to the external hard drive. Then in the Included/Excluded directories we select the filesystem which puts a / in the window pane. We could select our home folder if all we wanted was a document backup but we are interested in a complete backup. We leave the excludes along, assuming it is a reasonable setting.

Finally, in the schedule tab we tick the automatic box and click OK. In the flyback main window we click on backup to start the process. Backup is now running....


We'll come back later to see how it is going.

A good article by Falko shows how to do all this. See:
http://www.howtoforge.com/creating-snapshot-backups-with-flyback-ubuntu-7.10

Friday, July 11, 2008

LAMP on Ubuntu


I built a new server for home use (dual cpu's, u160 scsi controller with scsi drive plus an ide hd and 2 gig of ram) but it locks up when grub starts. My theory is the mix of scsi and ide drives is the problem so i hope to pull the ide drive this weekend and start again).

The idea is to install the server distribution but then to add the desktop gui on top. So we added an Nvidia 64mb video card, the 4xxx series. One neat thing about this machine is it using my 1984 Model M full-size IBM keyboard, yes the one with the clack clack keys. I used it daily until i bought a new wooden computer desk with a smaller keyboard tray so i switched about 7 years ago to the Model M small size version which i've been using daily since. I have a backup small one and a backup large one. There is a web site devoted to the model M somewhere - the best keyboard ever made.

However, since that project is temporarily on hold that gives me an change to try the reverse - to install a LAMP environment on the ubuntu desktop. This is trivial on windows or a mac thanks to the MAMP and WAMP binary packages but it is more difficult on linux. Ironic that the most popular development environment is hard to put on a linux desktop. You basically have to download and install/configure the separate components - Apache, PHP, mySQL.

We have been experimenting with the LAMP stack running on a USB stick (server2go) to get around the IT department. So i looked around and found a similar package for linux called xampp.

Downloaded the xampp-linux-1.6.6.tar.gz package to the laptop and extracted the lampp folder to my home directory and read the releasenotes. You get Apache 2.2.8, mySQL 5.051a, PHP 4 and PHP5 along with phpmysadmin, sqlite and a bunch of stuff. As usual with some OSS there are no directions - you have to figure out what to do.

There is a shell script named lampp so we open it in a text editor to check for documentation. It looks like this script stops and starts xampp. We assume you need to be root to do this! So we have to open the terminal and do:

sudo ./lampp

Let's give it a whirl. We run Applications, Accessories, Terminal and then do cd lampp and sudo ./lampp

The results is a list of options that need to be included such as:

start - starts xampp stop - stops xampp startmysql - starts only mysql php4 - activates php4 instead of php5 panel - starts graphical xampp control panel

Ok let's try the GUI. We do sudo ./lampp panel and get an error message about no such file or directory. Perhaps the gui is not installed?

So let's try starting lamp. Similar result - lots of error messages no such file or directory. Looks like it is searching for /opt/lampp so maybe it has to be installed there? Would be nice to have some documentation with the package. Looks like we have to goto the project home page.

Off to the web we goto http://www.apachefriends.org and find the documentation for Xampp and there is a FAQ for Linux. Lots of information on upgrading but this is a new install. Ah, we see an article by Nils-Erik Frantzell on installing. A few years old but might be useful. He suggests:

tar xvfz xampp-linux-1.4.7.tar.gz -C /opt

Obviously we change the file name to 1.6.6 but the /opt information is useful as we suspect the XAMPP needs to be there. He also confirms that ./lampp start is the way to go. We also see an article by Dalibor Dvorski on installing. Let's check it out. It's a pdf so we have to temp enable scripting for his site to download the file. This is more recent (2007). Unfortunately it uses Windows. However, it contains useful info on using Xampp which might be handy for the class.

So back to the terminal to do:

sudo tar xvfz xampp-linux-1.6.6.tar.gz -C /opt

And success - the files are now all extracted to the correct locations. Nothing helps like documentation! Many IT people forget that the specific knowledge they have acquired is not shared by all (particularly as they don't document) and they are constantly amazed by this fact.

Anyway - lets try out the GUI again. We do cd /opt/lampp to change to the xampp folder and there we try sudo ./lampp panel and get an error trying to execute the python program xampp-control-panel.py on line 21. Looks like an undefined symbol. So we do:

sudo ./lampp start

and get the message that apache has started with php5 and mysql and proFTPD. We fire up Firefox and goto http://127.0.0.1 (we could also use localhost) which is the address of our laptop and the Xampp home page is presented.

There is a nice menu on the side with a STATUS page and the phpmyadmin tool as well as a phpslqlite tool. I like the inclusion of the webalizer web log tool and the demo applications that ship with the package. Very nice - will have to consider moving to this for the winter course instead of server2go. Which means we have to test out the windows version as the IT dept is microsofties.

Time for some lunch so we do sudo ./lampp stop and everything comes to a nice halt. Impressive package - poor instructions.

The xampp homepage is http://www.apachefriends.org/en/xampp.html

PS - it turned out the problem with the lamp machine was not the ide vs scsi boot issue but that i forgot there were 2 scsi controllers and i was setting the scsi id of the boot drive on the wrong controller. What threw me off was the ubuntu found the scsi drive and installed ok but the system could not find the drive at boot time. Once i fixed that problem by removing the 2nd scsi controlled the system booted fine to ubuntu server. We have a number of tasks to do here - fix samba to use our network instead of the default workgroup, plus adding the users and install the desktop gui plus some GUI server management utilities for apache and mysql.

Ok - finally back to this. At the $ prompt we did:

sudo apt-get install ubuntu-desktop

and after entering the root password the install was underway. oops it stopped with an error, "unable to fetch some archives". So we do:

sudo apt-get update

Ok it's done. Been a long time since i've done this - i think startx used to start x windows and we may have to change the runlevel to get it to load at start. That takes me back to redhat 5 which is still around here somewhere. Hmnn it say xinit has not been installed. So we sudo apt-get it and it installs.

xinit aborts saying there is no X11 directory. Obviously the desktop depends on having x plus a window manager etc - you might think these dependencies get installed with the desktop but it looks like not. We may have to spend some time researching how to install the gui onto the server version.

Thursday, June 12, 2008

Web Mockups using Qt Designer

I teach a course in web usability and have been using a number of tools for the mockup assignments. We have used Visio, Denim, Mockup Screens and even PowerPoint! at various times but nothing has really worked well. I had taken a quick look at the osx development environment with the idea of demonstrating it as a UI builder.

This led me to looking at Ubuntu tools for designing user interfaces. We found Qt Designer and Glade and so installed them both.

First up was Qt Designer from Trolltech which was a blast. It has most of the widgets you want and an easy to use interface. Nice piece of work. The other neat thing is when you preview your form, not only to the widget work, but you get to choose which window manager look you want. We mainly choose windows and the result looks and acts like the interface you wish to demonstrate. Here is a silly example done in about 2 minutes just to get an idea of what could be done.

The end result is something you can demonstrate to end users so they can get an idea as to how the controls will work in the interface, so you can do usability testing on the design before starting the work of building the damn thing.

The linux version is really snappy and produces a nice looking form. However, our department is microsoft-centric so i needed to find a windows version, preferably free. It appears there is an older non commercial version which i downloaded from here. The Getting Started manual is on the Trolltech web site.

Tomorrow: install the windows version and see if it is any good.

BitTorrtent on Ubuntu

Today we decided to test out the BitTorrent peer-to-peer (P2P) protocol. BitTorrent has gained great popularity as a fast way to distribute large files - much quicker than using http or ftp to download from a web site. For example, I regularly download linux distros in .iso format for keeping and eye on what's new. There is a lot of innovation going on and this is a good way to find out. But it is time-consuming to download .iso files and vmware files - which are the other large files we regularly obtain. In fact, some sites ONLY make files available as torrents so you need to do this.

The official client is available from the BitTorrent site and is at release 5.2.0 (Linux). However, the synaptic package manager includes Transmission, a bittorrent client so we decide to try it out.

Transmission - Transmission is a simple BitTorrent client. It features a very simple,
intuitive interface (gui and command-line) on top on an efficient,
cross-platform back-end.

Installed with package manager and it places a Transmission menu item on the applications,internet menu. When you run the program it provides a simple interface. Select Torrent, Open and select a.torrent file that you downloaded from a web site. A torrent file (to quote from wikipedia)
...contains metadata about the files to be shared and about the tracker, the computer that coordinates the file distribution. Peers that want to download the file first obtain a torrent file for it, and connect to the specified tracker, which tells them from which other peers to download the pieces of the file.
In the screenshot you can see i am downloading Nostalgia, a vmware appliance to create a DOS virtual games machine with CD support.
See: http://www.vmware.com/appliances/directory/126.

It can use openDos but i have my original ms-dos floppies and even a sealed in plastic retail copy so I'll use those. I first unpacked the nostalgia.zip archive and extracted:

dos.nvram
dos.vmsd
dos.vmx
DR-DOS-1.vmdk

to a folder in my home directory. The question is - where do the VM's go? Ok we will see if it can be done from the home folder. From the menu we select Applications, System Tools, Vmware Server Console. It tells us an update is available from http://www.vmware.com/info?id=504

Tomorrow - vmware with nostaglia?

Update: I am really liking Transmission and i also discovered the devede can take most of the downloaded video files and turn them into regular dvds. I had used Roxio in the past to do this and it performs quite well. However, that program is windows only and it is a pain having to copy the large files over the network to the last windows machine (a shuttle XP).

Friday, June 6, 2008

Package Manager Problems

I've been busy trying out new programs and adding repositories and today the synaptic package manager stopped working. It would run and then disappear.

I did a quick test by opening a terminal and issuing the command:

sudo apt-get update

which resulted in an error message

Segmentation fault (core dumped)

which is serious. So did some digging around the net and found there is a bug that exhibits the following behavior:

  • Apt-get update starts to update then runs out of Cache-Limit space
  • This corrupts some files in the /var/lib/apt/lists folder
  • Next time you run apt-get it exits with a core dump error
The solution was to first back up all the lists by copying the folder to a safe location. Then i used the following command to delete the files:

sudo rm /var/lib/apt/lists/* -vf

Deleting the lists folder removes the corrupted files but there is still the Cache-Limit problem. The next step was to increase the default cache used by the package manager. This was done by editing the configuration file in /etc/apt/apt.conf.d with the following command:

sudo pico 70debconf

and inserting a new line with:

APT::Cache-Limit "118388608";

and saving the file. We then did:

sudo apt-get update

which recreated the lists. We were now able to run the synaptic package manager. For more details see the excellent post by Ray Ward at:

https://bugs.launchpad.net/ubuntu/+source/apt/+bug/113424

Thursday, June 5, 2008

Greenstone on OSX



The idea is to test how the Greenstone digital library software works on version 10.5 of OSX as there were issues with greenstone the last time i tried it on osx some years ago.

Greenstone has two dependencies, you must have a java virtual machine installed as well as the open source imagemagick software. OSX comes with a JRE already installed, unlike windows where it has to be downloaded and installed by the user.

Next it is off to http://www.imagemagick.org to download the apple osx binary which has a version for tiger (10.4) and leopard (10.5). The 10.5 package is downloaded.

We then goto http://www.greenstone.org and on the downloads page get the osx binary.

Once the files are downloaded we created a folder called ImageMagick in the Applications directory and dragged the ImageMagick-univeral-apple-darwin9.3.0.tar.gz file to that folder.

Next we navigated to the Applications, Utilities folder and double-clicked on Terminal

At the gnickers$ prompt we issued the following commands (pressing Enter after each command):

cd Applications
cd ImageMagick
ls -al

You should see the file ImageMagick-universal-apple-darwin9.3.0.tar.gz

Now we type the command tar xvfz ImageMagick-universal-apple-darwin9.3.0.tar.gz and press enter. A whole bunch of files are extracted into a folder called ImageMagick-6.4.1

We then set the MAGICK_HOME variable to the folder by typing the following command:

export MAGICK_HOME="/Applications/ImageMagick/ImageMagick-6.4.1"

Then we set the path to include the bin directory holding the executable files:

export PATH="$MAGICK_HOME/bin:$PATH"

Then we set the download path with the following command:

export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib"

Now comes the test to see if this actually works. We issue the following commands, pressing enter after each one:

convert logo: logo.gif
identify logo.gif
display logo.gif

Success, we see the ImageMagick logo open in a window. So now we can process images in greenstone which is the next task.

We return to the downloads and double click on gsdl-2.80-macOSx.tar which extracts the files from the archive into a folder called gsdl-2.80-macOSx. Inside the folder is an installer called setupMACOSx.command so we double click on it.

A warning message appears about his being a script that was downloaded from the Internet. We click on OPEN. Just like the windows installer it begins searching for a java virtual machine but unlike the windows version it actually finds it and the install begins.

We select a language, click Next, accept the license agreement and it installs to /opt/greenstone. There is a major difference here that with the windows version which has a local install that setup up a mini-web server that only responds to localhost requests. The OSX version is a web library version that requires the apache webserver. This is interesting as the machine i am installing on is running OSX 10.5 Server edition so all it already has a web server. However for users of the desktop version this is usually not the case.

However, there is an excellent MAMP package for osx at http://www.mamp.info which i have used before. This is a big step tho - would the average user wanting to run greenstone be also willing to install a full web server? It certainly would be interesting and also allow OAI harvesting...

There is also a Custom option. This seems to have the same settings that are the default on the windows version, the librarian interface, the web library, plus the export to CD/DVD and the demo collection.

We choose the Custom option and click Next, Next and then click Install. It does not look as if the custom option installs a web server. The file /opt/greenstone/library.txt indicates that greenstone is setup to expect /opt/greenstone to be at http://localhost/gsdl and the greenstone cgi directory at /opt/greenstone/cgi to be accessible as a cgi executable directory.

This means you must edit the apache webserver configuration file which is http.conf and add the following directives:

ScriptAlias /gsdl/cgi-bin"/opt/greenstone/cgi-bin"
Options None
AllowOverride None

Alias /gsdl "/opt/greenstone"
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow.deny
Allow from all

Once this has been saved and the web server restarted you can then access Greenstone by pointing your web browser to:

http://localhost/gsdl/cgi-bin/library

Since we don't really intend to run greenstone on osx we will stop here. We might work at getting it installed on Ubuntu and will certainly have the students test out and document the web server install next term for the internet services course.