INSTALL 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. ngIRCd - Next Generation IRC Server
  2. http://ngircd.barton.de/
  3. (c)2001-2012 Alexander Barton and Contributors.
  4. ngIRCd is free software and published under the
  5. terms of the GNU General Public License.
  6. -- INSTALL --
  7. I. Upgrade Information
  8. ~~~~~~~~~~~~~~~~~~~~~~
  9. Differences to version 17
  10. - Support for ZeroConf/Bonjour/Rendezvous service registration has been
  11. removed. The configuration option "NoZeroconf" is no longer available.
  12. - The structure of ngircd.conf has been cleaned up and three new configuration
  13. sections have been introduced: [Limits], [Options], and [SSL].
  14. Lots of configuration variables stored in the [Global] section are now
  15. deprecated there and should be stored in one of these new sections (but
  16. still work in [Global]):
  17. "AllowRemoteOper" -> [Options]
  18. "ChrootDir" -> [Options]
  19. "ConnectIPv4" -> [Options]
  20. "ConnectIPv6" -> [Options]
  21. "ConnectRetry" -> [Limits]
  22. "MaxConnections" -> [Limits]
  23. "MaxConnectionsIP" -> [Limits]
  24. "MaxJoins" -> [Limits]
  25. "MaxNickLength" -> [Limits]
  26. "NoDNS" -> [Options], and renamed to "DNS"
  27. "NoIdent" -> [Options], and renamed to "Ident"
  28. "NoPAM" -> [Options], and renamed to "PAM"
  29. "OperCanUseMode" -> [Options]
  30. "OperServerMode" -> [Options]
  31. "PingTimeout" -> [Limits]
  32. "PongTimeout" -> [Limits]
  33. "PredefChannelsOnly" -> [Options]
  34. "SSLCertFile" -> [SSL], and renamed to "CertFile"
  35. "SSLDHFile" -> [SSL], and renamed to "DHFile"
  36. "SSLKeyFile" -> [SSL], and renamed to "KeyFile"
  37. "SSLKeyFilePassword" -> [SSL], and renamed to "KeyFilePassword"
  38. "SSLPorts" -> [SSL], and renamed to "Ports"
  39. "SyslogFacility" -> [Options]
  40. "WebircPassword" -> [Options]
  41. You should adjust your ngircd.conf and run "ngircd --configtest" to make
  42. sure that your settings are correct and up to date!
  43. Differences to version 16
  44. - Changes to the "MotdFile" specified in ngircd.conf now require a ngircd
  45. configuration reload to take effect (HUP signal, REHASH command).
  46. Differences to version 0.9.x
  47. - The option of the configure script to enable support for Zeroconf/Bonjour/
  48. Rendezvous/WhateverItIsNamedToday has been renamed:
  49. --with-rendezvous -> --with-zeroconf
  50. Differences to version 0.8.x
  51. - The maximum length of passwords has been raised to 20 characters (instead
  52. of 8 characters). If your passwords are longer than 8 characters then they
  53. are cut at an other position now.
  54. Differences to version 0.6.x
  55. - Some options of the configure script have been renamed:
  56. --disable-syslog -> --without-syslog
  57. --disable-zlib -> --without-zlib
  58. Please call "./configure --help" to review the full list of options!
  59. Differences to version 0.5.x
  60. - Starting with version 0.6.0, other servers are identified using asynchronous
  61. passwords: therefore the variable "Password" in [Server]-sections has been
  62. replaced by "MyPassword" and "PeerPassword".
  63. - New configuration variables, section [Global]: MaxConnections, MaxJoins
  64. (see example configuration file "doc/sample-ngircd.conf"!).
  65. II. Standard Installation
  66. ~~~~~~~~~~~~~~~~~~~~~~~~~
  67. ngIRCd is developed for UNIX-based systems, which means that the installation
  68. on modern UNIX-like systems that are supported by GNU autoconf and GNU
  69. automake ("configure") should be no problem.
  70. The normal installation procedure after getting (and expanding) the source
  71. files (using a distribution archive or GIT) is as following:
  72. 0) Satisfy prerequisites
  73. 1) ./autogen.sh [only necessary when using GIT]
  74. 2) ./configure
  75. 3) make
  76. 4) make install
  77. (Please see details below!)
  78. Now the newly compiled executable "ngircd" is installed in its standard
  79. location, /usr/local/sbin/.
  80. The next step is to configure and afterwards starting the daemon. Please
  81. have a look at the ngircd(8) and ngircd.conf(5) manual pages for details
  82. and all possible options -- and don't forget to run "ngircd --configtest"
  83. to validate your configuration file!
  84. If no previous version of the configuration file exists (the standard name
  85. is /usr/local/etc/ngircd.conf), a sample configuration file containing all
  86. possible options will be installed there. You'll find its template in the
  87. doc/ directory: sample-ngircd.conf.
  88. 0): Satisfy prerequisites
  89. When building from source, you'll need some other software to build ngIRCd:
  90. for example a working C compiler, make tool, GNU automake and autoconf (only
  91. when not using a distribution archive), and a few libraries depending on the
  92. features you want to compile in (like IDENT support, SSL, and PAM).
  93. If you are using one of the "big" operating systems or Linux distributions,
  94. you can use the following commands to install all the required packages to
  95. build the sources including all optional features and to run the test suite:
  96. * RedHat / Fedora based distributions:
  97. yum install \
  98. autoconf automake expect gcc glibc-devel gnutls-devel \
  99. libident-devel make pam-devel tcp_wrappers-devel telnet zlib-devel
  100. * Debian / Ubuntu based distributions:
  101. apt-get install \
  102. autoconf automake build-essential expect libgnutls-dev \
  103. libident-dev libpam-dev libwrap0-dev libz-dev telnet
  104. 1): "autogen.sh"
  105. The first step, autogen.sh, is only necessary if the configure-script isn't
  106. already generated. This never happens in official ("stable") releases in
  107. tar.gz-archives, but when using GIT.
  108. This step is therefore only interesting for developers.
  109. autogen.sh produces the Makefile.in's, which are necessary for the configure
  110. script itself, and some more files for make. To run autogen.sh you'll need
  111. GNU autoconf and GNU automake (use recent versions! autoconf 2.53 and
  112. automake 1.6.1 are known to work).
  113. Again: "end users" do not need this step!
  114. 2): "./configure"
  115. The configure-script is used to detect local system dependencies.
  116. In the perfect case, configure should recognize all needed libraries, header
  117. files and so on. If this shouldn't work, "./configure --help" shows all
  118. possible options.
  119. In addition, you can pass some command line options to "configure" to enable
  120. and/or disable some features of ngIRCd. All these options are shown using
  121. "./configure --help", too.
  122. Compiling a static binary will avoid you the hassle of feeding a chroot dir
  123. (if you want use the chroot feature). Just do something like:
  124. CFLAGS=-static ./configure [--your-options ...]
  125. Then you can use a void directory as ChrootDir (like OpenSSH's /var/empty).
  126. 3): "make"
  127. The make command uses the Makefiles produced by configure and compiles the
  128. ngIRCd daemon.
  129. 4): "make install"
  130. Use "make install" to install the server and a sample configuration file on
  131. the local system. Normally, root privileges are necessary to complete this
  132. step. If there is already an older configuration file present, it won't be
  133. overwritten.
  134. These files and folders will be installed by default:
  135. - /usr/local/sbin/ngircd: executable server
  136. - /usr/local/etc/ngircd.conf: sample configuration (if not already present)
  137. - /usr/local/share/doc/ngircd/: documentation
  138. - /usr/local/share/man/: manual pages
  139. III. Additional features
  140. ~~~~~~~~~~~~~~~~~~~~~~~~
  141. The following optional features can be compiled into the daemon by passing
  142. options to the "configure" script. Most options can handle a <path> argument
  143. which will be used to search for the required libraries and header files in
  144. the given paths ("<path>/lib/...", "<path>/include/...") in addition to the
  145. standard locations.
  146. * Syslog Logging (autodetected by default):
  147. --with-syslog[=<path>] / --without-syslog
  148. Enable (disable) support for logging to "syslog", which should be
  149. available on most modern UNIX-like operating systems by default.
  150. * ZLib Compression (autodetected by default):
  151. --with-zlib[=<path>] / --without-zlib
  152. Enable (disable) support for compressed server-server links.
  153. The Z compression library ("libz") is required for this option.
  154. * IO Backend (autodetected by default):
  155. --with-select[=<path>] / --without-select
  156. --with-poll[=<path>] / --without-poll
  157. --with-devpoll[=<path>] / --without-devpoll
  158. --with-epoll[=<path>] / --without-epoll
  159. --with-kqueue[=<path>] / --without-kqueue
  160. ngIRCd can use different IO "backends": the "old school" select() and poll()
  161. API which should be supported by most UNIX-like operating systems, or the
  162. more efficient and flexible epoll() (Linux >=2.6), kqueue() (BSD) and
  163. /dev/poll APIs.
  164. By default the IO backend is autodetected, but you can use "--without-xxx"
  165. to disable a more enhanced API.
  166. When using the epoll() API, support for select() is compiled in as well by
  167. default to enable the binary to run on older Linux kernels (<2.6), too.
  168. * IDENT-Support:
  169. --with-ident[=<path>]
  170. Include support for IDENT ("AUTH") lookups. The "ident" library is
  171. required for this option.
  172. * TCP-Wrappers:
  173. --with-tcp-wrappers[=<path>]
  174. Include support for Wietse Venemas "TCP Wrappers" to limit client access
  175. to the daemon, for example by using "/etc/hosts.{allow|deny}".
  176. The "libwrap" is required for this option.
  177. * PAM:
  178. --with-pam[=<path>]
  179. Enable support for PAM, the Pluggable Authentication Modules library.
  180. See doc/PAM.txt for details.
  181. * SSL:
  182. --with-openssl[=<path>]
  183. --with-gnutls[=<path>]
  184. Enable support for SSL/TLS using OpenSSL or gnutls libraries.
  185. See doc/SSL.txt for details.
  186. * IPv6:
  187. --enable-ipv6
  188. Adds support for version 6 of the Internet Protocol.
  189. IV. Useful make-targets
  190. ~~~~~~~~~~~~~~~~~~~~~~~
  191. The Makefile produced by the configure-script contains always these useful
  192. targets:
  193. - clean: delete every product from the compiler/linker
  194. next step: -> make
  195. - distclean: the above plus erase all generated Makefiles
  196. next step: -> ./configure
  197. - maintainer-clean: erase all automatic generated files
  198. next step: -> ./autogen.sh
  199. V. Sample configuration file ngircd.conf
  200. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  201. In the sample configuration file, there are comments beginning with "#" OR
  202. ";" -- this is only for the better understanding of the file.
  203. The file is separated in five blocks: [Global], [Features], [Operator],
  204. [Server], and [Channel].
  205. In the [Global] section, there is the main configuration like the server
  206. name and the ports, on which the server should be listening. Options in
  207. the [Features] section enable or disable functionality in the daemon.
  208. IRC operators of this server are defined in [Operator] blocks, remote
  209. servers are configured in [Server] sections, and [Channel] blocks are
  210. used to configure pre-defined ("persistent") IRC channels.
  211. The meaning of the variables in the configuration file is explained in the
  212. "doc/sample-ngircd.conf", which is used as sample configuration file in
  213. /usr/local/etc after running "make install" (if you don't already have one)
  214. and in the ngircd.conf(5) manual page.
  215. VI. Command line options
  216. ~~~~~~~~~~~~~~~~~~~~~~~~
  217. These parameters could be passed to the ngIRCd:
  218. -f, --config <file>
  219. The daemon uses the file <file> as configuration file rather than
  220. the standard configuration /usr/local/etc/ngircd.conf.
  221. -n, --nodaemon
  222. ngIRCd should be running as a foreground process.
  223. -p, --passive
  224. Server-links won't be automatically established.
  225. -t, --configtest
  226. Reads, validates and dumps the configuration file as interpreted
  227. by the server. Then exits.
  228. Use "--help" to see a short help text describing all available parameters
  229. the server understands, with "--version" the ngIRCd shows its version
  230. number. In both cases the server exits after the output.
  231. Please see the ngircd(8) manual page for complete details!