]> arthur.barton.de Git - ngircd.git/blob - INSTALL.md
Migrate info from INSTALL.md into doc/QuickStart.md
[ngircd.git] / INSTALL.md
1 # [ngIRCd](https://ngircd.barton.de) - Internet Relay Chat Server
2
3 This document explains how to install, the lightweight Internet Relay Chat
4 (IRC) server.
5
6 The first section lists noteworthy changes to earlier releases; you definitely
7 should read this when upgrading your setup! But you can skip over this section
8 when you do a fresh installation.
9
10 All the subsequent sections describe the steps required to build and install
11 ngIRCd from sources. The information given here is not relevant when you are
12 using packages provided by your operating system vendor or third-party
13 repositories.
14
15 Please see the file `doc/QuickStart.md` in the `doc/` directory and
16 [online](https://ngircd.barton.de/doc/QuickStart.md) on the homepage for
17 information about configuring ngIRCd, including some configuration examples.
18
19 ## Upgrade Information
20
21 Differences to version 25
22
23 - **Attention**:
24   All already deprecated legacy options (besides the newly deprecated *Key* and
25   *MaxUsers* settings, see below) were removed in ngIRCd 26, so make sure to
26   update your configuration before upgrading, if you haven't done so already
27   (you got a warning on daemon startup when using deprecated options): you can
28   check your configuration using `ngircd --configtest` -- which is a good idea
29   anyway ;-)
30
31 - Setting modes for predefined channels in *[Channel]* sections has been
32   enhanced: now you can set *all* modes, like in IRC "MODE" commands, and have
33   this setting multiple times per *[Channel]* block. Modifying lists (ban list,
34   invite list, exception list) is supported, too.
35
36   Both the *Key* and *MaxUsers* settings are now deprecated and should be
37   replaced by `Modes = +l <limit>` and `Modes = +k <key>` respectively.
38
39 Differences to version 22.x
40
41 - The *NoticeAuth* `ngircd.conf` configuration variable has been renamed to
42   *NoticeBeforeRegistration*. The old *NoticeAuth* variable still works but
43   is deprecated now.
44
45 - The default value of the SSL *CipherList* variable has been changed to
46   "HIGH:!aNULL:@STRENGTH:!SSLv3" (OpenSSL) and "SECURE128:-VERS-SSL3.0"
47   (GnuTLS) to disable the old SSLv3 protocol by default.
48
49   To enable connections of clients still requiring the weak SSLv3 protocol,
50   the *CipherList* must be set to its old value (not recommended!), which
51   was "HIGH:!aNULL:@STRENGTH" (OpenSSL) and "SECURE128" (GnuTLS), see below.
52
53 Differences to version 20.x
54
55 - Starting with ngIRCd 21, the ciphers used by SSL are configurable and
56   default to "HIGH:!aNULL:@STRENGTH" (OpenSSL) or "SECURE128" (GnuTLS).
57   Previous version were using the OpenSSL or GnuTLS defaults, "DEFAULT"
58   and "NORMAL" respectively.
59
60 - When adding GLINE's or KLINE's to ngIRCd 21 (or newer), all clients matching
61   the new mask will be KILL'ed. This was not the case with earlier versions
62   that only added the mask but didn't kill already connected users.
63
64 - The *PredefChannelsOnly* configuration variable has been superseded by the
65   new *AllowedChannelTypes* variable. It is still supported and translated to
66   the appropriate *AllowedChannelTypes* setting but is deprecated now.
67
68 Differences to version 19.x
69
70 - Starting with ngIRCd 20, users can "cloak" their hostname only when the
71   configuration variable *CloakHostModeX* (introduced in 19.2) is set.
72   Otherwise, only IRC operators, other servers, and services are allowed to
73   set mode +x. This prevents regular users from changing their hostmask to
74   the name of the IRC server itself, which confused quite a few people ;-)
75
76 Differences to version 17.x
77
78 - Support for ZeroConf/Bonjour/Rendezvous service registration has been
79   removed. The configuration option *NoZeroconf* is no longer available.
80
81 - The structure of `ngircd.conf` has been cleaned up and three new configuration
82   sections have been introduced: *[Limits]*, *[Options]*, and *[SSL]*.
83
84   Lots of configuration variables stored in the *[Global]* section are now
85   deprecated there and should be stored in one of these new sections (but
86   still work in *[Global]*):
87
88   - *AllowRemoteOper*    -> [Options]
89   - *ChrootDir*          -> [Options]
90   - *ConnectIPv4*        -> [Options]
91   - *ConnectIPv6*        -> [Options]
92   - *ConnectRetry*       -> [Limits]
93   - *MaxConnections*     -> [Limits]
94   - *MaxConnectionsIP*   -> [Limits]
95   - *MaxJoins*           -> [Limits]
96   - *MaxNickLength*      -> [Limits]
97   - *NoDNS*              -> [Options], and renamed to *DNS*
98   - *NoIdent*            -> [Options], and renamed to *Ident*
99   - *NoPAM*              -> [Options], and renamed to *PAM*
100   - *OperCanUseMode*     -> [Options]
101   - *OperServerMode*     -> [Options]
102   - *PingTimeout*        -> [Limits]
103   - *PongTimeout*        -> [Limits]
104   - *PredefChannelsOnly* -> [Options]
105   - *SSLCertFile*        -> [SSL], and renamed to *CertFile*
106   - *SSLDHFile*          -> [SSL], and renamed to *DHFile*
107   - *SSLKeyFile*         -> [SSL], and renamed to *KeyFile*
108   - *SSLKeyFilePassword* -> [SSL], and renamed to *KeyFilePassword*
109   - *SSLPorts*           -> [SSL], and renamed to *Ports*
110   - *SyslogFacility*     -> [Options]
111   - *WebircPassword*     -> [Options]
112
113   You should adjust your `ngircd.conf` and run `ngircd --configtest` to make
114   sure that your settings are correct and up to date!
115
116 Differences to version 16.x
117
118 - Changes to the *MotdFile* specified in `ngircd.conf` now require a ngIRCd
119   configuration reload to take effect (HUP signal, *REHASH* command).
120
121 Differences to version 0.9.x
122
123 - The option of the configure script to enable support for Zeroconf/Bonjour/
124   Rendezvous/WhateverItIsNamedToday has been renamed:
125
126   - `--with-rendezvous`  ->  `--with-zeroconf`
127
128 Differences to version 0.8.x
129
130 - The maximum length of passwords has been raised to 20 characters (instead
131   of 8 characters). If your passwords are longer than 8 characters then they
132   are cut at an other position now.
133
134 Differences to version 0.6.x
135
136 - Some options of the configure script have been renamed:
137
138   - `--disable-syslog`  ->  `--without-syslog`
139   - `--disable-zlib`    ->  `--without-zlib`
140
141   Please call `./configure --help` to review the full list of options!
142
143 Differences to version 0.5.x
144
145 - Starting with version 0.6.0, other servers are identified using asynchronous
146   passwords: therefore the variable *Password* in *[Server]*-sections has been
147   replaced by *MyPassword* and *PeerPassword*.
148
149 - New configuration variables, section *[Global]*: *MaxConnections*, *MaxJoins*
150   (see example configuration file `doc/sample-ngircd.conf`!).
151
152 ## Standard Installation
153
154 *Note*: This sections describes installing ngIRCd *from sources*. If you use
155 packages available for your operating system distribution you should skip over
156 and continue with the *Configuration* section, see below.
157
158 ngIRCd is developed for UNIX-based systems, which means that the installation
159 on modern UNIX-like systems that are supported by GNU autoconf and GNU
160 automake ("`configure` script") should be no problem.
161
162 The normal installation procedure after getting (and expanding) the source
163 files (using a distribution archive or Git) is as following:
164
165 1) Satisfy prerequisites
166 2) `./autogen.sh` [only necessary when using "raw" sources with Git]
167 3) `./configure`
168 4) `make`
169 5) `make install`
170
171 (Please see details below!)
172
173 Now the newly compiled executable "ngircd" is installed in its standard
174 location, `/usr/local/sbin/`.
175
176 If no previous version of the configuration file exists (the standard name
177 is `/usr/local/etc/ngircd.conf)`, a sample configuration file containing all
178 possible options will be installed there. You'll find its template in the
179 `doc/` directory: `sample-ngircd.conf`.
180
181 The next step is to configure and afterwards start the daemon. See the section
182 *Configuration* below.
183
184 ### Satisfy prerequisites
185
186 When building from source, you'll need some other software to build ngIRCd:
187 for example a working C compiler, make tool, and a few libraries depending on
188 the feature set you want to enable at compile time (like IDENT, SSL, and PAM).
189
190 And if you aren't using a distribution archive ("tar.gz" file), but cloned the
191 plain source archive, you need a few additional tools to generate the build
192 system itself: GNU automake and autoconf, as well as pkg-config.
193
194 If you are using one of the "big" operating systems or Linux distributions,
195 you can use the following commands to install all the required packages to
196 build the sources including all optional features and to run the test suite:
197
198 #### Red Hat / Fedora based distributions
199
200 ``` shell
201   yum install \
202     autoconf automake expect gcc glibc-devel gnutls-devel \
203     libident-devel make pam-devel pkg-config tcp_wrappers-devel \
204     telnet zlib-devel
205 ```
206
207 #### Debian / Ubuntu based distributions
208
209 ``` shell
210   apt-get install \
211     autoconf automake build-essential expect libgnutls28-dev \
212     libident-dev libpam-dev pkg-config libwrap0-dev libz-dev telnet
213 ```
214
215 #### ArchLinux based distributions
216
217 ``` shell
218   pacman -S --needed \
219     autoconf automake expect gcc gnutls inetutils libident libwrap \
220     make pam pkg-config zlib
221 ```
222
223 ### `./autogen.sh`
224
225 The first step, to run `./autogen.sh`, is *only* necessary if the `configure`
226 script itself isn't already generated and available. This never happens in
227 official ("stable") releases in "tar.gz" archives, but when cloning the source
228 code repository using Git.
229
230 **This step is therefore only interesting for developers!**
231
232 The `autogen.sh` script produces the `Makefile.in`'s, which are necessary for
233 the configure script itself, and some more files for `make(1)`.
234
235 To run `autogen.sh` you'll need GNU autoconf, GNU automake and pkg-config: at
236 least autoconf 2.61 and automake 1.10 are required, newer is better. But don't
237 use automake 1.12 or newer for creating distribution archives: it will work
238 but lack "de-ANSI-fication" support in the generated Makefile's! Stick with
239 automake 1.11.x for this purpose ...
240
241 So *automake 1.11.x* and *autoconf 2.67+* is recommended.
242
243 Again: "end users" do not need this step and neither need GNU autoconf nor GNU
244 automake at all!
245
246 ### `./configure`
247
248 The `configure` script is used to detect local system dependencies.
249
250 In the perfect case, `configure` should recognize all needed libraries, header
251 files and so on. If this shouldn't work, `./configure --help` shows all
252 possible options.
253
254 In addition, you can pass some command line options to `configure` to enable
255 and/or disable some features of ngIRCd. All these options are shown using
256 `./configure --help`, too.
257
258 Compiling a static binary will avoid you the hassle of feeding a chroot dir
259 (if you want use the chroot feature). Just do something like:
260
261 ``` shell
262   CFLAGS=-static ./configure [--your-options ...]
263 ```
264
265 Then you can use a void directory as ChrootDir (like OpenSSH's `/var/empty`).
266
267 ### `make`
268
269 The `make(1)` command uses the `Makefile`'s produced by `configure` and
270 compiles the ngIRCd daemon.
271
272 ### `make install`
273
274 Use `make install` to install the server and a sample configuration file on
275 the local system. Normally, root privileges are necessary to complete this
276 step. If there is already an older configuration file present, it won't be
277 overwritten.
278
279 These files and folders will be installed by default:
280
281 - `/usr/local/sbin/ngircd`: executable server
282 - `/usr/local/etc/ngircd.conf`: sample configuration (if not already present)
283 - `/usr/local/share/doc/ngircd/`: documentation
284 - `/usr/local/share/man/`: manual pages
285
286 ### Additional features
287
288 The following optional features can be compiled into the daemon by passing
289 options to the `configure` script. Most options can handle a `<path>` argument
290 which will be used to search for the required libraries and header files in
291 the given paths (`<path>/lib/...`, `<path>/include/...`) in addition to the
292 standard locations.
293
294 - Syslog Logging (autodetected by default):
295
296   `--with-syslog[=<path>]` / `--without-syslog`
297
298   Enable (disable) support for logging to "syslog", which should be
299   available on most modern UNIX-like operating systems by default.
300
301 - ZLib Compression (autodetected by default):
302
303   `--with-zlib[=<path>]` / `--without-zlib`
304
305   Enable (disable) support for compressed server-server links.
306   The Z compression library ("libz") is required for this option.
307
308 - IO Backend (autodetected by default):
309
310   - `--with-select[=<path>]` / `--without-select`
311   - `--with-poll[=<path>]` / `--without-poll`
312   - `--with-devpoll[=<path>]` / `--without-devpoll`
313   - `--with-epoll[=<path>]` / `--without-epoll`
314   - `--with-kqueue[=<path>]` / `--without-kqueue`
315
316   ngIRCd can use different IO "backends": the "old school" `select(2)` and
317   `poll(2)` API which should be supported by most UNIX-like operating systems,
318   or the more efficient and flexible `epoll(7)` (Linux >=2.6), `kqueue(2)`
319   (BSD) and `/dev/poll` APIs.
320
321   By default the IO backend is autodetected, but you can use `--without-xxx`
322   to disable a more enhanced API.
323
324   When using the `epoll(7)` API, support for `select(2)` is compiled in as
325   well by default, to enable the binary to run on older Linux kernels (<2.6),
326   too.
327
328 - IDENT-Support:
329
330   `--with-ident[=<path>]`
331
332   Include support for IDENT ("AUTH") lookups. The "ident" library is
333   required for this option.
334
335 - TCP-Wrappers:
336
337   `--with-tcp-wrappers[=<path>]`
338
339   Include support for Wietse Venemas "TCP Wrappers" to limit client access
340   to the daemon, for example by using `/etc/hosts.{allow|deny}`.
341   The "libwrap" is required for this option.
342
343 - PAM:
344
345   `--with-pam[=<path>]`
346
347   Enable support for PAM, the Pluggable Authentication Modules library.
348   See `doc/PAM.txt` for details.
349
350 - SSL:
351
352   - `--with-openssl[=<path>]`
353   - `--with-gnutls[=<path>]`
354
355   Enable support for SSL/TLS using OpenSSL or GnuTLS libraries.
356   See `doc/SSL.txt` for details.
357
358 - IPv6 (autodetected by default):
359
360   `--enable-ipv6` / `--disable-ipv6`
361
362   Enable (disable) support for version 6 of the Internet Protocol, which should
363   be available on most modern UNIX-like operating systems by default.
364
365 ## Configuration
366
367 Please see the file `doc/QuickStart.md` in the `doc/` directory and
368 [online](https://ngircd.barton.de/doc/QuickStart.md) on the homepage for
369 information about configuring ngIRCd, including some configuration examples.
370
371 And have a look at the `ngircd(8)` and `ngircd.conf(5)` manual pages for
372 details and all possible command line and configuration options -- **and don't
373 forget to run `ngircd --configtest` to validate your configuration file!**
374
375 ### Manual Pages Online
376
377 - Daemon: [ngircd.8](https://manpages.debian.org/ngircd.8)
378 - Configutation file: [ngircd.conf.5](https://manpages.debian.org/ngircd.conf.5)
379
380 ## Command line options
381
382 ngIRCd supports the following command line options:
383
384 - `-f`, `--config <file>`
385
386   The daemon uses the file `<file>` as configuration file rather than
387   the standard configuration `/usr/local/etc/ngircd.conf`.
388
389 - `-n`, `--nodaemon`
390
391   ngIRCd should be running as a foreground process.
392
393 - `-p`, `--passive`
394
395   Server-links won't be automatically established.
396
397 - `-t`, `--configtest`
398
399   Reads, validates and dumps the configuration file as interpreted
400   by the server. Then exits.
401
402 Use `--help` to see a short help text describing all available parameters
403 the server understands, with `--version` the ngIRCd shows its version
404 number. In both cases the server exits after the output.
405
406 Please see the `ngircd(8)` manual page for more details!