home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 35 Internet / 35-Internet.zip / ircu210.zip / INSTALL < prev    next >
Text File  |  1997-04-25  |  12KB  |  333 lines

  1. This the UnderNet IRC daemon.
  2.  
  3. The installation of the IRC daemon (ircd) exists of the following steps:
  4.  
  5. 1) Untar the package.
  6. 2) cd into the base directory.
  7. 3) Edit Makefile
  8. 4) Edit config.h
  9. 5) Run ./Config
  10. 6) `make'
  11. 7) `make install'
  12.  
  13. 1) Untar the package
  14. ====================
  15.  
  16. The name of the package is something like `ircu2.x.y.z.tgz', where
  17. "x.y.z" is the current release (at the time of writing we have
  18. ircu2.10.00.beta3.tgz).
  19.  
  20. You need `gzip', the GNU unzip command, to uncompress this package.
  21. You can download this from every GNU ftp site for almost any Operating system.
  22.  
  23. If you have GNU tar, type:
  24.  
  25. tar xzf ircu2.x.y.z.tgz
  26.  
  27. where "ircu2.x.y.z.tgz" is the name of the package.
  28.  
  29. If you your tar doesn't support the 'z' flag, you can type alternatively:
  30.  
  31. gzip -dc ircu2.x.y.z.tgz | tar xf -
  32.  
  33. Both methods result in a directory "ircu2.x.y.z" in your current directory.
  34.  
  35. 2) cd into the base directory
  36. =============================
  37.  
  38. Make this directory your current directory by typing:
  39.  
  40. cd ircu2.x.y.z
  41.  
  42. where "ircu2.x.y.z" is the name of the unpacked directory.
  43.  
  44. 3) Edit Makefile
  45. ================
  46.  
  47. Use your favourite editor (like vi or emacs) to edit Makefile.
  48. Forinstance, when your favourite editor is `vi', type:
  49.  
  50. vi Makefile
  51.  
  52. Note that you do not need to change any other Makefile.
  53.  
  54. The Makefile defines some variables in the format 'VARIABLE=...',
  55. where 'VARIABLE' is one of: CC, RM, INCLUDEDIR, CFLAGS, IRCDLIBS, LDFLAGS,
  56. IRCDMODE, SHELL, SUBDIRS, BINDIR, MANDIR, INSTALL and MAKE.
  57.  
  58. For some of these variables examples are given for several operating
  59. systems. These examples are commented out by means of a '#' at the
  60. start of the line. If you find your operating system among them, comment
  61. out the lines that belong to your Operating System.
  62.  
  63. It should not be necessary to change anything else in most cases. However,
  64. here is a full description of all variables in case you have compile or
  65. link problems:
  66.  
  67. -------------------------------------------------------------------------------
  68.  
  69. CC=gcc
  70.  
  71. This is your compiler. If you have 'gcc' use it. Otherwise you're best bet
  72. is to use 'cc'. It is allowed to give a full path if your compiler is not
  73. in your PATH, or if you want to specifically want to use a different compiler.
  74. An example is:
  75.  
  76. CC=/usr/ucb/cc
  77.  
  78. [ Note that this compiler MUST be an ANSI C compiler. Some compilers need
  79.   an extra option to compile ANSI C. In those cases you can add these options
  80.   also to this line. For example, on a HPUX-8.x you would use (if you don't
  81.   have gcc):
  82.  
  83.  CC=cc -Aa -D_HPUX_SOURCE
  84.  
  85.  If you don't have an ANSI compiler, install gcc; you'll never regret that! ]
  86.  
  87. -------------------------------------------------------------------------------
  88.  
  89. RM=/bin/rm
  90.  
  91. This should be the full path to your `rm' command. It is very unlikely you
  92. need to change it.
  93.  
  94. [ Note that it is allowed to leave away the full path, but then `rm' needs
  95.   to be in your PATH. It is slightly dangerous to do so because you might
  96.   execute `rm' as root using this package, and `rm' could be an alias on
  97.   your system, adding unknown commandline parameters. ]
  98.  
  99. -------------------------------------------------------------------------------
  100.  
  101. INCLUDEDIR=../include
  102.  
  103. Don't change this. If your System needs an extra include directory, add it
  104. to CFLAGS, see below.
  105.  
  106. -------------------------------------------------------------------------------
  107.  
  108. CFLAGS=-I$(INCLUDEDIR) -g -O
  109.  
  110. These are the compiler flags, used for CC when compiling.
  111. If you are not using gcc, it might be possible that your compile is not
  112. supporting -g and -O at the same time.  The -g option is necessary to be
  113. able to debug the daemon in the case it contains a bug that makes the
  114. ircd core dump. Unless you use a version that is proven to be VERY stable,
  115. it is highly recommended to use this option. All Undernet production servers
  116. are expected to use it in order to help coder-com to track down bugs.
  117. The -O will optimize the code - it also makes debugging harder.
  118. If you are not running a production server you should remove the -O.
  119.  
  120. Ircd developers can optionally use more options to turn on extra warnings.
  121. Developers (which are using gcc of course ;), should use:
  122.  
  123. CFLAGS=-I$(INCLUDEDIR) -g -ansi -Wall -pedantic
  124.  
  125. Note that the server uses several NON-ANSI function calls, by using
  126. '-ansi' during compile time it might occur that the proto types for these
  127. non-ANSI functions will not be included anymore from your system headerfiles
  128. (this is especially the case with linux, which is pretty strict in this).
  129. The daemon will then declare these proto types itself, in order to suppress
  130. the warning, and it will still link anyway because the -ansi flag has no
  131. influence on the linking. However, when you run './Config' it will use the
  132. same CFLAGS, and incorrectly decide that you do not have a certain function
  133. while you DO have it (this also happens when you need to link with extra
  134. libraries but forget to add them to your IRCDLIBS). Therefore, be aware
  135. that when you use -ansi, the resulting include/setup.h might not be what you
  136. expect. However, don't change setup.h because Config is probably right that
  137. it will not compile. For example, on linux, with -ansi, you will use the
  138. prototypes and headers of the ircd resolv lib, but still link with the
  139. system resolv library (this happens to work ;).
  140.  
  141. -------------------------------------------------------------------------------
  142.  
  143. IRCDLIBS=
  144.  
  145. Some Operating Systems need extra libraries, see the comments for the different
  146. Operating Systems in the Makefile.  In some cases, it is not known which
  147. libraries are needed, even when the Operating System is known.  This is
  148. for instance the case with SunOS, some need -lresolv, while others don't.
  149. If you forget to add a library then this will result in 'undefined variables'
  150. during linking. If you do not know which library to add, it might be
  151. helpfull to use the unix command `nm', which lists the variables of a
  152. library. Forinstance, if you get "unknown variable '_res_mkquery'", and you
  153. wonder if this is in /usr/lib/libresolv.so, you can do:
  154.  
  155. nm /usr/lib/libresolv.so | grep res_mkquery
  156.  
  157. Do not use the leading '_' in the grep, this underscore is added by the
  158. assembler but is not part of the original variable name and does not show
  159. up in the output of nm.
  160.  
  161. Most libraries are in /lib or /usr/lib, which are scanned by default. In
  162. some cases you will need to tell the linker where to search for a library.
  163. You can do this by adding an -L... option to IRCDLIBS. For instance:
  164.  
  165. IRCDLIBS=-L/usr/ucblib -lucb
  166.  
  167. will look for 'libucb.so' in /usr/ucblib too.
  168.  
  169. -------------------------------------------------------------------------------
  170.  
  171. IRCDMODE = 4711
  172.  
  173. By using this default mode, the ircd will automatically run with the
  174. user id of the owner of the ircd binary.
  175. The prefered (secure) way of running the daemon is by using a special
  176. user (for example 'ircd'), which has access to the ircd.conf, the log files
  177. if any etc. If you run the daemon as a developer, it might be handy to
  178. run it as a normal binary, and not allow others to start it. In that case
  179. you can use:
  180.  
  181. IRCDMODE = 700
  182.  
  183. -------------------------------------------------------------------------------
  184.  
  185. LDFLAGS=
  186.  
  187. Extremely unlikely you need this. It are extra flags send to the linker.
  188. (You could use it to add your -L.. flag actually, instead of putting it
  189.  in IRCDLIBS).
  190.  
  191. -------------------------------------------------------------------------------
  192.  
  193. IRCDDIR=/usr/local/lib/ircd
  194.  
  195. This is the directory that the configuration file, ircd.conf, must be
  196. put in. Along with the ircd.motd (Message Of The Day).
  197. This directory should of course be readable by the user under which the
  198. daemon will run (like `ircd').
  199. Note that this directory must be the same as DPATH in config.h.
  200.  
  201. -------------------------------------------------------------------------------
  202.  
  203. SHELL=/bin/sh
  204.  
  205. The full path to the shell used to execute a few scripts. Don't change it.
  206.  
  207. -------------------------------------------------------------------------------
  208.  
  209. SUBDIRS=ircd
  210.  
  211. Don't change this.
  212.  
  213. -------------------------------------------------------------------------------
  214.  
  215. BINDIR=$(IRCDDIR)
  216.  
  217. This is where the ircd binary will be installed. If you want the binary
  218. to be put elsewhere, you can change this.  The default is the same
  219. directory as where the ircd.conf and ircd.motd are.
  220.  
  221. -------------------------------------------------------------------------------
  222.  
  223. MANDIR=/usr/local/man
  224.  
  225. This is the base directory where the manual page of the ircd is installed.
  226. If you are not root on your system, you can change it to your personal
  227. manpath directory (which of course should be in your MANPATH environment
  228. variable then).
  229.  
  230. -------------------------------------------------------------------------------
  231.  
  232. INSTALL=/usr/bin/install
  233.  
  234. The full path to the install command. If you do not have it, you should
  235. NOT execute the 'make install' command, but install the ircd by hand.
  236.  
  237. -------------------------------------------------------------------------------
  238.  
  239. MAKE=...
  240.  
  241. Don't change this.
  242.  
  243.  
  244. 4) Edit config.h
  245. ================
  246.  
  247. Use your favourite editor to edit config.h, which is in the same directory
  248. as the Makefile.  The config.h should be self explaining, and most options
  249. are correctly set to the default. However, some are specific to your
  250. system and MUST be changed.
  251.  
  252. a) #define any of the macros AIX, MIPS, SVR3, DYNIXPTX, ESIX or NEXT
  253. when you are on one of these systems (only one can be defined).
  254.  
  255. b) Change DOMAINNAME to the domain of the machine you run the ircd on.
  256. This is only used by the /stats w.
  257.  
  258. c) Change RANDOM_SEED to be an arbitray eight digit string.
  259.  
  260. d) Change DPATH to the same directory as defined in the Makefile, the
  261. directory where you will put your ircd.conf.
  262.  
  263. e) Change SPATH to the binary you want to be restarted when issuing a
  264. /RESTART. This could be a symbolic link to the real binary for instance.
  265.  
  266. f) Define HUB if you are going to use your server as HUB.
  267.  
  268. Other changes are not mandatory - read the comments in the config.h
  269. to decide wether or not you want to change them.
  270.  
  271. However, the following defines should NOT be changed, they should be the
  272. same on all servers:
  273.  
  274. NICK_DELAY, SHOW_ALL_INVISIBLE_USERS, MAXIMUM_LINKS, PORTNUM,
  275. NICKNAMEHISTORYLENGTH, CONNECTTIMEOUT, KILLCHASETIMELIMIT,
  276. MAXCHANNELSPERUSER, MAXSILES, MAXSILELENGTH.
  277.  
  278. If you want to change any of these, you should first discuss this with
  279. the other admins of the net.work.
  280.  
  281.  
  282. 5) Run ./Config
  283. ===============
  284.  
  285. It should work when you use the default for everything: Just hit return
  286. till it finishes.  You might double check include/setup.h to see if it
  287. thinks you don't have something which you DO have, in that case please
  288. E-mail the maintainer.
  289.  
  290. 6) `make'
  291. =========
  292.  
  293. Type:
  294.  
  295. make
  296.  
  297. in the base directory. It should compile without errors or warnings.
  298. Please mail any problem to the maintainer, but only AFTER you made sure
  299. you did everything of the above the right way. If you want your Operating
  300. System to be supported in future releases, you best make a patch that
  301. actually fixes the problem. The best patches are those that only change
  302. include/sys.h. Never change anything without using an #ifdef .. #endif
  303. specific for your OS !
  304.  
  305.  
  306. 7) `make install'
  307. =================
  308.  
  309. This should install the ircd and the man page. Please recheck the
  310. permissions of the binary.
  311. You need to create some of the logfiles that you have chosen by hand
  312. (for instance with 'touch') before the ircd starts writing to them.
  313. If you accidently defined M4_PREPROC in config.h, you NEED to have
  314. an ircd.m4 (which can be empty) in IRCDDIR, or else the daemon won't run.
  315. And of course, you need a syntactically correct ircd.conf there. See the
  316. docs for some info on this. Also create an ircd.motd with the text of
  317. your MOTD. Again, all of these files should be readable by the ircd, and
  318. the logfiles should be writeable.
  319.  
  320.  
  321. In case of problems
  322. ===================
  323.  
  324. If you have problems with starting the ircd, edit config.h and
  325. #define DEBUGMODE. Recompile the ircd, and run it by hand as:
  326.  
  327. ircd -t -x9
  328.  
  329. This will write debug output to your screen, probably showing why it
  330. doesn't start.
  331.  
  332. Don't use a server with DEBUGMODE defined on a production net.
  333.