                            Hybrid INSTALL Document

   $Id: INSTALL,v 7.39 2003/10/13 02:15:16 metalrock Exp $

   Copyright (c) 2001 by ircd-hybrid team

     ----------------------------------------------------------------------

   +------------------------------------------------------------------------+
   | Note for those who don't bother reading docs:                          |
   |                                                                        |
   | Reading INSTALL is now a must, as the old DPATH is now specified when  |
   | configure is run.                                                      |
   |                                                                        |
   | - You now need to ./configure --prefix="/path/to/install/it" as a      |
   |   minimum. Try ./configure --help or read this file for more info on   |
   |   the possible options you can pass to configure.                      |
   |                                                                        |
   | - Important: The old config format WILL NOT WORK. Please see point 6!  |
   |                                                                        |
   | - The old kline format WILL NOT WORK. Please see point 7!              |
   +------------------------------------------------------------------------+

   ***** EFNET NOTE *****
   You should run ./configure with the option '--enable-efnet' to tweak
   some options to be EFNet based.  You must also use the example.efnet.conf
   instead of example.conf.  Please see note 7 for information about
   converting old configs to new.
   **********************

     ----------------------------------------------------------------------

                                  HOW TO BUILD

   As of hybrid-4, the distribution uses GNU autoconf instead of the old
   Config script. You must run ./configure before you can (sanely) build
   ircd-hybrid.
   
   1.  Read the RELNOTES file to find out about the exciting new features in
       this version. Other good reads are doc/whats-new.txt, BUGS,
       etc/example.conf, and README.FIRST.

       An example.conf for EFnet is in etc/ with the values "approved" as of
       October 12th, 2003 called example.efnet.conf.

   2.  Run the configure script. It will create include/setup.h and the
       Makefiles to match your system. In hybrid-7, the paths are now handled
       with the --prefix option to configure.
       /usr/local/ircd is the default if no prefix is specified.

       ./configure --prefix="/usr/local/ircd"

       The script will determine whichever of the following is best for 
       your system, but you may (unsupported) force their usage with 
       undefined results:

          * --enable-kqueue - Use the superior kqueue(2) system call as
            opposed to the default poll(2). This is currently only available
            on FreeBSD 4.1 or higher.

          * --enable-devpoll - Enable the superior /dev/poll support on
            Solaris. Linux /dev/poll is broken and will not work with this
            option.

          * --enable-rtsigio - Enable the superior Linux RealTime Signal I/O
            system. This is currently only available on 2.4 Linux kernel
            versions or later.

	  * --enable-poll - Use POSIX poll(2).

	  * --enable-select - Use POSIX select(2).

          * --enable-clobber - Don't preserve the old binaries on make install

	  Incidentally, the order of listing above is the order of auto-
	  detection in configure. So if you do have kqueue but wish to
	  enable select(2) instead (bad idea), you must use --enable-select.

          * --enable-openssl - Enable the openssl dependent crypto functions.
            This will allow CHALLENGE to work and encrypted links. On systems
            where the configure script can automatically detect OpenSSL, this
            option is not necessary. If configure cannot find OpenSSL, you
            must specify a path with this option
            (--enable-openssl=/path/to/openssl)

       These are optional or have default values that may be overridden:
   
          * --disable-shared-modules - Disable module support. This option is
            more secure, but reduces a lot of the flexibility in Hybrid 7.
            This may need to be used on some systems without a working
            dlopen/dlsym.

          * --enable-assert - Enable use of numerous debugging checks. This
            should not be used on any production servers for maximum speed
	    so as to prevent cores from things that shouldn't normally happen.

          * --enable-small-net - Tunes the server for smaller networks by
            reducing the startup memory footprint. This should really only be
            used for *small* networks, as this tends to be a performance hit
            on larger networks.

	  * --enable-syslog=kill/squit/connect/users/oper, separated by
	    spaces, in quotes - Enables syslog logging, with events you specify
	    (none is okay too, and logs the most essential messages only.)

	  * --enable-syslog-facility=FACILITY - Check with your sysadmin to see
	    what this should be; by default it is LOG_LOCAL4. If you get it wrong
	    initially, no problem; just edit the value in include/setup.h.

          * --with-nicklen,
	    --with-topiclen - Respectively, sets the maximum NICK length and
	    maximum TOPIC length. Note that this must be consistent across your
	    entire network. Defaults are 9 and 120, respectively.

	  * --with-maxconn - Sets the maximum number of connections the ircd
	    can support. Note that this also twiddles the HARD_FDLIMIT.
	    If HARD_FDLIMIT ends up being larger that FD_SETSIZE when using
	    select() for your I/O loop, s_bsd_select.c will refuse to compile
	    (and tell you to use poll instead). Take this error's advice and
	    use --enable-poll or something a bit more efficient. You'll be
	    happier at the end of the day for it.

	  * --disable-zlib - Build the ircd without ziplinks support.

   3.  make should build ircd.

   4.  make install will install the server, modules(1), and tools in the
       path with the prefix specified when configure was run.

       (1) Unless the server was compiled without module support.

   5.  If you wish to enable the user log, oper log, and failed oper log,
       issue these commands at the shell prompt (in the prefix directory)

 $ touch logs/userlog
 $ touch logs/operlog
 $ touch logs/foperlog

         Note: If you use different names in ircd.conf, you must 'touch' the
         specific names.

   6.  If you are upgrading from Hybrid 5 or Hybrid 6, the config file has
       changed drastically...

       There is a utility to convert your old config file to the new format.
       In prefix/bin there is something called "convertconf". Its usage is:
       ./convertconf (old config file to convert) (converted file name)

       Convertconf will NOT convert I: lines.  You must use "convertilines"
       for this which contains a much superior method of conversion and
       will group I: together under one auth {};.

       Once this is done, move your new config to prefix/etc/ircd.conf and
       EDIT IT! There are still things that need changing in the config,
       including the fact that classes MUST be above auth/connect blocks!

   7.  If you are upgrading from Hybrid 5 or Hybrid 6, the kline file has
       also changed...

       There is a utility to convert the old kline configuration file to the
       new format. In prefix/bin there is a program called "convertklines".
       Its usage is: ./convertklines (old kline.conf filename) (new
       kline.conf filename) (dline.conf filename).

       Once this is done, move the new files into the prefix/etc/ directory
       under their proper names. By default, the kline file is named
       kline.conf and the dline file is named dline.conf.

     ----------------------------------------------------------------------

                                HOW TO GET HELP

   Send Check or Money Order to... just kidding! You're on your own for
   support. Try asking other ircd-hybrid admins on EFnet if you can't fix it
   yourself. If you do fix anything, however, please send context or unified
   diffs to ircd-hybrid@the-project.org so the fixes can be incorporated into
   the next release of ircd-hybrid. If hybrid crashes on you, PLEASE contact
   ircd-hybrid@the-project.org ASAP with a backtrace of the core. The Hybrid
   team can't fix bugs if no one tells us about them!

   There is now a mailing list for general discussion of Hybrid. To subscribe,
   send an emal to listmanager@the-project.org with a single line in the body
   containing "subscribe hybrid". 

     ----------------------------------------------------------------------

                                     NOTES

   The best way to get a backtrace of the core is to follow this sequence of
   instructions:

   1.  Change to the directory containing the core file

   2.  Run gdb on the binary and the core file. With an unmodified Hybrid-7
       installation, an example command line is below (in the /usr/local/ircd
       directory)

 $ gdb bin/ircd ircd.core

   3.  At the "(gdb)" prompt, enter the command "bt full"

   4.  Save the output of the backtrace command and send it to
       ircd-hybrid@the-project.org.

   5.  Be sure to save the ircd binary, the modules, and the core file in a
       safe place in case the developers need to look deeper than a backtrace
       provides.
