home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 35 Internet
/
35-Internet.zip
/
ircu210.zip
/
INSTALL
< prev
next >
Wrap
Text File
|
1997-04-25
|
12KB
|
333 lines
This the UnderNet IRC daemon.
The installation of the IRC daemon (ircd) exists of the following steps:
1) Untar the package.
2) cd into the base directory.
3) Edit Makefile
4) Edit config.h
5) Run ./Config
6) `make'
7) `make install'
1) Untar the package
====================
The name of the package is something like `ircu2.x.y.z.tgz', where
"x.y.z" is the current release (at the time of writing we have
ircu2.10.00.beta3.tgz).
You need `gzip', the GNU unzip command, to uncompress this package.
You can download this from every GNU ftp site for almost any Operating system.
If you have GNU tar, type:
tar xzf ircu2.x.y.z.tgz
where "ircu2.x.y.z.tgz" is the name of the package.
If you your tar doesn't support the 'z' flag, you can type alternatively:
gzip -dc ircu2.x.y.z.tgz | tar xf -
Both methods result in a directory "ircu2.x.y.z" in your current directory.
2) cd into the base directory
=============================
Make this directory your current directory by typing:
cd ircu2.x.y.z
where "ircu2.x.y.z" is the name of the unpacked directory.
3) Edit Makefile
================
Use your favourite editor (like vi or emacs) to edit Makefile.
Forinstance, when your favourite editor is `vi', type:
vi Makefile
Note that you do not need to change any other Makefile.
The Makefile defines some variables in the format 'VARIABLE=...',
where 'VARIABLE' is one of: CC, RM, INCLUDEDIR, CFLAGS, IRCDLIBS, LDFLAGS,
IRCDMODE, SHELL, SUBDIRS, BINDIR, MANDIR, INSTALL and MAKE.
For some of these variables examples are given for several operating
systems. These examples are commented out by means of a '#' at the
start of the line. If you find your operating system among them, comment
out the lines that belong to your Operating System.
It should not be necessary to change anything else in most cases. However,
here is a full description of all variables in case you have compile or
link problems:
-------------------------------------------------------------------------------
CC=gcc
This is your compiler. If you have 'gcc' use it. Otherwise you're best bet
is to use 'cc'. It is allowed to give a full path if your compiler is not
in your PATH, or if you want to specifically want to use a different compiler.
An example is:
CC=/usr/ucb/cc
[ Note that this compiler MUST be an ANSI C compiler. Some compilers need
an extra option to compile ANSI C. In those cases you can add these options
also to this line. For example, on a HPUX-8.x you would use (if you don't
have gcc):
CC=cc -Aa -D_HPUX_SOURCE
If you don't have an ANSI compiler, install gcc; you'll never regret that! ]
-------------------------------------------------------------------------------
RM=/bin/rm
This should be the full path to your `rm' command. It is very unlikely you
need to change it.
[ Note that it is allowed to leave away the full path, but then `rm' needs
to be in your PATH. It is slightly dangerous to do so because you might
execute `rm' as root using this package, and `rm' could be an alias on
your system, adding unknown commandline parameters. ]
-------------------------------------------------------------------------------
INCLUDEDIR=../include
Don't change this. If your System needs an extra include directory, add it
to CFLAGS, see below.
-------------------------------------------------------------------------------
CFLAGS=-I$(INCLUDEDIR) -g -O
These are the compiler flags, used for CC when compiling.
If you are not using gcc, it might be possible that your compile is not
supporting -g and -O at the same time. The -g option is necessary to be
able to debug the daemon in the case it contains a bug that makes the
ircd core dump. Unless you use a version that is proven to be VERY stable,
it is highly recommended to use this option. All Undernet production servers
are expected to use it in order to help coder-com to track down bugs.
The -O will optimize the code - it also makes debugging harder.
If you are not running a production server you should remove the -O.
Ircd developers can optionally use more options to turn on extra warnings.
Developers (which are using gcc of course ;), should use:
CFLAGS=-I$(INCLUDEDIR) -g -ansi -Wall -pedantic
Note that the server uses several NON-ANSI function calls, by using
'-ansi' during compile time it might occur that the proto types for these
non-ANSI functions will not be included anymore from your system headerfiles
(this is especially the case with linux, which is pretty strict in this).
The daemon will then declare these proto types itself, in order to suppress
the warning, and it will still link anyway because the -ansi flag has no
influence on the linking. However, when you run './Config' it will use the
same CFLAGS, and incorrectly decide that you do not have a certain function
while you DO have it (this also happens when you need to link with extra
libraries but forget to add them to your IRCDLIBS). Therefore, be aware
that when you use -ansi, the resulting include/setup.h might not be what you
expect. However, don't change setup.h because Config is probably right that
it will not compile. For example, on linux, with -ansi, you will use the
prototypes and headers of the ircd resolv lib, but still link with the
system resolv library (this happens to work ;).
-------------------------------------------------------------------------------
IRCDLIBS=
Some Operating Systems need extra libraries, see the comments for the different
Operating Systems in the Makefile. In some cases, it is not known which
libraries are needed, even when the Operating System is known. This is
for instance the case with SunOS, some need -lresolv, while others don't.
If you forget to add a library then this will result in 'undefined variables'
during linking. If you do not know which library to add, it might be
helpfull to use the unix command `nm', which lists the variables of a
library. Forinstance, if you get "unknown variable '_res_mkquery'", and you
wonder if this is in /usr/lib/libresolv.so, you can do:
nm /usr/lib/libresolv.so | grep res_mkquery
Do not use the leading '_' in the grep, this underscore is added by the
assembler but is not part of the original variable name and does not show
up in the output of nm.
Most libraries are in /lib or /usr/lib, which are scanned by default. In
some cases you will need to tell the linker where to search for a library.
You can do this by adding an -L... option to IRCDLIBS. For instance:
IRCDLIBS=-L/usr/ucblib -lucb
will look for 'libucb.so' in /usr/ucblib too.
-------------------------------------------------------------------------------
IRCDMODE = 4711
By using this default mode, the ircd will automatically run with the
user id of the owner of the ircd binary.
The prefered (secure) way of running the daemon is by using a special
user (for example 'ircd'), which has access to the ircd.conf, the log files
if any etc. If you run the daemon as a developer, it might be handy to
run it as a normal binary, and not allow others to start it. In that case
you can use:
IRCDMODE = 700
-------------------------------------------------------------------------------
LDFLAGS=
Extremely unlikely you need this. It are extra flags send to the linker.
(You could use it to add your -L.. flag actually, instead of putting it
in IRCDLIBS).
-------------------------------------------------------------------------------
IRCDDIR=/usr/local/lib/ircd
This is the directory that the configuration file, ircd.conf, must be
put in. Along with the ircd.motd (Message Of The Day).
This directory should of course be readable by the user under which the
daemon will run (like `ircd').
Note that this directory must be the same as DPATH in config.h.
-------------------------------------------------------------------------------
SHELL=/bin/sh
The full path to the shell used to execute a few scripts. Don't change it.
-------------------------------------------------------------------------------
SUBDIRS=ircd
Don't change this.
-------------------------------------------------------------------------------
BINDIR=$(IRCDDIR)
This is where the ircd binary will be installed. If you want the binary
to be put elsewhere, you can change this. The default is the same
directory as where the ircd.conf and ircd.motd are.
-------------------------------------------------------------------------------
MANDIR=/usr/local/man
This is the base directory where the manual page of the ircd is installed.
If you are not root on your system, you can change it to your personal
manpath directory (which of course should be in your MANPATH environment
variable then).
-------------------------------------------------------------------------------
INSTALL=/usr/bin/install
The full path to the install command. If you do not have it, you should
NOT execute the 'make install' command, but install the ircd by hand.
-------------------------------------------------------------------------------
MAKE=...
Don't change this.
4) Edit config.h
================
Use your favourite editor to edit config.h, which is in the same directory
as the Makefile. The config.h should be self explaining, and most options
are correctly set to the default. However, some are specific to your
system and MUST be changed.
a) #define any of the macros AIX, MIPS, SVR3, DYNIXPTX, ESIX or NEXT
when you are on one of these systems (only one can be defined).
b) Change DOMAINNAME to the domain of the machine you run the ircd on.
This is only used by the /stats w.
c) Change RANDOM_SEED to be an arbitray eight digit string.
d) Change DPATH to the same directory as defined in the Makefile, the
directory where you will put your ircd.conf.
e) Change SPATH to the binary you want to be restarted when issuing a
/RESTART. This could be a symbolic link to the real binary for instance.
f) Define HUB if you are going to use your server as HUB.
Other changes are not mandatory - read the comments in the config.h
to decide wether or not you want to change them.
However, the following defines should NOT be changed, they should be the
same on all servers:
NICK_DELAY, SHOW_ALL_INVISIBLE_USERS, MAXIMUM_LINKS, PORTNUM,
NICKNAMEHISTORYLENGTH, CONNECTTIMEOUT, KILLCHASETIMELIMIT,
MAXCHANNELSPERUSER, MAXSILES, MAXSILELENGTH.
If you want to change any of these, you should first discuss this with
the other admins of the net.work.
5) Run ./Config
===============
It should work when you use the default for everything: Just hit return
till it finishes. You might double check include/setup.h to see if it
thinks you don't have something which you DO have, in that case please
E-mail the maintainer.
6) `make'
=========
Type:
make
in the base directory. It should compile without errors or warnings.
Please mail any problem to the maintainer, but only AFTER you made sure
you did everything of the above the right way. If you want your Operating
System to be supported in future releases, you best make a patch that
actually fixes the problem. The best patches are those that only change
include/sys.h. Never change anything without using an #ifdef .. #endif
specific for your OS !
7) `make install'
=================
This should install the ircd and the man page. Please recheck the
permissions of the binary.
You need to create some of the logfiles that you have chosen by hand
(for instance with 'touch') before the ircd starts writing to them.
If you accidently defined M4_PREPROC in config.h, you NEED to have
an ircd.m4 (which can be empty) in IRCDDIR, or else the daemon won't run.
And of course, you need a syntactically correct ircd.conf there. See the
docs for some info on this. Also create an ircd.motd with the text of
your MOTD. Again, all of these files should be readable by the ircd, and
the logfiles should be writeable.
In case of problems
===================
If you have problems with starting the ircd, edit config.h and
#define DEBUGMODE. Recompile the ircd, and run it by hand as:
ircd -t -x9
This will write debug output to your screen, probably showing why it
doesn't start.
Don't use a server with DEBUGMODE defined on a production net.