Newer
Older
# INSTALL -- installation instructions for the LysKOM server
# Copyright (C) 1991, 1993 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
#
# LysKOM is free software; 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 1, or (at your option)
# any later version.
#
# LysKOM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with LysKOM; see the file COPYING. If not, write to
# Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
# or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
# MA 02139, USA.
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
#
Requirements:
1) ANSI C compiler, preferably GNU CC.
LysKOM is written in ANSI C, with full prototypes. If your compiler
doesn't support prototypes you'd better get gcc (the GNU C compiler).
It is available freely via anonymous from many sites, e.g. isy.liu.se
The server was written with the assumption that full prototypes was
available for all functions in the standard libraries, so we don't
cast our pointers. This could lead to errors if no function prototypes
are given by the include files.
2) Decent make
We use the "include" statement in our Makefiles. Get GNU make if your
make does not support it.
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
INSTALLING
In the following, $T stands for the directory in which this file
(INSTALL) resides.
4) Edit $T/src/server/server-config.c.
The things that you might want to change are:
Set DEFAULT_DBASE_DIR to the directory in which you want to have
all LysKOM files. This directory will be populated with the
following:
db/lyskomd-data # The database, sans all text.
db/lyskomd-backup # Copy of lyskomd-data.
db/lyskomd-texts # All written text.
etc/lyskomd-log # log file.
etc/pid # Process Id of the running server.
etc/memory-usage # Created each time the server quits.
etc/stdout.log # Should always be empty.
etc/stderr.log # Another log file.
bin/lyskomd # The server.
bin/dbck # Data base check program.
bin/updateLysKOM # Run by cron.
SYNC_INTERVAL tells how often the server will update the data base
on the disk.
DEFAULT_NICE tells how many days texts will exists before they are
expired. There is an expire limit for each conference that is
created. It can be set individually for each conference. This is
the default value.
DEFAULT_CLIENT_SERVICE and DEFAULT_MUX_SERVICE are strings that
contains a symbolic name for the TCP/IP port that the server uses
to accept connections from clients and muxes. (Muxes are not
released yet). The "standard" port for LysKOM clients is 4894, and
for muxes 4895. You must either change DEFAULT_CLIENT_SERVICE from
"lyskom" to "4894" (and similar for DEFAULT_MUX_SERVICE) or add the
following two lines to /etc/services. (Note that some unixes don't
allow blank lines in /etc/services!).
--------------- Add these two lines to /etc/services ----------------
lyskom 4894/tcp # LysKOM MUX (Client)
lyskom-mux 4895/tcp # LysKOM server (MUX)
---------------------------------------------------------------------
5) Edit src/server/tmp-limits.h
There is a hardcoded limit to the number of persons and texts that
LysKOM supports. The limit won't be hardcoded in future releases.
LysKOM currently has a table that holds as many entries as is said
here, so it is wasteful to have a too big number here. On the
other hand, you must recompile and restart the server when the
limit is reached, so it is unwise to set it too low.
6) Type
./configure
This creates a shell script named "config.status" and runs it.
That shell script creates the Makefiles that are needed to compile
LysKOM. It contains a very large sed statement, which breaks some
operating systems/versions of sed. If that happens, try running
"fixconfig":
./fixconfig
./config.status
"fixconfig" works by splitting the sed statement into two. If the
argument list is still too large, you could probably split the sed
statement into more parts.
By default, the configure script will use gcc if it can find that
compiler. Otherwise it will fall back on using cc. If you want to
use a different compiler you can specify it like this (assuming
that you are using a shell with /bin/sh-like syntax):
CC=vcc ./configure
You might want to add the -v option to configure, to get more
feedback during the configuration.
If you use vcc the configuration script might not be able to
correctly find out which libraries you have. You will have to edit
src/server/Makefile and delete i.e. -lsocket, -lnsl and probably a
few other libraries. And even if you do that, vcc will probably
not be able to link lyskomd. The loader seems to be totally
broken.
./Build
or, maybe, (from a bash shell)
./Build >build.log 2>&1 &
and wait... This will build src/server/lyskomd and
src/server/dbck. If you get an error message from ld about
libresolv.a just omit "-lresolv" from LIBS in src/server/Makefile,
or fix your resolv library. The message might look like
gethostnamadr.o: Undefined symbol __GLOBAL_OFFSET_TABLE_ referenced from
The file session.c will not compile with gcc 2.4.5 on an HP
9000/300 unless you manually turn of the optimization for that
file. gcc gets an internal error. The bug has been reported to
FSF, so future versions of gcc should not exhibit this problem.
8) Ask root to create a user `lyskom' (or a name of your choice).
9) Create the directory that you specified as DEFAULT_DBASE_DIR in
step 4. Recursively copy the contents of $T/db-crypt into
DEFAULT_DBASE_DIR/db: (The remainder of this file assumes that
DEFAULT_DBASE_DIR is /usr/lyskom).
su lyskom
mkdir /usr/lyskom
cd /usr/lyskom
mkdir db
cp $T/db-crypt/db/* db
mkdir etc
mkdir bin
cp $T/run-support/updateLysKOM bin/updateLysKOM
cp $T/src/server/lyskomd $T/src/server/dbck bin
chmod 700 db
mkdir cores
Since the texts are stored in the database file with no encryption
whatsoever it might be a good idea to make it read protected.
If lyskomd should dump a core for some reason the core file will be
written in the directory `cores'.
Edit the script updateLysKOM and fix the path to lyskomd. When
finished, do
chmod 4711 bin/updateLysKOM
updateLysKOM is a setuid shellscript that is run by cron. See
doc/ADMINISTRATION. We know that not all Unixes supports setuid
shellscripts, and that it is a bad idea to have them. Note that
this script is setuid lyskom, not setuid root, so this is not a
threat to overall system security. updateLysKOM will be a real
program in the next release of LysKOM.
11) Arrange so that cron will run updateLysKOM regularly.
If you are running on a sun you can do like this:
echo '17,47 * * * * /usr/lyskom/bin/updateLysKOM' | crontab
Other systems might require that you "su root" and add the line
17,47 * * * * /usr/lyskom/bin/updateLysKOM
to /etc/crontab.
12) Fetch the most recent lyskom client from ftp.lysator.liu.se.
Since currently the only working client is written in emacs lisp,
you will have to get the elisp program elisp-client and install it
so that your load-path in emacs finds it. (Or, if you have
privileges, you can save the file anywhere and add an autoload in
defaults.el - see the emacs documentation). Wait until cron starts
lyskomd, or start it manually by running updateLysKOM. Start the
client in an emacs:
emacs
M-x load-lib RET lyskom
M-x lyskom
Log in as "p 5" with password "gazonk". Change the password with
"a[ndra l|senord" (in the Swedish client). There is an alfa-release
of an english client. Its commands should +++ be listed here also.
Change the names of all conferences (there are four of them) and
the administrator (person number 5) if you are not pleased with them.
Person 5 has all privilege bits set, so he is a very powerful user.
To be able to use his powers he must enable them (with "a\verg} till
administrat|rsmode").
Announce the new LysKOM server to the intended audience.
13) We would like to know about where LysKOM servers are running. If
you start a server, please mail "kom@lysator.liu.se", and tell us
your email address. (You are very welcome to tell more about you,
but that's not necessary). We will tell you when we make new
releases, and warn you if we should find any serious problems.
LysKOM needs your attention once in a while. Here at Lysator we
expunge old texts (with "dbck -g") approximately once every 2
months, and restarts the server after about 1000 connection
attempts (a little more than one week).