Commit 3c1b04ac authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Updated/rewritten for LysKOM 1.6.

parent 72c942e6
# INSTALL -- installation instructions for the LysKOM server
# $Id: INSTALL,v 1.13 1993/10/16 18:09:19 ceder Exp $
#
# $Id: INSTALL,v 1.14 1994/03/06 22:36:57 ceder Exp $
# Copyright (C) 1991, 1993 Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
......@@ -22,9 +23,21 @@
#
# Please mail bug reports to bug-lyskom@lysator.liu.se.
#
Requirements:
1) ANSI C compiler, preferably GNU CC.
This file describes how to build and install a LysKOM server.
Table of Contents:
------------------
1. Requirements
2. Building and installing (simplified version)
3. Building (details you normally don't need to know)
4. Installing (details you normally don't need to know)
1. Requirements:
----------------
1.1 ANSI C compiler, such as 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).
......@@ -36,212 +49,192 @@ 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.
LysKOM has been tested on the following environments:
Sun 3, SunOS 4.1.1_U1, gcc 2.5.7
Sequent Balance 8000, Dynix 3.0.14, gcc 2.4.5
* Sun Sparc, SunOS 5.3 (Solaris 2.3), gcc
* Sun Sparc, SunOS 4.x, acc
* dumle
* hilbert
* shuksan
* rydvax?
INSTALLING
*) Not yet tested. This is still an alpha release.
In the following, $T stands for the directory in which this file
(INSTALL) resides.
It should compile on most other Unix machines as well. Please tell me
if you succeed in compiling it with another machine/OS/compiler.
1.2 Decent make
4) Edit $T/src/server/server-config.c.
We use the "include" statement in our Makefiles. Get GNU make if your
make does not support it.
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:
2. INSTALLING (quick version)
--------------------------
1. Select a location where you want the LysKOM database and server
binaries to reside.
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.
2. From the top directory of the server sources, run configure:
SYNC_INTERVAL tells how often the server will update the data base
on the disk.
$ ./configure --prefix=/usr/local/lyskom
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.
The prefix defaults to /usr/lyskom.
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!).
2b. Edit src/server/tmp-limits.h
--------------- Add these two lines to /etc/services ----------------
lyskom 4894/tcp # LysKOM MUX (Client)
lyskom-mux 4895/tcp # LysKOM server (MUX)
---------------------------------------------------------------------
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.
5) Edit src/server/tmp-limits.h
All other parameters (which used to be hardcoded) can now be set
in a configuration file which is read in everytime lyskomd is
started. See lyskomd.8 (in doc/man/lyskomd.8).
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.
3. Compile it:
6) Type
$ make all
./configure
4. Create a user "lyskom".
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":
5. As "lyskom", install it:
./fixconfig
./config.status
$ make install
"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.
This will install the server and man pages. It will also
install an empty database, unless it finds an old database. The
empty database will contain four stanard conferences and one
privileged user, "Administrat|r (f|r) LysKOM", with password
"gazonk".
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):
6. Make sure updateLysKOM is run regularly by user lyskom. The
recommended way is to add a line such as this to the cron file
of the lyskom user:
CC=vcc ./configure
0,10,20,30,40,50 * * * * /usr/lyskom/bin/updateLysKOM
You might want to add the -v option to configure, to get more
feedback during the configuration.
If your cron does not support per-user cron files you will have
to arrange this in some other way.
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.
7. Wait for upateLysKOM to start the server, or run updateLysKOM
manually. You are ready.
7) Type
8. Read the doc/ADMINISTRATION file. It tells you how to shut down
and restart lyskomd. 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).
./Build
9. 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.
or, maybe, (from a bash shell)
3. BUILDING -- the details
--------------------------
./Build >build.log 2>&1 &
This section describes how to build a lyskom server, after you have
run "make pure" (which removes everything which can be built from some
other file). This section also describes everything you can change to
get different behavior.
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
1. Generate the configure script from configure.in. This requires
GNU autoconf (we have been using version 1.7).
gethostnamadr.o: Undefined symbol __GLOBAL_OFFSET_TABLE_ referenced from
text segment
$ autoconf
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.
2. Generate Makefile.in from Makefile.src. There is
(almost) one Makefile.src per directory. As of this writing,
there are 16 of them.
8) Ask root to create a user `lyskom' (or a name of your choice).
$ ./mkmi
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).
The mkmi script uses m4 to process all Makefile.in templates.
The file scripts/mkmi.m4 contains m4 macro definitions which are
used. If you want to change how the Makefiles work, it is
probably there you have to do the change. The Makefile.in files
which are distributed with lyskomd 1.6 were generated using GNU
m4 version 1.1.
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
3. Run configure, to generate Makefile from Makefile.in. You do
not have to compile in the source directory. This can be useful
if you build the server for several architectures at once (but,
unless you are preparing a new release and want to test it on
several architectures, there is probably no need to do it.) To
compile in a separate directory, do like this:
Since the texts are stored in the database file with no encryption
whatsoever it might be a good idea to make it read protected.
$ mkdir compilation-dir
$ cd compilation-dir
$ ../lyskom-1.6/configure
If lyskomd should dump a core for some reason the core file will be
written in the directory `cores'.
The configure script understands (at least) these options:
10) Fix updateLysKOM
-v Verbose. Print the result of the tests.
--prefix=path Tell lyskomd where it should be installed.
Note that this path will be compiled into the
programs, so try to get it right.
Edit the script updateLysKOM and fix the path to lyskomd. When
finished, do
The configure script also adheres to some environment variables,
among them are:
chmod 4711 bin/updateLysKOM
CC C compiler to use
CFLAGS Flags to pass when compiling. The configure script
will add additional flags.
LDFLAGS Flags to pass when linking. The configure script will
add additional flags.
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.
You should not normally need to set these environment variables,
but you might have to clear them, to avoid confusing the
configure script.
4. Install include files. During the build, various source files
are installed in the directory include. This step also
generates some include files and various other automatically
generated files.
11) Arrange so that cron will run updateLysKOM regularly.
$ make includes
If you are running on a sun you can do like this:
5. Create dependency files.
echo '17,47 * * * * /usr/lyskom/bin/updateLysKOM' | crontab
$ make depend
Other systems might require that you "su root" and add the line
You might want to "make stamp-depend" instead. That target
starts a "make depend" and touches the file "stamp-depend". The
target "all" depends on "stamp-depend" to make sure that "make
depend" is run once (and only once).
17,47 * * * * /usr/lyskom/bin/updateLysKOM
6. Create libraries.
to /etc/crontab.
$ make libraries
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:
The libraris are installed in the lib directory.
emacs
M-x load-lib RET lyskom
M-x lyskom
7. Make the binaries.
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.
$ make binaries
Change the names of all conferences (there are four of them) and
the administrator (person number 5) if you are not pleased with them.
"make all" will automatically do step 4-7 for you.
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").
8. Install everything.
Announce the new LysKOM server to the intended audience.
$ make install
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.
This will create the installation directories and install
everything which is necessary to run a LysKOM server. If there
is no database, a new will be copied from dbcrypt/db.
14) Read the file doc/ADMINISTRATION.
4. INSTALLATION - the details
-----------------------------
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).
This chapter is not yet written. But let it be known that although
the server can be configured to find files in various location via the
configuration file, the updateLysKOM program contains the paths
hard-coded. This might be fixed in future releases.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment