Installation

In the current version Kura doesn't have a working setup program; it's a matter of installing the runtime bits, unpacking, installing the database and running Kura.



Installation guide for Unix

I assume that you have all the basic stuff ready: Python 2.0, MySQL (latest version!), MySQLdb, PyQt... Preferably a version of X11 that can handle Unicode fonts.

Installing is pretty much handwork, for now. Obviously, you've been able to unpack the archive in a directory. Well, put an environment variable KURADIR in your .profile, pointing to that directory. You can also edit the setkura script; and source that from your .profile or .bashrc.

Then you create a database for Kura. Until Taliesin finishes his port of dbObj to Postgres, you must use MySQL. This is not ideal: Kura does check for referential integrity, and since MySQL doesn't support that, it has to do it itself. Ok: create a database, with for instance, the name kura:

> mysqladmin create kura

Then load the database definition:

> mysql kura < datamodel/create_tables.sql

This should very quickly exit silently.

Now you can run the kura client. The first time you run Kura you must connect to that database, using the connect menu option. Afterwards, Kura will reconnect itself when you restart it.

You can load the sample configuration, but then your work starts. First enter users, languages, projects, set your defaults, and then start working on the lexicon, texts, scans and recordings!

You can start the webserver with the kurasrvr command. I think you will find that you need to edit the kuraserver/kurasrvr.py file to point to the right database.



Installation guide for Windows

Requirements

Step one: Getting and installing all the bits

Python

Python version 2.0 is required. Do not get the ActiveState version; get the real thing. Install this according to instructions. You probably need to be Administrator for this to work. Test whether Python works by starting IDLE from the Start menu. Don't be clever and move the installation directory around - even if you don't like it when things don't install in Program Files but in the root of your hard disk. Python comes to about 6 mb.

MySQL

Get the latest version, but at least 3.23.27. Get the standard binary install - unless you like a challenge, have a C compiler and want to do it compile it yourself - but why aren't you running Linux if you're that much of a hacker? MySQL weighs in at about 10 mb.

Just run the installer with Typical options. When installed, the install program just disappears, without saying something like 'Successfull install'. (If you deinstall mysql, the my.ini file in c:\winnt isn't removed.)

Now go to c:\mysql\bin with explorer and start winmysqladmin. Give any username and password that you can remember, like 'kura' and 'kura' - those are the names I'll use in the rest of the guide. A small traffic light will appear in your task bar - and it should be green. If not, read the MySQL helpfile. This hasn't got anything to do with Kura yet, so I can't help you with it.

The MySQL bindings to Python

This is a mere 300 kb. Extract it to some place, like c:\python-mysql . Installing it is a commandline affair: choose Start/Run and enter 'cmd'. (If your version of windows doesn't have cmd, type command .)

Some kinds of Windows let you type python at the prompt, without an explicit path. Others force you to give the whole path to python.exe.

Explicitly go, using cd (which means "change directory"), to the directory where you unpacked the MySQL-python zipfile. Please take care: version 0.3.0 unpacks in its own directory, but with the current version, 0.3.1 you need to tell winzip to use a directory.

cd c:\MySQL-python-0.3.0

At the prompt, give:

c:\python20\python setup.py install

Now start python, by typing at the prompt:

c:\python20\python

At the python prompt type:

import MySQLdb

If Python does't complain, things begin to look decidedly fine. Leave the dos box by typing:

exit

PyQt

Windows users don't have to download a separate version of Qt - it's included in PyQt. Go to the download section, and download the Windows binary. It's about 7 mb. This includes a full Qt binary dll, documentation and a gui designer program... Extract it to c:\, for instance. Maybe you'd like to read the readme.

Open a fresh dos box, as detailed above. Enter the following command:

xcopy c:\pyqt22\python20 c:\python20 /s

If you've got Windows 2000, close the dos box.

In the System Properties sheet from the Control Panel, go to the Advanced tab, and choose the Environment Variables button.

Add a new system variable QTDIR with the value c:\PyQT22. Add c:\PyQt22\bin to the PATH variable: remember, the separator is a semicolon.

If you've got an older Windows, like Windows 95, open your autoexec.bat file with notepad:

notepad autoexec.bat

Then add the following line to your autoexec.bat:

SET QTDIR=c:\PyQT22.

Then add

c:\PyQt22\bin

to the PATH variable, and reboot Windows.

Open a fresh dos box (no, reusing the dos box you used for installing PyQt won't work - it won't have the right PATH). Enter:

cd c:\pyqt22\examples

c:\python20\python application.py

A funny looking editor should now popup - if not, go and ask Phil Thompson, because it's still not Kura stuff we're installing here, and I'm not a Windows hacker.

Step two - getting and installing Kura

Kura

The latest version will give you the best chance of getting it to run. This is about 400 kb. Unpack the archive somewhere - it's a .tgz file, but Winzip can handle this Unixy format without problems. Just say 'Yes' to whatever Winzip asks you. I will assume that you have extracted it to c:\kura.

Installing the database

Right-click on the small traffic light and choose 'Show me'. Go to the database tab and right click on the root of the tree in the Databases panel. Choose 'Create Database'. Give the database a name - I always test with 'lng', but let's take 'kura' for this example. Right-click on the verbiage at the top of this window and choose 'hide me'.

Now we're going to install the tables Kura needs. Open a fresh dos box and enter:

cd c:\kura\datamodel

c:\mysql\bin\mysql kura < create_tables.sql

This should run without any errors. To check type:

c:\mysql\bin\mysql kura

and at the MySQL prompt:

desc lng_lex;

(Don't forget the terminating semicolon.) MySQL should spew out a description of this little-used table. Type

exit

to leave MySQL.

You can now install the default configuration:

c:\mysql\bin\mysql -f kura < config.sql

Don't worry about the messages telling you that tables already exist; that's perfectly all-right. Other messages might indicate problems; please mail me with the exact message.

Running Kura

If you're running an old version of Windows (i.e. before Windows 2000), you should probably reboot now.

As you have probably gathered, I'm a Unix person myself, so there are a few unixisms in kura that prevent it from running easily on Windows. To ease any problems, I've created a batchfile to start kura. Again, in a dos box do:

cd c:\kura

kura.bat

From now on, everything is plain sailing. First connect to the database: choose file/connect and enter just the database name: 'kura', press ok.

Now you can start entering data, playing around and reporting bugs. Please start kura from a dos box, and if you have a bug include all the output kura generates in that box when you report it.

Given the possibility that due to a network misconfiguration you cannot connect to your local computer without having an active internet connection, even the Kura server works:

cd c:\kura

kurasrvr.bat

And then, in Internet Explorer or Netscape go to:

http://localhost:8000

If you have any problem in installing Kura, please make sure first that you have all the required pieces; then do not hesitate to mail me, and I will try to help you as best I can.

Have fun!



Previous: Introduction | Next: Principles | Table of contents