> Linux-Kontor ( Redhat - Debian / PostgreSQL ) Install HOWTO
Ron Atkins
Maintainer and Redhat specific instructions
theotiwii@earthlink.net
Steve Doerr
Debian specific instructions
sdoerr@swbell.net
Copyright © 2000 by Ron Atkins
License
This document is free; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or any later
version.
|
Table of Contents
1. [1]Conventions
2. [2]Introduction
3. [3]Before Getting Started
4. [4]Collecting the Required Programs
[5]Retrieving Linux-Kontor 13
[6]Retrieving PostgreSQL
[7]Redhat users
[8]Debian users
[9]Retrieving Java Runtime
[10]Redhat users
[11]Debian users
[12]Retrieving Java's Swing
[13]Retrieving JDBC Classes
5. [14]Installing the Required Programs
[15]Installing PostgreSQL
[16]Installing Java Runtime
[17]Installing Java Swing
[18]Installing JDBC Classes
[19]Installing Linux-Kontor (13)
6. [20](un)Common Errors
7. [21](in)Frequently Asked Questions
8. [22]Contributors
List of Tables
3-1. [23]Required Redhat files
3-2. [24]Required Debian files
5-1. [25]Swing Demo Programs
5-2. [26]Java Tools
5-3. [27]Java Time Zone Chart
5-4. [28]Editing ..etc/kontor.server
5-5. [29]Editing ...etc/kontor.client
5-6. [30]Editing ...bin/kontor.server
5-7. [31]Editing ...etc/kontor.client
5-8. [32]Editing .../kontor.create.sql
7-1. [33]Default Numbers
_________________________________________________________________
Chapter 1. Conventions
The following document uses lots of conventions, like
Warning
Warnings
Tip: Tips
Caution
Notice
Important: Important
program listings...
* Emphasis...
* Commands...
...and other confusing stuff, good luck!
_________________________________________________________________
Chapter 2. Introduction
The following HOWTO covers the installation of Linux-Kontor 13 on a
Redhat Linux 6.x platform using PostgreSQL 6.5.3.
WAIT! Steve Doerr, a Debian user read this and MODIFIED it to include
(guess) Debian ! He also added a number of hints, fixes and other
necessary house keeping to make this document useful. Thank you Steve,
I trust those that use this document share that gratitude.
Users of other systems may benefit but your mileage may vary. The
platform specific part seems to be PostgreSQL . If you have a system
different from that described and can manage the PostgreSQL setup (and
I give abundant advice) then the rest of this document might be
helpful.
Use this HOWTO at your own risk, etc., etc. I've only recently
succeeded in getting Linux-Kontor running myself, if that don't tell
you something then you ain't listening. I have no connection with the
IoS group, the originators of Linux-Kontor so don't blame them if you
think this document sucks, write your own :-) The following is broken
down into the individual steps. If you can put a check mark next to
each step I'm confident of... nothing, but at least you'll have a
pretty document with check marks.
Before beginning, I would like to thank the folks behind
[34]Linux-Kontor for the product and for releasing it to the public.
Also, thank you to the members of the [35]Linux-Kontor Mailing List
who patiently stuck out and answered my questions, couldn't and
wouldn't have done it with out you.
Some of you reading this may prefer the concise version of the
install. Several installation guides, FAQ's and advice can be found on
the [36]Linux-Kontor site, feel free to wander around and look at the
merchandise.
Did I already include that all trademarks mentioned in this document
are the property of their respective owners? (I don't what 'em...) Now
we start...
_________________________________________________________________
Chapter 3. Before Getting Started
This install covers the installation of Linux-Kontor 13 with platform
specific notes for Linux (glibc) Redhat (6.x) and Debian (2.x)
platforms and uses PostgreSQL 6.5.3, and Java 1.18. There are some
reasons to use the versions mentioned but there are always those who
don't. Except for Linux-Kontor 13 you should be able to fudge through,
but these directions become less helpful the further you deviate.
Linux-Kontor 13 is the latest. You can probably use older versions of
Java but not the new one (1.2, yet... Linux-Kontor has not been
converted). I believe Java 1.1.8 is the stablest, why use less.
I make these assumptions:
* You will be using a bash shell. [37][1]
* Your display variable is set to your screen ("export DISPLAY=:0")
for any user you will become (I will point this out if it becomes
necessary). [38][2]
* You have access to the ROOT user. [39][3]
* You have available disk space.
Table 3-1. Required Redhat files
File Name Size
kontor 13.all.tgz 11,127 K
postgresql-6.5.3-3.i386.rpm 2,318 K
postgresql-server-6.5.3-3.i386.rpm 594 K
jdk118_v1-glibc-2.1.2.tar.bz 13,930 K
re118_v1-glibc-2.1.2.tar.bz 5,613 K
swing1_1_1.tar.Z 17,249 K (may be reduced to 2,420 K)
Total in compressed files 50,831K (- 17 MB ?)
Table 3-2. Required Debian files
File Name Size
kontor 13.all.tgz 11,127 K
postgresql 6.5.3-12.deb 665.3 K
postgresql-client 6.5.3-12.deb 83.2 K
postgresql-contrib 6.5.3-12.deb 87.5 K
postgresql-dev 6.3.2-15.deb 150.1 K
postgresql-doc 6.5.3-12.deb 2,120.1 K
postgresql-pl 6.5.3-12.deb 59.6 K
jdk1.1 1.1.7v3-2.deb 5,223 K
jdk1.1-native 1.1.7v3-2.deb 1,372.4 K
java-common 0.2 25.1K
jde 2.1.1-4 229.6 K
re118_v1-glibc-2.1.2.tar.bz 5,613 K
swing1_1_1.tar.Z 17,249 K (may be reduced to 2,420 K)
Total in compressed files 44,004.9 K (- 17 MB ?)
* You have your networking up and running. [40][4]
* You know upper and lower case characters make a difference on a
Linux system, and errors result when "commas" are used instead of
"periods," "ohs" instead of "zeros" and lower case "ells" instead
of "ones"!
* You know that Linux / Unix expects a predetermined [41]FSH (File
System Hierarchy). Right, "dis ain't DOS," in Linux / Unix each
file has a home. Naturally, we all read the specifications
differently, but NOT SO DIFFERENTLY that we comparatively look
like IDIOTS! So, either read up on the [42]FSH or use my
suggestions. Yes... putting Linux-Kontor directly off your root
file system is a bad thing!
_________________________________________________________________
Chapter 4. Collecting the Required Programs
Retrieving Linux-Kontor 13
Go to the [43]Linux-Kontor - Download, Installation site and follow
the directions for downloading (Build 13 has 4 choices. We select "All
Packages" if you chose something different your mileage may vary). The
file is 11,127 K and is called kontor-13.all.tgz. (The adventurous
sort may with to visit the [44]Linux-Kontor FTP site)
_________________________________________________________________
Retrieving PostgreSQL
For those using the source, follow along the Redhat path and deviate
once you get what you need, meet up with the rest of us at [45]the
section called Retrieving Java Runtime.
Important: The PostgreSQL 6.3.2 version database is incompatible with
version 6.5.3. Be VERY careful if you have data in a 6.3.2 database
and read the documentation if you are upgrading.
_________________________________________________________________
Redhat users
Debian (deb) users skip to the next section,the rest of us will go to
the [46]PostgreSQL [47][5] site and read down until you see the
sentence "Source and binary rpms are also available". Click on the
word "binary" to go to the FTP site. Follow the links for your version
of Linux (redhat-6.x for us). You will need the following two files
[48][6]:
* postgresql-6.5.3-3.i386.rpm @ 2318k
and
* postgresql-server-6.5.3-3.i386.rpm @ 594K
You can select anything else but they aren't required for Linux-Kontor
to run. Stay away from the file postgresql-jdbc-6.5.3-2.i386.rpm @
139K We will use a modified version from the Linux-Kontor site [49][7]
The PostgreSQL people have release version 7.0 beta? Use it at your
own risk (there are no BINARY RPMS available as of this writing.
_________________________________________________________________
Debian users
Go to the [50]Debian site and get the Debian binaries (debs). Click on
Debian Packages on the left under Distribution. Go to the bottom of
this screen to the Search Package Directories keywords box and type in
the names of the debs listed in [51]Table 3-2 the " Required Debian
Files." Be sure to check the box for all versions since the above are
in the frozen or unstable vs. the stable (the default) version. Click
on the name of the packages above in the search results screen to get
to the download page. Be sure to note the Other packages related to...
area, as the red bulleted package versions are required (labelled
"depends"). You can type:
* dpkg -l | less
At a shell prompt to view the versions that are currently installed on
your system. You will need these dependencies taken care of before
installing.
The Debian JDBC package for PostgreSQL libpgjava 6.5.3-2 isn't listed
above because we will use a modified version from the Linux-Kontor
site (more on that later).
_________________________________________________________________
Retrieving Java Runtime
Next we gather some java. We need the Java Runtime Environment - JRE,
but if you plan to program you will want the source, Luke...(sorry,
couldn't resist). There are now several vendors for the JRE - IBM,
Imprise (Borland) and Blackdown. The Linux-Kontor group seems to be
using Blackdown's version, they are THE Linux source for Java (this
group of unpaid programmers was the first to provide Java for Linux ,
IBM and Imprise jumped on when the dollar signs flipped up). One
survivor of this HOWTO suggested I include a short method for
determining if you are using glibc or libc5 (some Redhat 5.x systems
DO use glibc). The following is excerpted from the Java README.html
file that you have yet to download. (I didn't ask for permission so my
next posting may be from behind bars):
* To discover which kind of system you have, (remember, these
instructions are for x86 based Linux only):
ls -l /lib/libc.so.*
What you are looking for is lines of the form:
/lib/libc.so.[num]
If all you see are lines where [num] is 5, then you have libc5. If
you have a line where [num] is 6, then you have glibc, and you
should get the glibc version. An additional check is to look in
/lib for libdl.so.[num]: if at least one [num] here is 2, then you
definitely have a glibc system and you should get the glibc JDK
(although I believe the libc version will also work for you).
If you have libc5 then you will have to download JDK/JDE-1.1.7. I
don't believe there is a libc5 version of 1.1.8 (anyone know?). You
must also substitute "1.1.7" whenever I say "1.1.8" - don't
forget![52][8]
_________________________________________________________________
Redhat users
Redhat users are headed for the [53]Blackdown , Debian users skip
ahead to the Debian section and those using the product of another
vendor meet up with us at [54]the section called Retrieving Java's
Swing.
At the [55]Blackdown click on the Download menu selection, choose a
mirror site in your area then select the JDK-1.1.8 version (or JRE),
next will be your platform (most likely i386), then "v1" for version
(only 1 in this case), Grab one of the following files, the JDK = Java
Development Kit, JRE = Java Runtime Environment (read this extract
from the JAVA FAQ, if you select the JRE you will have to substitute
that each time I mention the JDK - that goes for the file name too):
With Java 1.1, Sun needed a way to distribute a JVM without shipping
tools for building Java classes. The JRE includes only what is
required for running Java applications, including a Java Virtual
Machine, the core API class libraries, and a set of default
properties.
--The Blackdown JAVA FAQ
The rest of the [56]Java FAQ is also fun reading :)
So, you've made up your mind what packaging of Java you want, select
one of them and let's get on to the next stage.
* jdk118_v1-glibc-2.1.2.tar.bz @ 13930K
* jre118_v1-glibc-2.1.2.tar.bz @ 5613K
_________________________________________________________________
Debian users
Referring back to the previous Debian section, search for and install
the following Java packages:
* jdk1.1 1.1.7v3-2.deb
* jdk1.1-native 1.1.7v3-2.deb
* java-common 0.2
* jde 2.1.1-4
_________________________________________________________________
Retrieving Java's Swing
Swing is Java' GUI foundation class. Linux-Kontor has recently added
these features to it's new menu. Swing stands for, well, Swing...
gosh, those people at Sun... can't get enough of 'em.
Go to [57]Sun 's site where you will find the Java Foundation Classes
(JFC) - Swing1.1.1 Go to the bottom of the page to Download the
Standard Version ( Linux ). Choose a format (Compressed Tar for me...
er, I mean, the author selected the Compressed Tar version) then click
continue.
With a few deciduous clicks and the transfer of a not negligible
number of networks packets you will become the proud leaseholder of a
17,249,249 byte swinging bundle of joy called swing1_1_1.tar.Z.
_________________________________________________________________
Retrieving JDBC Classes
JDBC is Sun's version of Microsoft's ODBC (Java Data Base Connectivity
& Object Data Base Connectivity). Who comes up with these names? Isn't
anything named "that thingie" any more? Enough ranting. The JDBC code
is a work in progress by, (tricky) I think [58]Peter T Mount. It
allows a Java program to converse with the database server (
PostgreSQL in our case).
Unfortunately, some functionality for Linux-Kontor was/is not yet
included (this changes with the PostgreSQL 7 release but that is not
covered in this HOWTO yet). I have shamelessly taken the following
from the Linux-Kontor web site:
Of course, PostgreSQL has a JDBC driver but it is still in
development. E.g., it is lacking support for some important JDBC-API
functions which kontor depends on. The following patch address some of
these issues (against the 30/06/1999-version as found in the
postgresql-6.5.1 cvs-tree):
* adds support for Connection.getTransactionIsolation() and
* Connection.setTransactionIsolation().
* Fixes DatabaseMetaData.getPrimaryKeys() function.
* Connection.setTransactionIsolation().
* Fixes a bug in ResultSetMetaData.getColumnDisplaySize().
* Bug fix for handling of DECIMAL type
--[59]Jens Glaser on JDBC-driver patches
To make our lives easy, we will download the entire patched and
compiled postgresql.jar file. You can visit the site above (Jen's name
is an active link) and seek out the following line... or just use the
following line - "[60]You can also get the patched and compiled
postgresql.jar here!." [61][9]
THAT'S IT FOR THE DOWNLOADS!!!
_________________________________________________________________
Chapter 5. Installing the Required Programs
Some musings: Linux-Kontor is a client-server package. Basically, you
start up a server somewhere - your computer or on the network. You
then start a client (or two or three...). The client talks to the
server (I know you knew that). PostgreSQL is ALSO a client-server
package. We start up the server, then coax the client into a
conversation. YES, you guessed it, we will be configuring TWO
client-server packages and both can be installed on the same
computer... this could confuse some of the recent converts from the
evil empire.
For diversity, I will detail the installation of PostgreSQL on two
separate systems, a client and a server. This WILL NOT confuse those
of you who have a single system, HONEST, so stop that whimpering!
You can install these packages in any order, we will install them in
the order we downloaded them (I think :-), starting with PostgreSQL .
_________________________________________________________________
Installing PostgreSQL
PostgreSQL is where distributions of Linux seem to depart. If you are
installing the rpms then the following paragraph is NOT for you, I add
it for anyone trying to use an existing installation.
I've heard different distributions place PostgreSQL modules in a
multitude of locations. I personally have found a PostgreSQL module in
my bed, down at the end where my feet go, so IF YOU HAVE PostgreSQL
ALREADY INSTALLED you will need to review the location of your files
[62][10].
Having said this, to run the server on your system, you need the
client (postgresql-6.5.3-3.i386.rpm) and the server
(postgresql-server-6.5.3-3.i386.rpm). To run the client from another
system you only need the client (postgresql-6.5.3-3.i386.rpm) EXCEPT
Linux-Kontor will expect a couple of server files copied over, so pay
attention later on and I will solve that problem for you.
In this session we will switch users ("root," and a new user created
by the postgresql rpm, "postgres"). We will install rpms and edit a
configuration file. We will determine your IP-address, set PostgreSQL
to run on startup and configure it to listen over a network socket, we
will also run a few test programs. (More fun then a poke in the eye
with a sharp stick!)
Debian users who will be installing on a single system may wish to
read this note from Steve:
* Do this for a single machine user and you won't have to edit
pg_hba.conf. Otherwise follow Ron's example for his edit in this
file.
Scroll down in the file until you see the following lines:
# Whether to allow connections through TCP/IP as well as through Unix
# sockets: yes/no.
# By default, for greater security, we do not allow TCP/IP access.
# This means that only users on this machine can access the database.
# PGALLOWTCPIP=no
last line should be (be sure to uncomment)
PGALLOWTCPIP=yes
# The Internet TCP port on which postmaster is to listen for connections
# from frontend applications.
# PGPORT=5432
Uncomment last line here
FOR THOSE USERS INSTALLING KONTOR ON TWO SYSTEMS, right now, YES, THIS
VERY MOMENT!!! go to your server to carry out the following steps (not
the computer that will be running KONTOR). The rest of you may remain
seated.
I assume you don't have PostgreSQL installed on your box. Try typing
this (as root "su - root") at a prompt:
* [ Redhat users type]#: rpm -qa | grep "post"
* [ Debian users type]#: dpkg -l | grep "post"
If PostgreSQL is installed, the modules will list. This is only one
method of determining if you have PostgreSQL RPM's. Do I need to
mention that you use these instructions at your own risk? If there is
a possibility someone is running PostgreSQL on your system then DON'T
upgrade until someone knowledgeable can help. DON'T BE BRAIN DEAD!
Databases are not always upward compatible. Enough said, everyone
knows who I'm talking to. We continue...
At your system prompt, change to user "root" (if you are not already
there):
* su - root
Some of you might already be the "root" user, if so shame on you, that
ain't no way to run a ship! Notice the "-" in the command. That makes
our "su shell" a login shell (and picks up root's configurations).
Just for fun, let's change to the directory that contains our two (or
more) PostgreSQL files. In my case, /opt/download:
* cd /opt/download
We install, in this order, by typing these two commands:
* rpm -U postgresql-6.5.3-3.i368.rpm
* rpm -U postgresql-server-6.5.3-3.i386.rpm
This will install/upgrade both the client and the server on your
system. The client must be installed even if you plan to make another
system your client (also).
(Does this beat hoeing potatoes or what!)
I had a heck of a time with this step as I had previously installed
PostgreSQL from source. I didn't un-install completely and chaos
ensued. Keep this in mind if things don't immediately work for you.
Next, we will activate the PostgreSQL server THEN set it to start on
each reboot. You should still be logged in as root, type:
* etc/rc.d/init.d/postgresql start
You will see something similar to this:
[root]# /etc/rc.d/init.d/postgresql start
Checking postgresql installation: no database files found.
We are initializing the database system with username postgres (uid=40).
This user will own all the files and must also own the server process.
Creating Postgres database system directory /var/lib/pgsql/base
Creating template database in /var/lib/pgsql/base/template1
Creating global classes in /var/lib/pgsql/base
Adding template1 database to pg_database...
Vacuuming template1
Creating public pg_user view
Creating view pg_rules
Creating view pg_views
Creating view pg_tables
Creating view pg_indexes
Loading pg_description
Starting postgresql service: postmaster [947]
Cool, you now have the "postmaster" running. Postmaster is what
PostgreSQL calls it's server.
Tip: If you ever need to confirm the postmaster is running but
don't want to scan through the TOP list, use this command as root
(remember... the "|" I use in these commands is the "bar" or "pipe"
command - usually above the "\" key but I've seen it other places.
If you have confused this as an "ell" or a "one" then it won't
work:
* top -b -n 1 | grep 'postmaster'
You should get a line that looks something like this (the numbers
will be different):
555 postgres 0 0 1180 1180 956 S 0 0.0 1.8 0:00 postmaster
While we are logged in as root, let's set PostgreSQL to load with each
boot, type:
* ntsysv
Arrow down the resulting dialog box until you find " PostgreSQL " and
toggle it with the space bar placing an asterisk next to it. "TAB"
over to the "OK" button and "spacebar" out, saving your settings. (You
can always restart ntsysv if you think you goofed). If you don't have
ntsysv, you probably know what tool you use to start and stop system
services (linuxconf, tksysv RH's configuration tool, etc... do it).
Note: You could have activated the service and restarted your computer
to activate the "postmaster" but you would have missed the pretty
printout - and the possible errors that could display.
Now's a good time to mention IF YOU DON'T RECOGNIZE WHERE YOU ARE,
DON'T GO ANY FURTHER. If things aren't working as I've described,
Something's wrong. Post a question to the PostgreSQL Mailing List
<[63]pgsql-general@postgresql.org> [64][11] or to one of the
[65]Linux-Kontor Mailing List 's. The people on these lists are quite
resourceful.
The RPM's create two directories, /var/lib/pgsql and /usr/lib/pgsql
for Redhat and /var/lib/postgres and /usr/lib/postgresql for Debian .
They also create the user postgres (uid=40) and install the startup
script postgresql in /etc/rc.d/init.d for Redhat and /etc/init.d for
Debian .
While we are still the root user, let's change the password for the
new user, postgres (I have no idea what the default password is):
* passwd postgres
Follow the instructions (don't forget the password!) Things are
cooking. Exit the root shell by typing (if you keep "su"ing you will
be stacking shells and leaving possible security holes):
* exit
Then su to postgres (I hope you remembered that password!):
* su postgres
Let's take PostgreSQL out for a spin. The postmaster creates a default
database called template1. You can access it with the psql utility.
While user "postgres" type:
* psql template1
Check it out, to exit, type:
* \q
Can anything be more fun then this?? Back to work. We now create the
IoS database (as user "postgres"):
* createdb iosdb
This creates the database but does not give it structure, that comes
later. You can find it in the directory (created by createdb) called
/var/lib/pgsql/base/iosdb for Redhat and
/var/lib/postgres/data/base/iosdb for Debian .
To access a PostgreSQL database you must be in the database list. You
get there by running a script called "createuser." To run this script
you must be in the database list (vicious, huh?). Fortunately, the
user "postgres" is there by default. ***LISTEN UP*** Linux-Kontor will
automatically install the user it needs so you would think that you
don't have to manually create the user kontor. THERE IS A BUG
somewhere, if you don't create this user manually the pg_shadow file
is not updated correctly, or something like that (thanks to Matthias
Schonfeld for that [everyone pretend I know how to put those two dots
over the "o" in his name]). We will do that manually, first, here are
a few useful commands should your fingers slip, createuser, createdb,
destroydb, and destroyuser (Destroy? There's something dark about
those people at PostgreSQL ).
As user postgres we type:
* createuser kontor
This starts a dialog:
"Enter user's postgres ID ->"
Anything, 600, If the user is installed on your computer,
PostgreSQL will default to that user's "uid," for now I don't
think this is an issue (I'll modify this if I find out
otherwise)
"Is user "kontor" allowed to create databases (y/n)"
Sure... y
"Is user "kontor" a superuser? (y/n)"
Why not... y
Eowza! Take the opportunity to create a user for yourself. It's your
new toy, have fun!
> TURN ON BRAIN HERE! <
As explained above, Linux-Kontor requires networking code compiled
into the Linux kernel (the default for most distributions). PostgreSQL
will run either way, Linux-Kontor won't.
Point 1. To successfully configure Linux-Kontor (and PostgreSQL as we
require it) you need a hostname and an IP-address.
Point 2. Usually a hostname is sufficient, it will 'resolve' into the
IP-address. PostgreSQL 's security configuration 'pg_hba.conf' does
not resolve hostnames, you must use IP-address.
Point 3. DHCP is an acronym for Dynamic Host Configuration Protocol.
This is a method where a DHCP server allocates IP-addresses
dynamically to DHCP clients. Computers utilizing DHCP do not have the
same IP-address between sessions (ouch), this is sometimes referred to
as a dynamically assigned IP-address.
Point 4. Localhost is a dummy hostname that refers to the loopback
interface (IP-address 127.0.0.1). The loopback interface emulates an
interface that is 'always up' and is utilized routinely by programs
requiring an outbound IP-address. Packets routed to the loopback
interface are rerouted back and processed locally (read: fake network)
Reality 1. One can only simplify something so much before it becomes
too inaccurate to be helpful :-).
Reality 2. If you have a "standard lan." Get the IP-address and
hostnames of the computers participating in this Linux-Kontor pow-wow
and skip the next realities.
Reality 3. If your IP-addresses are assigned by a DHCP server, you
will have trouble configuring PostgreSQL 's 'pg_hba.conf' file. You
must select one of these methods: A. Request that your DHCP server
assign all PostgreSQL clients the same address each time (see your
DHCP specialist for this) you will then have a 'static' address... use
it :-). B. Use the 0.0.0.0 mask in the 'pg_hba.conf' file to indicate
any user (and poor security), or C. Utilize "pg_hba.conf"'s password
method (??? beats me... Someone told me about it but I'm too lazy to
check it out... If you know something I should include here, contact
me [66][12] ...
Reality 4. If you intend to use all this software on one computer AND
you aren't on a LAN you require the "fake network." (see point 4 -
localhost). In this case, your "/etc/hosts" file will contain a line
like this: "localhost 127.0.0.1" (...IF you have given your computer a
hostname, then you need a second line: "127.0.0.1 [hostname]"). [You
need other stuff, but I'm hoping your system defaults to those..:-)]
Reality 5. Until someone confirms the above is correct, I'm working on
conjecture... I will assume I have it correct. Check back where you
found this document before you burn too many brain cells wondering
what's wrong... :-)
Remember, you can retrieve your hostname with this command:
* hostname
You can usually confirm the IP-address with a:
* ping [hostname]
When I ping my [hostname] (ping phoenix) I get, along with route
timings, this line:
PING phoenix (192.168.1.6) from 192.168.1.7 : 56(84) bytes of data.
This confirms my IP-address (192.168.1.6).
It is SOOooo... important that you get the RIGHT ADDRESS and TYPE IT
CORRECTLY! (Those are periods, NOT comma's, zero's, not "oohs")
You are about to edit the file /var/lib/pgsql/pg_hba.conf for Redhat
users, /var/lib/postgres/data/pg_hba.conf for Debian users. First, you
must make it editable. As user root or user postgres (su root OR su
postgres) type:
* [ Redhat users type]#: chmod 600 /var/lib/pgsql/pg_hba.conf
* [ Debian users type]#: chmod 600
/var/lib/postgres/data/pg_hba.conf
Now, grab your favorite text editor (if you use a word processor SAVE
IN TEXT MODE!). Open the file:
* ( Redhat users): /Var/Lib/Pgsql/Pg_Hba.Conf
* ( Debian users): /var/lib/postgres/data/pg_hba.conf
Scroll to the very very end. You should see a couple lines like:
* local all trust
* host all 127.0.0.1 255.255.255.255 trust
They are the default, you will add one more. My CLIENT address is
192.168.1.6, I want all users on my 6 member lan to have access to
PostgreSQL (1 through 6) I change the last number to "0" and create a
mask 255.255.255.0. If you only want access for your computer, leave
the address alone and change the mask to 255.255.255.255. My line
looks like this, replace my IP-address and MASK with your own:
* host all 192.168.1.0 255.255.255.0 trust
IF YOU ARE INSTALLING ON TWO COMPUTERS AND YOUR TWO ADDRESSES DO NOT
SHARE THE FIRST TWO OR THREE SEQUENCES, YOU MIGHT WANT TO ADD TWO
LINES TO GIVE BOTH THE CLIENT AND THE SERVER ACCESS. Access by the
server is not required, but it is convenient.
IF YOU HAVE dynamically assigned addresses, use the 0.0.0.0 IP-address
and similar mask or whatever method you decided on in [67]Reality 3."
* host all 127.0.0.1 255.255.255.255 trust
If anyone is confused about the role of the MASK, read the
documentation included in that file or ask someone.
If you are a tiny user in a BIG network, either (A) you know what you
are doing and I don't have to explain that you must customize this to
your situation, or (B) you are sooo... deep in trouble that words can
no longer help. Save the file and get out of your editor. You can
leave the edit permission alone. Get to the prompt, change to the user
root if you are not already (exit any current shell, then "su - root")
then restart PostgreSQL so it will read your new settings:
* [ Redhat users]#: /etc/rc.d/init.d/postgresql restart
* [ Debian users]#: /etc/init.d/postgresql restart
Test your settings by accessing from your client (exit any current
shell, then "su postgres") substitute your SERVER address (remember,
for most of you the client and server are the same computer - IF NOT,
YOU WON'T BE READY FOR THIS STEP UNTIL BELOW, SO DON'T PANIC, SKIP
THIS STEP!):
* [Networked Machine]$: psql -h xxx.xxx.xxx.xxx -d template1
* [Non-Networked Machine]$: psql -h 127.0.0.1 -d template1
If you goofed up, you may see this message:
Connection to database 'template1' failed.
No pg_hba.conf entry for host 192.168.1.6, user postgres, database template
1
Otherwise, you'll be inside psql, use the "\q" to exit. Good work!
DON'T CONTINUE until you work this out since... there ain't no next
step without this step.
Tip: The postmaster occasionally prints out messages which are
often helpful during troubleshooting. If you wish to view debugging
messages from the postmaster, you can start it with the -d option
and redirect the output to the log file:
* postmaster -d >& pm.log &
Notice that there is an ampersand ("&") at the end of the example
so postmaster will be running in the background... See the
PostgreSQL manuals in the /usr/doc directory for more info.
THIS LAST STEP IS FOR THOSE OF YOU WHO WILL BE RUNNING KONTOR AND
PostgreSQL FROM TWO SEPARATE COMPUTERS! (I told you I would make it
clear)
The rest of you may mosey down to the Congratulatory note below.
For those running on two systems, we have just set up our PostgreSQL
server, take yourself to the client computer, and follow the
instructions above to install the package postgresql-6.5.3-3.i368.rpm
(not the server rpm unless you also want a separate server on that
computer). Next, follow the instructions from above on changing the
PostgreSQL password. You still have the IP-address of the server? Type
it in the line below, replacing my servers address with yours:
* psql -h 192.168.1.6 -d template1
You got it? GREAT! If you don't, there is a networking issue to be
addressed. You can try posting a question to the list, but I expect
you will have to work it out through your own resources. Need I
mention not to go further until you work this out? (You can always go
back to the server and install the client software there).
We have one more task FOR THOSE USING TWO COMPUTERS. If you chose not
to install the server rpm on this second computer, you will have to
copy several files from your server as Linux-Kontor will need to see
them.
[EDITOR'S NOTE: I think this is a BUG people, perhaps it can be
fixed??? If these are truly files required by the SERVER, then why
does the client machine need them, perhaps we should talk to the
packager of the rpms?]
These are the files you will want to copy over:
* /usr/doc/postgresql-6.5.3/contrib/spi/refint.so
* /usr/lib/pgsql/plpgsql.so
You may also want these files though I have no evidence to support
that conclusion:
* /usr/doc/postgresql-6.5.3/contrib/spi/autoinc.so
* /???/user_locks.so (I don't have this one...)
You will put them on your client. The directory is not as important as
remembering its name. You will be installing that directory in one of
the Linux-Kontor configuration files latter (so write it down). I
placed mine in a directory called /usr/lib/pgsql (excellent, excellent
choice!).
Congratulations, you now own the most powerful GPL'ed DATABASE system
in EXISTENCE!!!
Some of you might be interested in a graphic SQL program to simplify
your access to PostgreSQL . You're in luck, PostgreSQL comes with an a
top of the line program called pgaccess. Search your installation for
it!
(Whew...)
_________________________________________________________________
Installing Java Runtime
Ready for the caffeine? We have the option to install two versions of
Java, the Full Montey (JDK - Java Development Kit) or the other one
(JRE - Java Runtime Environment). If I guided you through the
installation of the JRE, you wouldn't respect me in the morning, so we
go all the way. (Are we PROGRAMMERS or WHAT?! [who said cpa?])
Naturally, if you are short on disk space or don't plan to hack at the
code, you might very well substitute the JRE every time I say JDK. I
don't know if that will work, but my initial installation was with
IBM's JRE (the devil made me do it).
We will be working with the file:
* jdk118_v1-glibc-2.1.2.tar.bz
FOR THOSE WITH TWO COMPUTERS... THIS WILL BE DONE ON THE CLIENT
COMPUTER...
(Advertisement: If you have a network and this file is not on your
client, sneak a peek at section C5 for a nifty way to install from
that "file server" without using additional space on your client.)
Personally, I like to keep things neat. I have a directory off the
/opt directory called "/opt/installs" where I move/copy (depending on
disk space) my files before decompression (and sometimes compiling). I
make each new file its own cozy little directory. I made one called
"/opt/installs/jdk" just for this occasion and I copied my jdkxxx.bz
file to it. If your setup is different, interpret my instructions as
required. First (after moving your jdk file to the decompression
directory, if you have to) drop into a shell, su to root, change to
the proper directory, and decompress that puppy WAIT! You may not have
the program bzip2, we better check! Type this at the prompt:
* su - root
* bzip2 -V
Did you get a response? If not, you can fetch a copy from your RedHat
CD (bzip2-0.9.5c-1.i386.rpm) or something similar. No RedHat CD? Try
the RPM repository @ http://rpmfind.net/linux/RPM/index.html (this is
the actual page: http://rpmfind.net/linux/RPM/BByName.html) What, no
internet connection? Try this, go buy a copy of RedHat 6.1 :-)
Now.. you are still logged in as user root, change to the proper
directory, unzip, then untar those puppies (this process will require
about 66 M and perhaps some swap space in the tmp directory. Can you
handle it? (Use the command "df -hl" [that's a "ell" not a one]. If
you are short space: delete something, symlink, purchase another disk,
whatever...) We continue:
* cd /opt/installs/jdk
* bzip2 -dv jdk118_v1-glibc-2.1.2.tar.bz
That operation leaves a tar file @ 40 M (and no .bz file, so don't
look for it), type:
* tar -xvf jdk118_v1-glibc-2.1.2.tar
Whoa! You now have a file @ 40 M and a directory jdk118_v1 @ 40 M.
Remove the tar file if you are getting nervous (remember, this WAS
your jdk*.tar.bz file, if you don't have a copy somewhere then kiss
this puppy good-bye [you still have the directory]):
* rm jdk118_v1-glibc-2.1.2.tar
Next, change to the newly made jdk118_v1 subdirectory (no forward
slashes, it is a subdirectory):
* [ Redhat users type]#: cd jdk118_v1
* [ Debian users type]#: cd /usr/share/doc/jdk1.1
And read a few of the README files, especially README.linux. If you
don't have a preference for a reader, type:
* less README.linux
Fun stuff! You can use the direction keys to move around, the "q" key
to quit. BTW, did you notice this file is PACKED with important and
interesting information? That's what I was afraid of. When you get a
chance, read it with your brain turned on, it may save your LIFE! (I'm
not kidding, just the other day someone tried to be social with me, I
rattled off a few lines from the JDK.linux README and they were gone
lickity split - close call!)
Enough goofing off. We get to put this directory anywhere we want. I
vote we put it in the /opt directory in a sub directory called
/opt/java, any objections? Good, that's why we get along so well. If
you select something different, write it down, you will need it later.
This move will require 40 M on the destination partition (I am already
on that partition, moving will cost me no file space). Make sure there
is a java directory under /opt (and if you need an /opt directory, do
that first - I have not included that step):
* mkdir /opt/java
* mv /opt/installs/jdk/jdk118_v1 /opt/java
The end is in sight! Let's REALLY make our life easy, let's symlink
that new directory to the /opt directory (symlink is a really cool way
for smart people to refer to Symbolic Linking, that's why I use it -
really :-). THAT WAY you can upgrade your JAVA without changing your
path settings (just delete the old symlink and create another link to
the new Java directory [NOT NOW, in the future!]). Type:
* ln -s /opt/java/jdk118_v1 /opt/jdk
(ADVANCED USERS: If you plan to access this directory across a NFS
(network file system) the symlink will not work. You will have to
create a symlink from the accessing system - exercise left for the
reader :-)
Last but not least. We add this new path "/opt/jdk/bin" (note that we
actually add the path to the binaries) to our PATH statement. I add
this to the GRAND DADDY of path setting files /etc/profile. This way,
all users inherit the path. If you are the only interested user, add
this to your ~/bash_profile file (remember, the "~/" is the system
shortcut to your personal [home] directory). You will have to be root
to edit the /etc/profile file, and don't forget to "su - root." Get
into your favorite editor (remember, if you are using a word processor
SAVE AS TEXT!). Add ":/opt/jdk/bin" to the PATH statement (to the end
of the Path line is okay). If you don't have a PATH statement (that
would be weird) then go back and look at the example in the
README.linux file for help.
For you old timers, don't worry about the CLASSPATH or JAVA_HOME
environment variables. They aren't needed for "modern" Java
applications (and get rid of those bell bottoms... and get a hair
cut!) but you may need to add the paths to your java editor - you ARE
using Xemacs, and JDE, right?.
Ready for a test? Open a shell so the new PATH statement will be read.
You might confirm your efforts were fruitful by typing:
* env | grep "jdk"
You should get a line that has these characteristics (If not, repeat
the steps above skipping the part where you screwed up :-)
*
PATH= .....:/opt/jdk/bin:...
Let's PARTY! [68][13] Change to the directory (note: that's a lower
case "L" on that "ls" line):
* [ Redhat users type]#: cd /opt/java/jdk118_v1/demo
* [ Debian users read the footnote [69][13], your Java files are
in]#: cd /usr/lib/jdk1.1
Type:
* ls -l
Look at all those sparkling toys, SOURCE INCLUDED!!! What
extraordinary philanthropy! What luck! What's... next? Well, change to
a few of those directories and run some demos, what better way to see
if the gods are smiling on your installation ?
* cd Animator
* appletviewer example1.html
Need I mention that if the appletviewer does not load and display an
AWESOME animated feature film (about 3 sec, with 1 commercial), don't
go any further? Should I also mention that you need to be running "X"
and if the shell user is not the owner of the X session then you must,
as the owner of the X session, add thatuser (xhost + thatuser) and as
thatuser, attach to the X session's display (export DISPLAY=:0.0)?
Good, because mentioning all that would take a very well crafted
sentence and I don't think I'm up to it.
A quick review of the demo programs, play with them (taken from the
Java README):
Table 5-1. Swing Demo Programs
DIRECTORY DEMO
awt-1.1 AWT demos
i18n Internationalization demos
Animator General-purpose animator
ArcTest Test arc drawing and filling
BarChart Simple bar-chart applet
Blink Blinking, multicolored text
CardTest Test card layout manager
Clock Analog clock
DitherTest Test image dithering
DrawTest Draw points and lines
Fractal Fractal figures
GraphLayout Graph layout by iterated relaxation
GraphicsTest Test graphics operations
ImageMap Live-feedback image map
JumpingBox Catch the jumping box
MoleculeViewer Three-dimensional chemical model viewer
NervousText Nervous text
SimpleGraph Draw a simple graph
SortDemo Animated sorting algorithms
SpreadSheet Simple spreadsheet
TicTacToe Tic-tac-toe game
WireFrame Three-dimensional wire-frame model viewer
The JumpingBox applet is waayyy cool, and that box ain't quite so
sassy after you get in and jigger the code a bit (I LOVE open source!)
Here are some neat tools from the Java people (Did I mention Java is a
trademark of the SUN corporation? (In case their lawyers decides to
use Linux-Kontor :-) I lifted it straight from their README (is that
legal?):
Table 5-2. Java Tools
Java Compiler (javac) Compiles programs written in the Java
programming language into bytecodes.
Java Interpreter (java) Executes Java bytecodes. In other words, it
runs programs written in the Java programming language.
Java Runtime Interpreter (jre) Similar to the Java Interpreter (java),
but intended for end users who do not require all the
development-related options available with the java tool
Java Appletviewer (appletviewer) Used for testing and running applets.
Java Debugger (jdb) Helps you find bugs in programs.
Java Archive Tool (jar) Combines many class files and other resources
into a single jar file.
That's it for this section. Now we can really SWING (how many times
can you use a phrase like that?)
_________________________________________________________________
Installing Java Swing
This will be easy! Swing is the big Z. (the file name:
swing1_1_1.tar.Z). A bit of a nervous ending, but we'll see how it can
be improved.
{EDITOR'S NOTE: I just realized I did the Java installation as Root.
Is/was there a better user to suggest? Root avoids most access issues
while raising security concerns. The user could actually do everything
as themselves if they desired... Any suggestions?]
Just like last time (Java, previous section... it only feels like last
year), we will create a directory, copy the swing1_1_1.tar.Z file
there, change to that directory, unzip then un-compress the file. Type
a bunch of stuff that should be done by a good install program then
run an example to make sure things work. If the example doesn't work,
hum... well, gee. I don't know what to say. I guess "tough luck" would
be inappropriate for a HOWTO, how 'bout "try again" then call us.
Debian users again benefit from Steve's work, here is what he has to
say:
* Here is where we need to put Java's swing for the default Debian
java installation. The Debian packaging policy puts most
everything in /usr/lib/"whatever-package-name". Given that, when
we put debs together for Linux-Kontor , you will find this here.
mv /wherever-you-unzipped it/swing-1.1.1fcs /usr/lib/jdk1.1
(Advertisement: If you have a network and this file is not on your
client, sneak a peek at [70]the section called Installing Linux-Kontor
(13) for a nifty way to install from that "file server" without using
additional space on your client.)
I assume *THIS IS IMPORTANT* ... you have copied your swing1_1_1.tar.Z
file to your working directory (do it now). Mine is (guess):
/opt/installs/swing and my file is there waiting patiently. Let's
check on file space:
* su - root
* df -hl
I'm sit'en pretty, what about you? For Swing we will need 16 plus 47,
um, lets see, 7 and 6 is ah, 14, no, 13 carry the one, 4, got it, 60
something M of space (16 M for Swing, we can delete that after the
unZipping/unTaring, and 47 M for the new directory, "swing-1.1.1fcs").
Type the following, I assu.. hope you are still the root user, if your
setup is different then mine, make the appropriate changes:
* cd /opt/installs/swing
* tar xvzf swing1_1_1.tar.Z
Holy moses! Did you see that? Cripes! If you still care enough about
conserving disk space after that display, delete your original copy of
swing:
* rm swing1_1_1.tar.Z
IMPORTANT NOTE. Ready for good news? Out of all those files, the only
one Linux-Kontor needs is "swingall.jar." After you finish this
section you can choose to go into the resulting directory and delete
the other files, it's up to you...
Now change to our newly created directory:
* cd swing-1.1.1fcs
Load the README.html or README.txt file into your favorite reader, or
type:
* less README.txt
Remember to use the "q" key to get out. (Did you read the license? I
thought so...) We will use the "Solaris" setup from that file. Solaris
is Sun's way of saying Linux , sort of. Just like the Java stuff from
above, we will move this directory to /opt/java, if you don't have
that directory, do what you did when you ignored the directions under
"installing Java":
* mv /opt/installs/swing/swing-1.1.1fcs /opt/java
Let's create our symlink (symbolic link, remember?)
* ln -s /opt/java/swing-1.1.1fcs /opt/swing
BTW (that, BTW, stands for "By The Way" :-) "fcs" on the end of that
directory stands for (roll the drums):
* First Customer Ship - the "actual product" as opposed to a beta or
early-access release
HA! I bet you thought I didn't know that, right? [author takes time
out to preen finger nails]. To run the examples, we need to
TEMPORARILY set an environmental variable. Remember, even though you
"export" this variable, it is only exported to that shell and any
shells spawned from that shell (like when you type: "xterm &"), if you
decide to use the demos later as an cheep alternative to taking your
date to the movies (like I do), you need to set the variable again (I
do this below). First, "exit" from the "root" shell. "exit" closes
your current shell. If your shell is in a shell (in a shell), it
closes your current shell and drops you back one. If you "exit" from
the LAST open shell, your terminal will close. Your exported settings
get dumped every time you "su" or "exit" from one user to another, so
remember to set your env as required (including your DISPLAY if
needed):
* exit
You should now be yourself (so slump your shoulders, slouch in your
chair and) type:
* export JAVA_HOME=/opt/jdk
(I remember when this was required, along with SWING_HOME, to be a
permanent feature of your environment. From everything I've read, you
no longer need them. I've removed the settings from my system and
things seem to work okay - It's a "good thing" to remove all but
required parameters, it helps when solving problems later on.)
Okay, the moment we've been waiting for, SWING examples.
* cd /opt/swing/examples
* ls -l
Those are all demo's waiting for your eager eyes. Let's go for the big
banana (remember that stuff from the previous section about exporting
your DISPLAY? If you need to [few will] then do that NOW) ...
(remember, in Linux , executable files will only be run if they exist
in the "PATH." To run a program from a current directory that is NOT
in the path, you must append the "./" characters, that is what we do
below) ... :
* cd SwingSet
* ./runnit
Oh the pleasure of it all. Neat controls, huh? Learn 'em cause I hear
on the grape vine they are looking for someone to add them to the
current version of Linux-Kontor (13).
IMPORTANT NOTE. If you plan on deleting everything but the
"swingall.jar," now's the time :-)
This concludes this section. I wanted to list out the example
directory here and walk you through my favorite swing GUI, but the
neighbors cat needs food and I'm elected to go buy some, so I'm out of
time, rats!
PS: Some of you new to Linux might be asking yourselves, how one knows
what commands to type, bzip2 this, bu -hl that... what parameters are
appropriate for a command... when to correctly switch users... where
to properly place a new directory.
(what, you expect me to know?)
All right, all right already... since you ask :-) This is the key to
mastering Linux , the universe and EVERYTHING... take notes :)
Tip: MOST PROGRAMS report their errors to a repository called
"messages," memorize this command:
* tail -f /var/log/messages
As you improve, you will find some programs write to their own
error file rather then the system message file, learn them. BUT AS
YOU IMPROVE YOU WILL FORGET YOUR ROOTS! You will forget to check
the message files until one day, frustrated by your new acquisition
failing to run you will... you will..."ASK FOR HELP" (ouch!) The
answer was probably sitting in your message file!
Tip: Type:
* man [program_giving_you_problems]
Alternately try this command:
* ls /usr/doc
Impressed? Some poor smuck wrote those for YOU so YOU can LEARN
about the program(s) YOU are using.
Tip: Type:
* apropos [keyword_for_help_search]
Tip: Go to : www.deja.com - "search 'discussions'" - better yet,
get dejasearch @ http://homemade.hypermart.net/dejasearch/
This could very well be the best advice!
Tip: Get a "Tool" manual (suggestion: "Unix Power Tools" by Jerry
Peek, Tim O'Reilly & Mike Loukides ISBN 1-56592-260-3 @ $60)
Tip: Visit the Linux Documentation Project:
http://www.linuxdoc.org/
Tip: Learn "grep" or a gui utility (like the "find" built into mc -
midnight commander) that uses grep. Use it! Say you want to find
the the most intelligent advice on your computer system. All you
need to do is switch to the root user and grep your disk for the
word "ron" in that same document will be your answer!
_________________________________________________________________
Installing JDBC Classes
This is the interface between our program ( Linux-Kontor ) and our
database ( PostgreSQL ). For those using another database (
Linux-Kontor has been tried with several - Adabas D, Oracle, Informix
SE, Solid and RDBMS's with a JDBC class) the concepts described below
should be similar, but the individual steps will appear Greek (unless
you're Greek, then they will probably look German or something).
You will recall the name of our JDBC driver is postgresql.jar. The
"standard" driver is called jdbcX.X-X.X.jar (jdbc6.5-1.2.jar as of
this writing) - see section B5 if you forgot why.
(Advertisement: If you have a network and this file is not on your
client, sneak a peek at section C5 for a nifty way to install from
that "file server" without using additional space on your client. In
this case, try a command similar to "rsh [servername] cat
/opt/download/postgresql.jar > /opt/java/jdbc/postgresql.jar")
Locate your copy of postgresql.jar. Mine is in a directory called
(everyone in unison) "/opt/download."
Quick note. Our buddies at Sun like to take a theme and run. Since we
are using a program called Java, their idea for a file that contained
a bunch of Java classes should be "coffee can." Extensive marketing
ultimately proved a file named 'my.coffeecan' would generate general
negative feedback when transported to a vintage Microsoft platform
('my.cof'). After dumping an additional 3 million into research, an
astute employee, with significant stock in the pickle and relish
industry, mentioned the concept of a jar. There you have it, another
totally fabricated reality from a guy who has trouble clinging to his
own.
Since a 'jar' file does not (BETTER NOT) be unjared (do it on your own
time, we need it jar'ed) we will create our destination directory and
copy to it directly. For consistency, I will place this new file in a
directory named "/opt/java/jdbc" (of course "/opt/java" already
exists) then I will symlink this directory to the "/opt" directory.
Again we will do this as the root user, if you think you are running
short of disk space, use the technique mentioned above to check,
ready:
* su - root
* mkdir /opt/java/jdbc
* cp /opt/download/postgresql.jar /opt/java/jdbc
Confirm your work by typing:
* ls -l /opt/java/jdbc
You should see the file you just copied. Next, we symlink that baby:
* ln -s /opt/java/jdbc /opt/jdbc
That's it for that. You can confirm your work by typing:
* [ Redhat users type]# ls -l /opt/jdbc
* [ Debian users type]# ls -l /usr/lib/jdk1.1/jdbc
You should see the file you copied. Make sure you copy down your
location if you deviated from my suggestions.
_________________________________________________________________
Installing Linux-Kontor (13)
(Finally! :-)
Before I get started on this topic, here's a disclaimer: I know
nothing about Linux-Kontor (surprise!). I'm writing this HOWTO as
penance for hounding the list for two weeks while I tried to get
things working. Trust me, if you think you're having problems... I
might say the best advice I could give is not to kill yourself trying
to second guess settings. Wait till later when you develop a module,
that's when we expect your blood. If you get to where you can run the
scripts and they don't execute, double check your work then post (as
detailed as you can) a message to the Linux-Kontor list. We all want
you on the team and will probably bend over backwards to get you there
(unless you're a jerk :-). One last thing. The configurations I
present are the ones I got my copy running with. Some lines beg for
changing but you better ignore them. Others look okay but we change
them anyway. This is only to get you started. YOU are then suppose to
master this stuff and send ME a HOWTO... Naturally, a HOWTO evolves
with the program it's wed to. You may never again see much of this
paragraph, so enjoy reading it while it is here :-)
One more disclaimer: Linux-Kontor isn't this hard to install (I'm
lying again...). In this section I try to give as much information as
possible so that the truly desperate can find and solve their
particular problem without the added imposition of being social
(asking the list for help :-). Take from this only what you need.
Again we savor the topic of Client-Server. PostgreSQL was our first
Client-Server package, Linux-Kontor is our second. We have the option
to install the Linux-Kontor Server on any network peer (including the
PostgreSQL server) or it can be installed on the same system as the
client... your choice. Remember, no matter where you install your
Linux-Kontor server, you can run any reasonable number of clients
(reasonable, defined as one less then unreasonable) from any networked
peer as long as you also add the PostgreSQL client. Cool, huh?
But...
Today (my today - not the existential day of this document - my Friday
where I'm too busy to work it out on my system... THAT today...) I'm
only going to detail installing Linux-Kontor 's Server and Client on
the SAME SYSTEM, the system with the PostgreSQL client. Tomorrow (not
YOUR tomorrow, MY existential tomorrow - like next week in your
non-existential tomorrow) I will work out the Client Server split,
inflict it on myself, write it up in this HOWTO then post a self
congratulatory notice to the Linux-Kontor mailing list indicating a
closure of existential time with, with... sorry, I forgot what I was
talking about, anyway I will post the HOWTO upgrade notice to the
list.
Linux-Kontor installs in the same manner as the others (above). But,
for variety, I will describe (in detail... don't get your underwear
all in a bunch) how to unzip, untar, and install the file with one
command line (USING ONLY ONE FINGER!).
Is Linux great OR WHAT?
First, check your hard drive for space (you know how, quit
procrastinating). We will perform the following commands as the user
who will be using Linux-Kontor . For me, it happens to be the name of
a very intelligent, charming, witty and quite MODEST person, who
coincidentally, shares the same name as myself - ron. What this means
to you, (not the intelligent, charming, witty and quite modest stuff,
the stuff about the Linux-Kontor user) is: After you "su" to root to
check on your file space (you need about 51 M) return yourself to the
user that will access Linux-Kontor . There is no religious
significance to this, any user that can get the job done is good
enough, but as the Linux-Kontor user, ("ron," in my case) you will
quickly find out if directory permissions are (what's the technical
term here? Oh yes...) screwed up.
WHEN I TYPE "ron" YOU TYPE YOUR OWN USER NAME, GOT IT?
Please re-read the line above.
Question: If I asked you to type "ron" what would you type? :-)
Did I mention the bonus? I will also present a nifty command line
sequence that allows someone (anyone) with a connection to a (network)
peer to do the same. THAT'S RIGHT, unzip, untar and copy TO your
computer FROM A NETWORK CONNECTION in ONE EASY STEP! And if you do it
NOW I'll throw in a FREE ginsu knife! (sorry, got a little excited...)
If you're asleep at the wheel then you probably don't realize the
significance of this technique. Let me give a small hint: YOU DON'T
NEED SPACE FOR BOTH THE COMPRESSED AND THE NON-COMPRESSED FILES! :-)
(get it?)
To avoid permission problems you will switch to the root user and
create the destination directory (this assumes you have an /opt
directory, if not, first make that directory by inserting the command
"mkdir /opt" after you "su - root" - no need to change permissions on
that one). Ready... (pay attention, when I type my name, you
substitute YOURS!):
* su - root
* mkdir /opt/kontor-13
* chown ron:ron /opt/kontor-13
* chmod 755 /opt/kontor-13
* exit
Did you substitute your name for mine in two places??? Good job! Next
we do the unzip / untar / copy thing. (You network people can sit this
one out, yours is next). My kontor-13.all.tgz file is located in a
directory named "/opt/download," YOU WILL SUBSTITUTE your directory
[yes, in the following command, YOU substitute YOUR directory!]:
* tar xvzf /opt/download/kontor-13.all.tgz -C /opt
For you NETWORK PEOPLE... ("I" have a network. I was just chumming
with those others so they'd think I liked 'em. Honest... in real life
you'd have to tie a Linux CD around their necks to get me to talk to
'em!) ...you will type this, replacing "ron@janus" with
"YOU@YOUR_HOST." Got it?:
* tar xvzf ron@janus:/opt/download/kontor-13.all.tgz -C /opt
No, don't tell me that didn't work (ouch!).
Tip: All right! If you get a "permission denied" error, here are a
few hints (Only for the Network Crowd) you others can skip this:
[I believe :-)] this command uses the "in.rshd" daemon. You need to
adjust your settings on the [remote_host_computer] (...[rhc]).
DISCLAIMER: If you are not behind a firewall and / or don't trust
your peers, doing the following can COMPROMISE YOUR SECURITY - like
pulling down your britches and bending over... GET THE POINT?
Hint #1: After each of these hints, try the command below this
paragraph. If that works the rest should work. Hint #2: On [rhc]
(above, pay attention, I defined this above) make sure the line
containing "in.rshd" in your inetd.conf file is uncommented (the
comment is the "#" symbol - if you change it, restart the inetd
daemon by send a HUP signal: "kill -1 PID" where PID is the process
ID of the inetd daemon [find it by typing "top," "q" to exit] or
restart you computer). Hint #3: make sure you allow this service in
your host.allow file on [rhc] (This is the line... "in.rshd: LOCAL"
[or whatever your address is]). You can use tcpdmatch to check,
type "tcpdmatch in.rshd you@your_client" Hint #4: Make sure your
user on the [rhc] has a ".rhosts" file in their home directory with
a line containing "your_client name_of_user" Hint #5: If none of
the above works, look at the log file on your [rhc] ("tail -f
/var/log/messages" - [ctrl-c to get out]) while you try to login
from [your_client]. If PAM is giving you a problem ( Redhat
systems?), perhaps you can temporarily disable the offending module
(I'm behind a firewall, I don't care - you should...), in
/etc/pam.d/rsh, disable the problem module from the messages file
(pam_rhosts_auth.so?) with a "#" before the line). Here is the test
to be typed from [your_client]:
* rsh [name_of_remote_computer] ls -l /
If you still get "permission denied" you are on your own, get the
kontor-13.all.tar file unziped/untared as described above and meet
us on the next step :-)
Pretty, huh? And to think our buddies at Linux-Kontor wrote all that
stuff! (read: no social life :-).
Now we edit some files... change to this directory:
* cd /opt/kontor-13/IoS/kontor/etc
These are the files you are about to edit:
* /opt/kontor-13/IoS/kontor/etc/kontor.server
* /opt/kontor-13/IoS/kontor/etc/kontor.client
* /opt/kontor-13/IoS/kontor/bin/kontor.server
* /opt/kontor-13/IoS/kontor/bin/kontor.server
* /opt/kontor-13/IoS/kontor/sql/PostgreSQL/kontor.create.sql
S.T.O.P.! You will recall that the Server can be separated from the
Client... as soon as I get this portion of the HOWTO out the door,
I'll go back and figure it out. THIS MEANS future versions of this
HOWTO will instruct you to copy files to the SERVER and files to the
CLIENT (or not... if you choose)... The edits you perform below will
use hostnames or IP-addresses specific to the computer's function.
RIGHT NOW I'm using one computer for Server and Client. I sometimes
remember to talk about them separately, sometimes not. I'll do better
with the next version but DON'T LOSE PERSPECTIVE - Keep this concept
in mind! I will now start using [SERVER] and [CLIENT] (for now the
same thing...), in the future it will be clear what is intended. :-)
Important: For those users that elected not to install their java
files in the directories as per this document's suggestions, you
will find the variable "JAVAHOME" is hard coded in several places
in Linux-Kontor code (grep it). You will probably be forced to
symlink your jdk and swing directories to emulate the hard coded
version (if you want to get things working :-).
Before we start, you will have two address, your [SERVER] and
[CLIENT]. You may use your IP-address or your hostname - hostname is
the wisest. Make up your mind, here goes:
The following files require your Language Code, Country Code and Time
zone code[71][14] here's some help (yes, they resolve into full
names[72][15]... if someone sends me the list I will include it...):
Table 5-3. Java Time Zone Chart
GMT = GMT+0 BST = GMT+6 PST = GMT-8
UTC = GMT+0 VST = GMT+7 PNT = GMT-7
ETC = GMT+1 CTT = GMT+8 MST = GMT-7
CET = GMT+1 JST = GMT+9 CST = GMT-6
EET = GMT+2 ACT = GMT+9 EST = GMT-5
ART = GMT+2 AET = GMT+10 IET = GMT-5
EAT = GMT+3 SST = GMT+11 PRT = GMT-4
MET = GMT+3 NST = GMT+12 CNT = GMT-3
NET = GMT+4 MIT = GMT-11 AGT = GMT-3
PLT = GMT+5 HST = GMT-10 BET = GMT-3
IST = GMT+5 AST = GMT-10 CAT = GMT-1
Ha! That looks like a jolly waste of typing... Other codes,
[73]Language and [74]Country (region), can be found on the Internet.
First we edit "kontor.server." Hop into your favorite editor and
change these lines. Remember, these are configuration files used by
scripts (programs that will run from the command line) in the "...bin"
directory (bin directories, as you recall, are the traditional
directories to place "binary" [executable] programs). If you would
like to break Linux-Kontor , setting something wrong in these files
should accomplish that SO PAY ATTENTION!
Tip: The "#" (pound, hash or tick tack toe symbol, depending on
your background) is the "comment" indicator. It means - "anything
after this sign, and until the next line is a comment, not a
directive to any program processing me."
Table 5-4. Editing ..etc/kontor.server
Old Ln 26: kontor.server.rmiurl=rmi://obelix:1300/Kontor
New Ln 26: kontor.server.rmiurl=rmi://[SERVER]:1300/Kontor
-------------------------------------
Old Ln 30: auth.company=IoS GmbH
Leave It Alone, Joachim Schaaf, a shining light in the World of
Linux-Kontor says: "Leave it this way ;) It corresponds to the company
defined in framework/sql/CSV/MemberCompany.CSV. It's the company the
user-accounts belongs to and only is required, until we implement
multi-membercompany-support in the authentification Views."
Old Ln 35: kontor.db.db=jdbc:adabasd://obelix:7200/iosdb
New Ln 35: #kontor.db.db=jdbc:adabasd://obelix:7200/iosdb
-------------------------------------
Old Ln 36: #kontor.db.db=jdbc:postgres://obelix:7200/iosdb
This is IMPORTANT! Uncomment it and change it to (5432 is PostgreSQL
's default port, if you changed the default, use the new value
here)... and notice the "ql" added to postgres! (That there is worth
the price of admission!)
New Ln 36: kontor.db.db=jdbc:postgresql://[SERVER]:5432/iosdb
-------------------------------------
Old Ln 38: kontor.db.user=KONTOR
Old Ln 39: kontor.db.password=KONTOR
New Ln 38: kontor.db.user=kontor
New Ln 39: kontor.db.password=kontor
-------------------------------------
Old Ln 42: kontor.db.postgres.modules=/usr/lib/postgresql/modules/
Don't forget the "/" appended to the end of this path!
New Ln 42: kontor.db.postgres.modules=/usr/lib/pgsql/
Add two lines after the one above (and use new cnt for rest):
New Ln 43: kontor.db.postgres.pl.lib=/usr/lib/pgsql/plpgsql.so
New Ln 44: kontor.db.postgres.pl.compiler=PL/pgSQL
-------------------------------------
Old Ln 48: user.language=de
Old Ln 49: user.region=DE
Old Ln 50: user.timezone=ECT
Old Ln 51: description.language=de
Change the language to your own (en = English), change your time zone
to reflect your time zone (PST = Pacific Standard Time):
New Ln 48: user.language=en
New Ln 49: user.region=US
New Ln 50: user.timezone=PST
New Ln 51: description.language=en
That's it for kontor.server. Save and exit that file. Load your next
file from the same directory - kontor.client:
Table 5-5. Editing ...etc/kontor.client
Old Ln 12: kontor.server.rmiurl=rmi://obelix:1300/Kontor
Old Ln 13: remote.server.rmiurl=rmi://obelix:1300/Kontor
Old Ln 14: auth.server.rmiurl=rmi://obelix:12112/AuthServer
New Ln 12: kontor.server.rmiurl=rmi://[CLIENT]:1300/Kontor
New Ln 13: remote.server.rmiurl=rmi://[CLIENT]:1300/Kontor
New Ln 14: auth.server.rmiurl=rmi://[CLIENT]:12112/AuthServer
-------------------------------------
Old Ln 23: user.language=de
Old Ln 24: user.region=DE
Old Ln 25: user.timezone=ECT
Old Ln 26: description.language=de
Change the language to your own (en = English), change your time
zone to reflect your time zone (PST = Pacific Standard Time):
New Ln 23: user.language=en
New Ln 24: user.region=US
New Ln 25: user.timezone=PST
New Ln 26: description.language=en
-------------------------------------
Old Ln 29: kontor.company.name=IoS
Don't change it (remember Joachim's note above?).
That's it for that file, save your changes and exit your editor. Now
we change to A DIFFERENT directory:
* cd /opt/kontor-13/IoS/kontor/bin
Pay attention, the only difference between the names we used in the
previous edits and the next edits is the "bin" part. The file names
are the same (tisk, tisk Linux-Kontor )! Want to get confused, just
let your mind wander here!
We edit! Again, kontor.server first, kontor.client second. Open up
kontor.server:
Yikes!
Table 5-6. Editing ...bin/kontor.server
Old Ln 15: LOCATION=${HOME}/projekte/IoS/kontor
New Ln 15: LOCATION=/opt/kontor-13/IoS/kontor
-------------------------------------
Old Ln 19: export JAVAHOME=/opt/jdk
New Ln 19: export JAVAHOME=/opt/jdk
-------------------------------------
Old Ln 24: DBROOT=/opt/adabas-d
Old Ln 25: JDBC=${DBROOT}/lib/adabasd.jar
Old Ln 26: #JDBC=/somewhere/postgresql.jar
New Ln 24: #DBROOT=/opt/adabas-d
New Ln 25: #JDBC=${DBROOT}/lib/adabasd.jar
New Ln 26: JDBC=/opt/java/jdbc/postgresql.jar
That's it for kontor.server. Save and exit that file. Load your next
file from the same directory - kontor.client:
Table 5-7. Editing ...etc/kontor.client
Old Ln 15: LOCATION=${HOME}/projekte/IoS/kontor
New Ln 15: LOCATION=/opt/kontor-13/IoS/kontor
-------------------------------------
Old Ln 19: export JAVAHOME=/opt/jdk
New Ln 19: export JAVAHOME=/opt/jdk
-------------------------------------
Old Ln 25: DBROOT=/opt/adabas-d
Old Ln 26: JDBC=${DBROOT}/lib/adabasd.jar
Old Ln 27: #JDBC=/somewhere/postgresql.jar
New Ln 25: #DBROOT=/opt/adabas-d
New Ln 26: #JDBC=${DBROOT}/lib/adabasd.jar
New Ln 27: JDBC=/opt/java/jdbc/postgresql.jar
-------------------------------------
Old Ln 35: SWING_HOME=/opt/swing
New Ln 36: SWING_HOME=/opt/swing
Okay, save and exit your editor. These files are scripts, not
configuration files. Their executable flags will be set unless you
inadvertently unset them. Here's a quick check, at the prompt type:
* ls -l /opt/kontor-13/IoS/kontor/bin/
In the subsequent list you can pick out your two files:
-rwxr-xr-x 1 ron ron 3197 Feb 23 15:48 kontor.client
-rwxr-xr-x 1 ron ron 2786 Feb 8 13:01 kontor.server
...and there are our e'x'ecute flags (see man chmod)!
NOTICE: Some defective editors change the "executable" flag when you
save your edit. THIS IS NOT GOOD. If you ever see this message:
* Permission denied
Go back and check the executable flag is set for your user level
(again... man chmod).
One more to go! We switch to (yet) another directory...
/opt/kontor-13/IoS/kontor/sql/PostgreSQL where we will meet a new
friend...
Table 5-8. Editing .../kontor.create.sql
Old Ln 82: //CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
Old Ln 83: // '/usr/lib/postgresql/lib/plpgsql.so' LANGUAGE 'C';
New Ln 82: CREATE FUNCTION plpgsql_call_handler () RETURNS OPAQUE AS
New Ln 83: '/usr/lib/pgsql/plpgsql.so' LANGUAGE 'C';
-------------------------------------
Old Ln 85: //CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
Old Ln 86: // HANDLER plpgsql_call_handler
Old Ln 87: // LANCOMPILER 'PL/pgSQL';
New Ln 85: CREATE TRUSTED PROCEDURAL LANGUAGE 'plpgsql'
New Ln 87: HANDLER plpgsql_call_handler
New Ln 87: LANCOMPILER 'PL/pgSQL';
We're getting close enough to taste success, no, I'm mistaken... I
forgot to wash my hands after the restroom, sorry... This is a good
time to create the Linux-Kontor database. The process is automated,
some poor smuck tediously constructed this script and the accompanying
data structures so you could install the whole kit and caboodle with a
couple keystrokes. Don't forget to be grateful! (Thanks fw! Hum, fw..
Frank Wiesen? Gee Frank, sorry about the smuck part...:-).
The script is called createDB.sh. Since this script utilizes other
scripts without resolved paths, we best make its home our home, type:
* cd /opt/kontor-13/IoS/kontor/bin/tools
* ./createDB.sh
This script can be started with command line options. When I asked,
Joachim Schaaf gave me this info:
Tip: If you run the createDB.sh script without parameters (DB
user/password), then the database tables will be created for the
user specified in the etc/kontor.server file; the database user
must be "empty". If you run the script with the DB admin
user/password, then user specified in the etc/kontor.server file
gets dropped and created again. [editor's note: I don't quite
understand it myself, but since I didn't need to, I didn't bother
asking for details... you might :-)]
Here is another note someone left:
Tip: By the way, you should run (in bin/tools/) ./createDB.sh dba
dba, if your database admin is "dba" with "dba" as password. [...I
remember it made sense at the time :-)]
If this succeeds you will get a lot of scrolling thingies on your
screen. They stay long enough to make you feel like something worked.
If your installation is (I want to say this delicately...) SCREWED
(...but I won't) you will probably get something like:
SQLException (java.sql.SQLException):
And some other messages, along with a trace... If that doesn't help
you resolve your problem, copy it, send it to me or the list, and we
will help you resolve your problem (all assistance subject to the
"jerk" rule stated above).
Tip: PSST: To copy and paste - from a terminal, use the mouse to
highlight the output (stuff to be copied), go back to your
browser's composer or editor and press your "middle" (if no middle,
left & right at the same time - called "chorded") mouse button...
If that doesn't work, forget you read this.
If your error is this one:
Meldung: 'No suitable driver'
yada, yada, yada...
java.sql.SQLException: No suitable driver
Then go to the file "/opt/kontor-13/IoS/kontor/etc/kontor.server" and
make sure you described your "postgresql.jar" file correctly (line
36... notice the "ql" on postgres...)
* kontor.db.db=jdbc:postgresql://[SERVER]:5432/iosdb
If you get errors about plpgsql call handler already existing with the
same arguments, or about serials relations already existing see Steves
Debian Notes [75][16]
HERE WE GO... Let's start the server! Open up a shell and type the
following commands:
* cd /opt/kontor-13/IoS/kontor/bin
* ./kontor.server
If you're successful you will get stuff that ends in these lines:
Server: 'Linux-Kontor Build 13'
Connecting to DB 'jdbc:postgresql://phoenix:5432/iosdb' as 'kontor'...
DB-Connection established; DataBase: PostgreSQL (Ver: 6.5.1); Driver: Pos
tgreSQL Native Driver (Ver: 6.5)
Connecting to registry as 'rmi://phoenix:1300/Kontor'...
Starting internal registry...
Connection to registry(VM) as 'rmi://phoenix:1300/Kontor' (port: 1300) esta
blished.
Starting internal Auth-Server...
Server: 'Auth-Server Build 2'
Starting internal session...
Starting internal session...
RemoteServer-Initialization finished.
Sniffle, sniffle... Have you ever seen
anything so beautiful ?
I'm all right now... This shell remains open, server side messages
will display here. If you want it off your desktop, start it in a
screen session and put it in the background. If you don't know what a
screen session is, look it up or send me a request (hint: the "send me
a request" method works best when accompanied by unadulterated
flattery of the author... :-).
One more step before we break out and run the program. We need to
switch the main menu text from German to English. For that purpose we
will run two scripts. Right now type:
* cd /opt/kontor-13/IoS/kontor/bin/tools
* ./createMainMenu.sh etc/kontor-menu.en
* ./loadMainMenu.sh
Tip: (Note, if you find Linux-Kontor 's menu not converted, run the
'createMainMenu' parameter with the full path like this:
"./createMainMenu.sh /opt/kontor-13/IoS/kontor/etc/kontor-menu.en")
Now we start the ( strike up band ) CLIENT! Open another shell and type:
* cd /opt/kontor-13/IoS/kontor/bin
* ./kontor.menu
You should see messages with these flavors and user specific
information:
Client: 'Linux-Kontor Build 13'
Connecting to 'rmi://phoenix:1300/Kontor'...
Server: 'Linux-Kontor Build 13'
And up will pop your Java - Kontor-Login dialog box!
YES! YES! I'M FREE, I'M FREE... WE'RE DONE...! I'M FREE... I'M FREE!!!
Excuse me, (ahem!) we have now finished a basic install of the
Linux-Kontor system. To enter the program leave the 'Client' field
empty, fill the 'User' and 'Password' fields as 'admin' and you will
get to the main menu.
Tip: (Free hint, I forgot who gave it to me. This will circumvent
some error message somewhere, but I don't remember where (this is
it): By the way: Swing doesn't like a JIT (just in time compiler),
at least the JDK I have used (JDK 1.1.6 - 1.1.7). Switch it off
with JAVA_COMPILER="")
I hope you have joined the mailing list. There are five, two -
kontor_en and kontor_doc, are pred english:
* kontor_dev : Developer questions
* kontor_use : User questions
* kontor_en : English discussion
* kontor_doc : English discussion concerning documentation (like
this one :).
* kontor_dbport : Discussion about porting Linux-Kontor to different
databases.
To subscribe (or unsubscribe) send an empty email to one of the
following addresses:
* kontor_dev-request@ios-online.de,
* kontor_use-request@ios-online.de
* kontor_en-request@ios-online.de
* kontor_doc-request@ios-online.de
You can find more information the [76]Linux-Kontor Mailing List site.
Important: THIS IS A BETA RELEASE.... Please direct errors,
corrections and comments back to myself Ron Atkins
<[77]theotiwii@earthlink.net> . Thank you!
Again, thank you to the IoS team, I hope this HOWTO can start other
contributors along the same generous path.
PS: To exit the server, use :-) Send us a note to let us know
you're on board!
_________________________________________________________________
Chapter 6. (un)Common Errors
1. [78]Java Stuff
Q: [79]Can't find class...
Q: [80]With the IBM JDK 1.1.8, the server dies when the client is
started.
Q: [81]java.security.AccessControlException: access denied
2. [82]PostgreSQL Stuff
Q: [83]Stat failed on file '/usr/local/pgsql/lib/refint.so'
Q: [84]Relation 'serials' already exists
Q: [85]SetUserId: user 'empty' is not in 'pg_shadow'
Q: [86]No suitable driver'
Q: [87]No class found for numeric
1. Java Stuff
Q: Can't find class...
Can't find class de.ios.kontor.utils.CSVTreeLoader
Can't find class de.ios.framework.db2.DBObjectSQLServerScript
A: (...Frank Wiesen:) Your CLASSPATH is bad. Somehow you changed
something at IoS/kontor/bin/kontor.server or you moved/removed your
JDK or have bad rights at the files system, so one of the files
containing classes can't be found or is unreadable (especially
framework.jar or classes.zip)...
Q: With the IBM JDK 1.1.8, the server dies when the client is started.
(the client dies, too).
A: The IBM JDK can be used for the server, but then you have to use
the Blackdown JDK for the client (and TYA as JIT, if you like).
We want to use the IBM JDK, too, so we are working on it ...
Q: java.security.AccessControlException: access denied
A: (...Frank Wiesen:) You have a security-problem, cause you are using
a jdk 1.2. Linux-Kontor is based on the jdk 1.1 specification so you
should only use jdk 1.1 versions for running it (jdk 1.2.x versions
are NOT just newer and better versions. With jdk 1.2 some
specifications changed!
This I forgot on the last reply:
Linux-Kontor comes fully compiled with jar-files. Look at the
directories IoS/framework/classes and IoS/kontor/classes.
There you'll find the jar-files.
If you want to recompile it yourself, you'd have to follow the
instructions at the web. But is not necessary and not recommanded if
you didn't change any java-source. When specifying the CLASSPATH for
Win 95, I think you'll have to separate the different paths (jars) by
';' instead of ':'...
(...Darrin Thompson:) I had that problem with JDK1.2.2. I changed the
security policy and now everything appears to work fine under
JDK1.2.2.
Here's how I did it: (I'm no expert, just lucky :)
* create a file in kontor-13/IoS/kontor/bin called policyfile
put in one line:
* grant { permission java.security.AllPermission; };
add this line to kontor.server line 48:
* export
SECURITYPOLICY=-Djava.security.policy\=/usr/local/kontor-13/IoS/ko
ntor/bin/policyfile
add (on my file) line 58: (see it?)
* ${JAVAHOME}/bin/java \
* -mx16M \
* -Dparameters.properties.file=${PROPERTYFILE} \
* ${HOMEOPTION} \
* ${DEBUG} \
* ${SECURITYPOLICY} \ # <- this one!
* $* \
* ${CLASS}
Tada!
Worked for me. This configuration isn't recommended by sun but it gets
you up and running. They say never use AllPermission in a production
environment.
2. PostgreSQL Stuff
Q: Stat failed on file '/usr/local/pgsql/lib/refint.so'
No such file or directory...
A: (...Darrin Thompson:) It's in some "contrib" directory. I installed
on rpm on my Redhat Linux system and it was in
/usr/doc/postgres...contrib... or something.
To be more exact...
* $ locate refine.so
/usr/doc/postgresql-6.5.2/contrib/spi/refint.so
/usr/doc/postgresql-6.5.2/contrib/spi/refint.source
It looks like use installed from a tar ball so it will be somewhere
else for you.
Q: Relation 'serials' already exists
A: (...Ignacio Lopez Porillo Murra:) I got the same 'serials' error. I
eliminated the database and the user:
* destroydb iosdb
destroyuser kontor
I then created them again and that got rid of the problem.
Q: SetUserId: user 'empty' is not in 'pg_shadow'
A: 'empty' should be 'postgres' or not be specified at all, if the
user was created with Postgres-Tools before. I think, you specified
'empty' due to receiving a message: "... empty user expected ..." (we
should change that irritating message) meaning, the script needs a new
user with no tables, views or any other data inside (it's no
error-message but only for information if an error occurs in advance).
Q: No suitable driver'
A: The SQL-Exception is "No suitable driver", that means your
CLASSPATH to your JDBC-driver is wrong (see IoS/kontor/bin:
kontor.server and kontor.client checking the setting of JDBC=...).
Q: No class found for numeric
A: (...Jens Glaser:) Okay I think I have already answered this before
:-) but it looks like you need the updated JDBC driver either on
http://www.jens.de/kontor/postgresql.jar or that one from the current
7.0 PostgreSQL distribution (they are the same).
As a basic rule regarding Linux-Kontor <--> PostgreSQL
interoperability just stick to "the more recent the better" :-)
_________________________________________________________________
Chapter 7. (in)Frequently Asked Questions
1. [88]General
Q: [89]Can Linux-Kontor be run in a web browser
Q: [90]Are there example scripts for Single-user-setup
Q: [91]Is Linux-Kontor being used commonly in a production
environment now?
Q: [92]Is it possible to have some figures from those actually
using Linux-Kontor ?
Q: [93]I want to use a different currency with euro invoices
Q: [94]I want to translate, any advice?
2. [95]Java
Q: [96]What version of Java is best for Linux-Kontor ?
3. [97]PostgreSQL
Q: [98]How important is the version of PostgreSQL one uses?
Q: [99]Is there a graphics of the database structure?
Q: [100]Is it illegal to query 'null' as constant columnvalue?
4. [101]Linux-Kontor
Q: [102]Weight attribute not in PackageKind table
Q: [103]Is there a way to remove an order (other than using
pgsql)?
Q: [104]Customer: Loading of all Customers failed.
Q: [105]Where are the "Administration-Menus?"
Q: [106]Is is possible to have delivery note numbers starting
different from 1
Q: [107]I can't get the user listing from PostgreSQL .
Q: [108]I know that a Java application starts at the method
main(). Where is it?
Q: [109]What about compiling the source?
1. General
Q: Can Linux-Kontor be run in a web browser
A: (...Frank Wiesen:) It should be possible. There's no special
reconfiguration necessary for the server. At IoS/kontor/bin/htdocs you
can find some old html-pages we once used for starting kontor with
Netscape. Have a look at kontor.html. There are several things to
update at this page. You'll have to change the archive specified. For
newer versions of Netscape you can specify more than one archive, so
you don't have to pack all the client-jar-files into ONE all.jar but
can specify all the archives at the same time separated by colon. If
you don't want to load also the swingall.jar with the page from the
web server, you may install it with Netscape directly (didn't do that
yet myself, but somebody else here at IoS already did). As
applet-parameters you may only specify the property-file. But you
can't load it from the file system, cause the Applet isn't
certificated and doesn't have any rights to access the user's file
system. So you have to load it from the Web server, you load the file
from the web server, syntax:
"URL:http://www.xyz.com/path/kontor.client"
BTW: The kontor-server has to run also at the web server due to the
unsigned Applet having only rights to establish connections to the
server it comes from. If you start administration-tools directly
accessing the database, then the database has to run also at the web
server (for the same reason) and once again the same when sending
emails -> mailserver. These restrictions only apply until a
certification of the client (and some little extensions for requesting
the rights becoming available with the certification).
Additional properties defined at bin/kontor.client and bin/kontor.menu
can also be add to the property-file.
Note: As of this writing, Steve Doerr is working with IoS on this
item. Check with the web site for an update!
Q: Are there example scripts for Single-user-setup
A: (...Frank Wiesen:) If you're looking for a single-user-setup, have
a look at the scripts kontor.all.client and kontor.all.menu
(IoS/kontor/bin). This starts a client with an internal server without
using RMI and a Registry. That means, it runs without networking as
far as possible. There are still a few networking-functions used,
cause the superclasses of most of the classes are RMI-classes and they
still run a few RMI-functions so TCP/IP networking still has to be up.
Q: Is Linux-Kontor being used commonly in a production environment
now?
Mainly I'm concerned with Accounts Receivable, Invoicing, and Sales
Order Processing.
A: (...Joachim Schaaf:) The "productive" modules are Customer-,
Orders-, Invoices- and Stock management. The financial accounting
package, to which the General Ledger belongs, is not ready yet.
It is used by a Internet service provider, a print office (Druckerei),
and we use it too. These installations are customer specific versions
of Linux-Kontor and are installed/supported by us (the IoS).
Additionally I have heard of some installations on the mailing lists.
To give some more information: There is no ready-to-use shop solution
for Linux-Kontor and as far as I know no one has done any work with
credit card checking etc. Linux-Kontor 's role in a shop system would
be the back-end, which should be no problem (customer data, orders and
invoices, maybe stocks). The front end could be done with JSP.
Q: Is it possible to have some figures from those actually using
Linux-Kontor ?
At least I would like to have:
* 1) number of orders in the database
* 2) number of invoices
* 3) number of business partners
* 4) number of articles
* 5) number of stock transactions
A: Some numbers from a Linux-Kontor installation (the stock management
runs since 1/1999, orders/invoices/delivery notes since 1/2000): About
~500 orders, delivery notes and invoices, ~5000 business partners,
~1000 articles and ~15000 stock transactions.
In another installation only the business partner and user management
is used: The database contains about ~100000 businesspartners and the
corresponding number of entries in the address, contactperson etc.
tables.[110][17]
Some hundred orders/invoices and some thousand business partners
should be the typical amount of data.
Loading a business partner in the CustomersList (Elenco dei
Businesspartner ;) ) should be very fast, whereas the CustomersView
(the monster dialog) is rather slow.
Q: I want to use a different currency with euro invoices
A: (...Marco Bizzarri:) As you may know, you can print invoices in
euro. However, kontor is assuming prices of articles and other stuff
to be in DM. When you print an invoice, you end with all prices
converted to euro as if they where in DM.
However, you can set a property in your etc/kontor.client, where you
put your change...
For example, for Italian lire, I put in my etc/kontor.client:
* currency.eur.to.dm=1936.27
which is a kludge, but it works ;)
(...Joachim Schaaf:) You will also have to replace some hard coded
"DM" labels.
(...Frank Wiesen:) BTW: If you choose 'euro' as preferred currency for
an order/invoice, the euro-template is used, the complete calculation
of the invoice is done in euro (so you have no rounding-problems on
your printed invoice) and the sum of the invoice is also stored in
euro.
Q: I want to translate, any advice?
A: (...Frank Wiesen:) I've just extended the script for exporting
translated descriptions: IoS/kontor/bin/tools/exportDescriptions.sh
When no parameters are specified, it still exports all descriptions to
RDescription.CSV (IoS/kontor/sql/CSV/).
With the first parameter the language of the descriptions to be
exported can be specified (using the short key for the language like
EN). These descriptions are now exported to a different file not
destroying your original description-file: RDescription. .CSV
(i.e. RDescription.EN.CSV).
Now you can also specify a second language-key. This causes all
descriptions for the first specified language to be exported that have
no translation to the second language. They are exported to the file
RDescription. .not-in. .CSV (i.e.
RDescription.EN.not-in.IT.CSV). So you quickly gain a list of missing
translations for the language you're translating to.
* Checking translation from english to Hungarian:
* exportDescriptions.sh EN HU => RDescription.EN.not-in.HU.CSV
* Checking translation from english to Italian:
* exportDescriptions.sh EN IT => RDescription.EN.not-in.IT.CSV
* Checking, were we at IoS forgot to add the english descriptions
adding only the German ones:
* exportDescriptions.sh DE EN => RDescription.DE.not-in.EN.CSV
* Exporting only your Italian descriptions:
* exportDescriptions.sh IT => RDescription.IT.CSV
* Exporting only your Hungarian descriptions:
* exportDescriptions.sh HU => RDescription.HU.CSV
2. Java
Q: What version of Java is best for Linux-Kontor ?
A: (...Joachim Schaaf:) We can only suggest the Blackdown JDK 1.1.7v3
for Linux "officially", because this is the best tested and most used
one. I have tested the IBM JDK 1.1.8 on Linux , and currently only the
server runs without problems, the client crashes; but the client runs
on another well known operating system ... ;)
3. PostgreSQL
Q: How important is the version of PostgreSQL one uses?
A: (...Frank Wiesen:) We tried with earlier versions of PostgreSQL
before and ran into several problems even with 6.5.2. So without 6.5.3
(or later) you will definitely run into problems. With 6.5.3 only a
little problem with the JDBC driver was left that was fixed by Jens
and became official part of the next JDBC driver.
Q: Is there a graphics of the database structure?
A: On the Web, see http://www.linux-kontor.org/contrib/
(...Christoph Jahn:) If you print the 56 pages you get a 14x4 (width x
height) matrix with page 1 being the lower left corner and page 56
being the upper right one. It looks pretty interesting (and spacious
:-).
Q: Is it illegal to query 'null' as constant columnvalue?
A: (...Jens Glaser:) I've looked into this and it seems that this is
indeed a PostgreSQL issue!!
pgsql does not supply the correct type information for NUMERIC in this
SELECT, so the bug rather lies in pgsql than in the JDBC driver.
Not sure if this is fixed in 7.0, can someone check please? (going to
see for myself, too)
(...Frank Wiesen:) FYI: At Adabas-D such null-values (not directly
related to a db-column - the 'as ...' just gives the value a name but
does not build a relation to a db-column of the same name if even
existing) are typeless and therefore can be combined with any typed
values (which finally gives them a type)...
That's the same way PostgreSQL should handle it, cause it won't know,
what type I expect. So the 'unknown' is right ( PostgreSQL doesn't
know, that I expect a 'NUMERIC' null). But it doesn't need a class for
returning a null-value, so it shouldn't look for a class on
null-values (at least not at 'unknown' types).
4. Linux-Kontor
Q: Weight attribute not in PackageKind table
I'm trying to use the Linux-Kontor PackageView, but when I invoke it,
PostgreSQL complain about weight attribute not being in PackageKind
table... which is right, according to the kontor.create.sql script I
have...
A: At the PostgreSQL -Version of the create-scripts of Linux-Kontor
-13 there were missing 3 columns at the table DelNotePackage and 2
columns at DeliveryNote. (At the CVS-Version this is fixed. Didn't you
recreate your DB after getting the updated classes from the CVS?)
You would have to add them manually. Create a file fix.sql at
IoS/kontor/sql with the following lines (The first line switches to a
mode where errors are shown but the script won't stop.):
* #ON_ERRORS SHOW
* alter table DelNotePackage add weight decimal(18,2);
* alter table DelNotePackage add packageKindOId integer;
* alter table DelNotePackage add shipmentKindOId integer;
* alter table DeliveryNote add deliverydate character(8);
* alter table DeliveryNote add arrivaldate character(8);
Now change to IoS/kontor/bin/tools and run:
* ./execDBScript.sh fix.sql
If you receive no errors (or only errors that the columns already
exist, cause you already added one of these columns) the database is
fixed for Linux-Kontor -13 (the columns "packageKindOId" and
"shipmentKindOId" should be not-null-columns, but I don't know the
conversion-statement for PostgreSQL . With Adabas the two required
lines would look like this (may be, these statements work with
PostgreSQL , too):
* alter table DelNotePackage column packageKindOId not null;
alter table DelNotePackage column shipmentKindOId not null;
But your Linux-Kontor will also run well without that
not-null-conversions.
Q: Is there a way to remove an order (other than using pgsql)?
A: Mark the Order at the Order-List, press "Edit" to load it into the
OrderView then press "Delete"...
Q: Customer: Loading of all Customers failed.
I was trying to use the delivery notes printing... I entered a
customer abbreviation in the customer name field, I hit return, and
ta-da! I got another exception.
A: (...Jens Glaser:) Okay sorry, this is known, too. It has to do with
single quotes (') not being escaped correctly in the function
definition. You could try escaping them using Backslashes.
As the whole replacement for REPLACE (pun intended :-) is kind of a
kludge anyway I propose dropping it completely from the create
scripts. This would simplify installation a lot.
(but we would have to take it out of the queries, too)
Q: Where are the "Administration-Menus?"
Although I think I followed the HOWTO properly (including the line:
./createMainMenu.sh etc/kontor-menu.en), I'm still getting an awful
lot of captions / messages appearing in German. Is there something
more I need to do so that captions and messages appear in english?
A: (...Jens Glaser:) Remember: We have user-specific menus and the
Administration-Menus (by default) are only visible, if you log in as
'admin' (or change your your menu-file removing the entry
'users:admin' and reloading your menu)...
Q: Is is possible to have delivery note numbers starting different
from 1
A: (...Joachim Schaaf:) Do a "select * from serials" and you will see
something like that:
Table 7-1. Default Numbers
TABLENAME NEXTSERIAL
CustomerNumber 10000
DeliveryNoteNumber 1
DNPackageLineEntryRefNum 10000
DNPackageRefNum 10000
InvoiceNumber 10000
OrderLineEntryReferenceNumber 10000
OrderNumber 10000
SERVER_OIDS 58000
StockTransactionId 1000
Change the OrderNumber, InvoiceNumber and DeliveryNoteNumber as you
like. Don't touch the SERVER_OIDS.
Q: I can't get the user listing from PostgreSQL .
A: (...Jens Glaser:) Have you ever tried closing your query with a
SEMICOLON???
Smiley forgotten. Here it is:
;-)
Q: I know that a Java application starts at the method main(). Where
is it?
A: (...Joachim Schaaf:) Linux-Kontor has a client/server architecture,
so there is no single main method. The server main method is in
KontorImpl.java, the (one) client main method is in KontorMainTree.
One business object like a customer, address, stock or order is built
of several classes (controller, factory, view ...); the server classes
have a RMI interface and an implementation. If you are new to Java
this may be a bit too much ;)
...Is there some kind of diagram that has the sequence of methods,
meaning, main() calls something else that calls something else,etc.
For instance: main calls start method that opens the main window...
The Java code is documented (sometimes even well documented ;)), there
is a database diagram (see http://www.linux-kontor.de/contrib/), a
German hackers guide (will be translated) ...
(...Frank Wiesen:) Very important: All Kontor-Views are Applets and
this way can be started directly at browsers. If you add an extension
to main(), it would be lost when starting with a HTML-Page. So the
main you're looking for is "kvInit()" you'd find at every View...
(We are using Applet-Technology, that means the methods init(),
start(), stop() and destroy() mapped to our own methods kvInit(),
kvStart(), kvStop() and kvDestroy() due to the login-process causing a
delay that would normally lockup the browsers at the original
methods.)
Q: What about compiling the source?
A: (...Marco Bizzarri:) On the jiffy site (www.jiffy.de) the available
compiler is jiffy 0.4
You can use it to compile Linux-Kontor , but you have to add another
environment variable, since the name of the binary is different
(jiffyc rather than jiffy).
The variable to use is HAVE_NEW_JIFFY. So, in addition to all other
variables, you have also to set:
* export HAVE_NEW_JIFFY=yes
_________________________________________________________________
Chapter 8. Contributors
I would like to thank all the people who contributed in any way to
improve this HOWTO... including those who have unwittingly found their
name attached to a FAQ[111][18]... :-)
... using my limited skills to alphabitize a list :)...
* Bernd Harmsen <[112]Bernd.Harmsen@myokay.net>
* Carlos Mantilla <[113]carlosmantilla@yifan.net>
* Christoph Jahn <[114]christoph.jahn@gmx.de>
* Colin Breckles <[115]colin@kastlebreck.com>
* Darrin Thompson <[116]dthompson@characterlink.net>
* Frank Peters <[117]puschel@cs.tu-berlin.de>
* Frank Wiesen <[118]fw@pzwo.de>
* Goran Chachich <[119]gcacic@hotmail.com>
* Ignacio Lopez Porillo Murra <[120]ignacio@maico.com.mx>
* Jens Glaser <[121]pge99brq@studserv.uni-leipzig.de>
* Joachim Schaaf <[122]js@pzwo.de>
* Marco Bizzarri <[123]m.bizzarri@icube.it>
* Shawn <[124]mrdojo@hotmail.com>
* Steve Doerr <[125]sdoerr@swbell.net>
Notes
[126][1]
Some scripts (not Linux-Kontor 's) will not run correctly without the
bash shell.
[127][2]
If we run into a need for the DISPLAY to be redirected, I will point
that out.
[128][3]
PostgreSQL requires some work done as ROOT - perhaps there is another
way, but that is "outside the scope of this document" (I've been dying
to use that line).
[129][4]
Even if you don't have a LAN, networking code must be compiled into
your kernel as PostgreSQL 's postmaster and Linux-Kontor 's RMI
(Remote Method Invocation) utilize network sockets for it's
conversations. (This is outside the scope of this HOWTO). If you are
not sure, it will become evident when you try to access PostgreSQL 's
postmaster from your IP-address (later in this document). I will spend
time while in the PostgreSQL installation explaining how to obtain
your hostname and address.
[130][5]
These steps can be skipped by linking directly to the [131]PostgreSQL
FTP site.
[132][6]
Messages on the Linux-Kontor List are suggesting everyone move to the
latest 7.0 beta... but I think Linux-Kontor 14 is where 7.0 fits in,
ask on the list if you're eager! (?).
[133][7]
For those upgrading to 7.0x the JDBC driver from PostgreSQL include
those changes - thanks to Jens Glaser.
[134][8]
Redhat 5.x users CAN upgrade to glibc, I did, way back when. Really,
you would be better off with Redhat 6.x but that's a whole 'nother can
of worms.
[135][9]
If you already have a JDBC class on your disk then be careful about
confusing them. Our JDBC class is called postgresql.jar and is 144893
bits fat, give or take a calorie.
[136][10]
Also, be sure the postmaster is started with the "-i" flag or it won't
listen to the network (yes, that's a bad thing). Note: some versions
of PostgreSQL utilize an initialization file called postmaster.init,
those folks must set "PGALLOWTCPIP=yes" then restart the server,
that's as much as I can tell you.
[137][11]
Don't forget to [138]join or you won't see their response :)
[139][12]
Ron Atkins <[140]theotiwii@earthlink.net>
[141][13]
Steve reports that Debian 's default Java installation doesn't include
these samples
[142][14]
From Java's EUCalendar class
[143][15]
Greenwich Mean Time (GMT) is also known as Universal Time (UTC)
[144][16]
Debian Notes about "serials relations already existing":
You may need to zap the db and user previously created in PostgreSQL
when Ron took you through the test run in his HOWTO. I got errors
about settings already existing in the iosdb when I ran the
createDB.sh script. Here's an approach to clearing this stuff out so
the script will run:
First of all, you must destroy, recreate, and clear everything that is
a problem out before running the createDB.sh script again, as the
script will create settings again that will create problems.
The best way to do this is to write down the problem setting, destroy
the iosdb, recreate it, delete the problem setting, and run the
createDB.sh script again. Then add the next problem you get when you
run the script, if any, to the list above. Then destroy the iosdb,
recreate it, delete both problem settings, and run the script again.
If you get a third problem, add it to the list, and repeat the above.
Look in the directory /usr/include/postgresql/catalog/ to see the
setting types that might be causing a problem, i.e. pg_proc,
pg_language, etc.
Here's how you find and delete the problem settings:
psql iosdb
iosdb=> select * from pg_proc (or pg_language, etc.), where
iosdb=> proname like 'first few letters of whatever setting
iosdb=> that is a problem%' order by proname ;
Now you should delete whatever shows, with some command like:
delete from pg_proc (or pg_language, etc.)where proname like
'first few letters of whatever setting that is a problem%' ;
If you get errors about serials relations already existing you can
check them and clear them by doing the following. This should go into
the list of problems mentioned above.
To see the relations do:
psql iosdb
iosdb => \z
To drop the classtables:
iosdb=> drop table "classtables";
DROP
And to drop the serials relations:
iosdb=> drop table "serials";
DROP
That should do it and your createDB.sh script should work!
[145][17]
The CustomersList doesn't work with 100000 entries ;) ... (but no
problem, in this case a completely "free" search a) would not be
allowed b) would be handled with an open result set).
[146][18]
I began collecting FAQ's without remembering to attribute them. I
apologize for that oversight and for leaving those names off this
list.
|