]>
Commit | Line | Data |
---|---|---|
7a157b26 | 1 | |
9aa1df15 U |
2 | #[![ZNC](http://wiki.znc.in/skins/common/images/wiki.png)](http://znc.in) - An advanced IRC bouncer |
3 | ||
4 | ## Table of contents | |
e6bff0c3 | 5 | |
7a157b26 | 6 | - Minimal Requirements |
7 | - Optional Requirements | |
8 | - Installing ZNC | |
9 | - Setting up znc.conf | |
b475f5d6 | 10 | - Special config options |
7a157b26 | 11 | - Using ZNC |
12 | - File Locations | |
13 | - ZNC's config file | |
14 | - Writing own modules | |
15 | - Further infos | |
16 | ||
9aa1df15 | 17 | ## Minimal Requirements |
7a157b26 | 18 | |
19 | Core: | |
e6bff0c3 | 20 | |
7a157b26 | 21 | - GNU make (try gmake if make fails) |
22 | - GCC 3 or later | |
23 | ||
9aa1df15 | 24 | ## Optional Requirements |
7a157b26 | 25 | |
26 | SSL support: | |
e6bff0c3 | 27 | |
7cb4c3fc | 28 | - openssl 0.9.7d or later (try installing openssl-dev, openssl-devel or |
29 | libssl-dev) | |
54d8cd68 | 30 | |
8a2ef66b | 31 | Asynchronous DNS lookup: |
54d8cd68 | 32 | |
8a2ef66b | 33 | - c-ares 1.5.3 or later, older releases don't provide a pkg-config file |
34 | (try installing libc-ares-dev or c-ares) | |
54d8cd68 | 35 | |
7a157b26 | 36 | modperl: |
54d8cd68 | 37 | |
8a2ef66b | 38 | - This needs perl and its bundled libperl |
54d8cd68 US |
39 | |
40 | modpython: | |
41 | ||
42 | - This needs perl(!) and python's bundled libpython | |
43 | ||
7a157b26 | 44 | saslauth: |
54d8cd68 | 45 | |
7a157b26 | 46 | - This module needs cyrus-sasl2 |
47 | ||
9aa1df15 | 48 | ## Installing ZNC |
7a157b26 | 49 | |
e6bff0c3 | 50 | Installation is done with the `./configure ; make ; make install` commands. |
7a157b26 | 51 | |
52 | You can use | |
e6bff0c3 | 53 | ./configure --help |
7a157b26 | 54 | if you want to get a list of options, though the defaults should be suiting |
7cb4c3fc | 55 | most needs. After you compiled it with make (or gmake if make doesn't work) you |
7a157b26 | 56 | can install it with |
e6bff0c3 | 57 | make install |
7a157b26 | 58 | though you don't need to as ZNC supports in-place execution. |
59 | ||
9aa1df15 | 60 | ## Setting up znc.conf |
7a157b26 | 61 | |
e6bff0c3 KF |
62 | For setting up a configuration file in `~/.znc` you can simply do |
63 | znc --makeconf | |
7a157b26 | 64 | or |
e6bff0c3 | 65 | ./znc --makeconf |
7a157b26 | 66 | for in-place execution. |
67 | ||
68 | If you are using SSL you should do | |
e6bff0c3 | 69 | znc --makepem |
7a157b26 | 70 | |
9aa1df15 | 71 | ## Special config options |
b475f5d6 | 72 | |
73 | When you create your ZNC configuration file via --makeconf, you are asked two | |
74 | questions which might not be easy to understand. | |
75 | ||
76 | > Number of lines to buffer per channel | |
e6bff0c3 | 77 | |
b475f5d6 | 78 | How many messages should be buffered for each channel. When you connect to ZNC |
79 | you get a buffer replay for each channel which shows what was said last. This | |
80 | option selects the number of lines this replay should consist of. Increasing | |
81 | this can greatly increase ZNC's memory usage if you are hosting many users. | |
82 | The default value should be fine for most setups. | |
83 | ||
84 | > Would you like to keep buffers after replay? | |
e6bff0c3 | 85 | |
b475f5d6 | 86 | If this is disabled, you get the buffer playback only once and then it is |
87 | deleted. If this is enabled, the buffer is not deleted. This may be useful if | |
88 | you regularly use more than one client to connect to ZNC. | |
89 | ||
9aa1df15 | 90 | ## Using ZNC |
7a157b26 | 91 | |
92 | Once you have started ZNC you can connect with your favorite IRC-client to ZNC. | |
e6bff0c3 | 93 | You should use `username:password` as the server password (e.g. `/pass user:pass`). |
7a157b26 | 94 | |
e6bff0c3 KF |
95 | Once you are connected you can do `/msg *status help` for some commands. |
96 | Every module you have loaded (`/msg *status listmods`) should additionally provide | |
97 | /msg *modulename help | |
7a157b26 | 98 | |
9aa1df15 | 99 | ## File Locations |
7a157b26 | 100 | |
e6bff0c3 KF |
101 | In its data dir (`~/.znc` is default) ZNC saves most of its data. The only |
102 | exception are modules and module data, which are saved in `<prefix>/lib/znc` | |
103 | and `<prefix>/share/znc`, and the znc binary itself. | |
7cb4c3fc | 104 | More modules (e.g. if you install some later) can be saved in |
e6bff0c3 | 105 | `<data dir>/modules` (-> `~/.znc/modules`). |
7a157b26 | 106 | |
107 | In the datadir are only two files: | |
e6bff0c3 KF |
108 | |
109 | - `znc.pid` - The pid of the currently running ZNC instance. | |
110 | - `znc.pem` - This is the server certificate ZNC uses for listening and is created | |
111 | with `znc --makepem`. | |
7a157b26 | 112 | |
113 | These directories are also in there: | |
e6bff0c3 KF |
114 | |
115 | - configs - Contains `znc.conf` (ZNC's config file) and backups of older configs. | |
116 | - modules - ZNC also looks in here for a module. | |
117 | - moddata - Global modules save their settings here. | |
118 | (e.g. webadmin saves the current skin name in here) | |
119 | - users - This is per-user data and mainly contains just a moddata directory. | |
7a157b26 | 120 | |
9aa1df15 | 121 | ## ZNC's config file |
7a157b26 | 122 | |
123 | This file shouldn't be too hard too understand. An explanation of all the | |
9aa1df15 | 124 | items can be found on the [Configuration](http://wiki.znc.in/Configuration)-Page. |
7a157b26 | 125 | |
7cb4c3fc | 126 | To rehash the config file, you can send ZNC SIGHUP via |
e6bff0c3 | 127 | pkill -SIGHUP znc |
7cb4c3fc | 128 | or you can login to znc and use |
e6bff0c3 | 129 | /msg *status rehash |
7a157b26 | 130 | |
c2e87beb | 131 | If you changed some settings while znc is running, a simple |
e6bff0c3 | 132 | pkill -SIGUSR1 znc |
c2e87beb | 133 | will make ZNC rewrite its config file. Alternatively you can use this: |
e6bff0c3 | 134 | /msg *status saveconfig |
c2e87beb | 135 | |
9aa1df15 | 136 | ## Writing own modules |
7a157b26 | 137 | |
138 | You can write your own modules in either C++ or perl. | |
139 | ||
140 | C++ modules are compiled by either saving them in the modules source dir and | |
141 | running make or with the znc-buildmod shell script. | |
142 | ||
9aa1df15 U |
143 | For additional info look in the wiki: |
144 | [Writing Modules](http://wiki.znc.in/WritingModules) | |
145 | [Module Hooks](http://wiki.znc.in/ModuleHooks) | |
146 | ||
147 | Perl modules are loaded through the global module modperl. | |
148 | Details: [ModPerl](http://wiki.znc.in/Modperl) | |
7a157b26 | 149 | |
9aa1df15 U |
150 | Python modules are loaded throug the global module modpython. |
151 | Details: [ModPython](http://wiki.znc.in/Modpython) | |
7a157b26 | 152 | |
9aa1df15 | 153 | ## Further infos |
7a157b26 | 154 | |
ed178040 | 155 | Please visit http://znc.in/ or #znc on EFNet if you still have questions. |
7a157b26 | 156 | |
ed178040 | 157 | You can get the latest development version with git: |
54d8cd68 | 158 | git clone git://github.com/znc/znc.git |