Making the Debian machine koha-ready

DNS registration

As part of the course, Thomas offers you a DNS service. When you have a server with a static IP address you mail him the IP address and a hostname that you would like to use for the server. The server will then use the name hostname.openlib.org. In addition, you will get two more DNS name koha.hostname.openlib.org and koha-staff.hostname.openlib.org. This document writes that hostname as hostname, just substitute your chosen hostname for it when you see the word appeaaring here.

Setup of required packages

Thomas Krichel has already some configuration for the sources list and for the packages to be installed. The sources list is a special file to be installed, the other is a file with aptitude commands, requesting the installation of packages.
Let us make sure we have the software package that provides the GET command
hostname:~# aptitude install libwww-perl␍
Edit /etc/apt/sources.list to make sure that you use the testing version of the operating system. For each line in that file that starts with
deb URL version
where URL is a URL and version is a word, make sure there that version is “testing”.
Update the packages list.
hostname:~# aptitude update␍
If this shows an error don't worry about it. Let us upgrade the packages
hostname:~# aptitude upgrade␍
I have prepared a script that will call aptitude to install all the required packages, and may some more. Let us get the script, place it into the home direcory of root.
hostname:~# cd ; GET http://dlib.info/home/krichel/courses/lis508/configs/get_debian_packages_for_koha >  get_debian_packages_for_koha␍
This command does not generate any output.
You can look at the file's contents with
hostname:~# cat get_debian_packages_for_koha␍
You can look at its contents in paged form with
hostname:~# cat get_debian_packages_for_koha | more␍
Or you can look at its contents in paged form with
hostname:~# less get_debian_packages_for_koha␍
If you use less, remember that u gets you up a screen and2 that q quits.
The file is a sequence of calls to aptitude, the package manager, to request the installation of a particular package, one package per line. We can execute the file as a bash script
hostname:~# bash get_debian_packages_for_koha␍
Now comes the hard part, the installation of the packages themselves. For many you see something like
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information       
Initializing package states... Done

Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following NEW packages will be installed:
  foo bar
0 packages upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get numberkB of archives. After unpacking total_digitskB will be used.
Writing extended state information... Done
Get:1 http://mirror testing/main foo foo_version [digitskB]
Get:2 http://mirror testing/main bar bar_version [digitskB]
Fetched total_digitskB in 0s (digitskB/s)
Selecting previously deselected package foo.
(Reading database ... large_number files and directories currently installed.)
Unpacking foo (from .../foo_version_i386.deb) ...
Selecting previously deselected package bar.
Unpacking bar (from .../bar_all.deb) ...
Processing triggers for man-db ...
Setting up foo (foo_version) ...
Setting up bar (bar_version) ...
Package foo has been requested. To run foo you also have to install bar.
If you see a warning message of the form
WARNING: The following packages cannot be authenticated!
foo moo boo
...
 Install these packages without verification [y/N]? y␍
Here we just continue by pressing y rather that the default, n.
For some packages, you probably see a pop-up screen with a menu-driven set of configuration options for the first package to preconfigure. Use arrows, TAB and ENTER to navigate. Usually the default choice is the one you want. If you see errors of the form
Errors were encountered while processing:
/var/cache/apt/archives/foo.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
we have hit a problem. Sometimes, it can be fixed by starting again. At other times one need some intuition. It may help to put the error message into Google. Ask Thomas Krichel to help you.

Common configuration screens

Checking the locale

We have to make sure the locale is a UTF-8 locale.
hostname:~# locale␍
Assuming you have chosen to run your server in US English, you should see
LANG=en_US.utf8
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
If you don't you have to reconfigure the locales.
hostname:~# dpkg-reconfigure locales␍

Valid XHTML 1.0!