]> Sergey Matveev's repositories - public-inbox.git/blob - INSTALL
doc: note optional BSD::Resource use
[public-inbox.git] / INSTALL
1 public-inbox (server-side) installation
2 ---------------------------------------
3
4 This is for folks who want to setup their own public-inbox instance.
5 Clients should use normal git-clone/git-fetch, IMAP or NNTP clients
6 if they want to import mail into their personal inboxes.
7
8 public-inbox is developed on Debian GNU/Linux systems and will
9 never depend on packages outside of the "main" component of
10 the "stable" distribution, currently Debian 10.x ("buster"),
11 but older versions of Debian remain supported.
12
13 Most packages are available in other GNU/Linux distributions
14 and FreeBSD.
15
16 TODO: this still needs to be documented better,
17 also see the scripts/ and sa_config/ directories in the source tree
18
19 Requirements
20 ------------
21
22 public-inbox requires a number of other packages to access its full
23 functionality.  The core tools are, of course:
24
25 * Git (1.8.0+, 2.6+ for writing v2 inboxes)
26 * Perl 5.10.1+
27 * DBD::SQLite (needed for IMAP, NNTP, message threading, and v2 inboxes)
28
29 To accept incoming mail into a public inbox, you'll likely want:
30
31 * MTA - postfix is recommended (for public-inbox-mda)
32 * SpamAssassin (spamc/spamd)   (for public-inbox-watch/public-inbox-mda)
33
34 Beyond that, there is a long list of Perl modules required, starting with:
35
36 * Digest::SHA                      typically installed with Perl
37                                    rpm: perl-Digest-SHA
38
39 * URI::Escape                      deb: liburi-perl
40                                    pkg: p5-URI
41                                    rpm: perl-URI
42                                    (for HTML/Atom generation)
43
44 Email::MIME will be optional as of public-inbox v1.5.0,
45 it may still be used in maintainer comparison tests:
46
47 * Email::MIME                      deb: libemail-mime-perl
48                                    pkg: p5-Email-MIME
49                                    rpm: perl-Email-MIME
50
51 Plack and Date::Parse are optional as of public-inbox v1.3.0,
52 but required for older releases:
53
54 * Plack                            deb: libplack-perl
55                                    pkg: p5-Plack
56                                    rpm: perl-Plack, perl-Plack-Test,
57                                    (for HTML/Atom generation)
58
59 - Date::Parse                      deb: libtimedate-perl
60                                    pkg: p5-TimeDate
61                                    rpm: perl-TimeDate
62                                    (for broken, mostly historical emails)
63
64 Where "deb" indicates package names for Debian-derived distributions,
65 "pkg" is for the FreeBSD package (maybe other common BSDs, too), and
66 "rpm" is for RPM-based distributions (only known to work on Fedora).
67
68 Numerous optional modules are likely to be useful as well:
69
70 - DBD::SQLite                      deb: libdbd-sqlite3-perl
71                                    pkg: p5-DBD-SQLite
72                                    rpm: perl-DBD-SQLite
73                                    (for v2, IMAP, NNTP, or gzipped mboxes)
74
75 - Search::Xapian                   deb: libsearch-xapian-perl
76                                    pkg: p5-Search-Xapian
77                                    rpm: perl-Search-Xapian
78                                    (HTTP and IMAP search)
79
80 - Net::Server                      deb: libnet-server-perl
81                                    pkg: pkg-Net-Server
82                                    rpm: perl-Net-Server
83                                    (for HTTP/IMAP/NNTP background daemons,
84                                     not needed as systemd services or
85                                     foreground servers)
86
87 - Inline::C                        deb: libinline-c-perl
88                                    pkg: pkg-Inline-C
89                                    rpm: perl-Inline (or perl-Inline-C)
90                                    (speeds up process spawning on Linux,
91                                     see public-inbox-daemon(8))
92
93 - Email::Address::XS               deb: libemail-address-xs-perl
94                                    pkg: pkg-Email-Address-XS
95                                    (correct parsing of tricky email
96                                     addresses, phrases and comments,
97                                     required for IMAP)
98
99 - Parse::RecDescent                deb: libparse-recdescent-perl
100                                    pkg: p5-Parse-RecDescent
101                                    rpm: perl-ParseRecDescent
102                                    (optional, for public-inbox-imapd(1))
103
104 - BSD::Resource                    deb: libbsd-resource-perl
105                                    pkg: p5-BSD-Resource
106                                    rpm: perl-BSD-Resource
107                                    (optional, for PSGI limiters
108                                     see public-inbox-config(5))
109
110 - Plack::Middleware::ReverseProxy  deb: libplack-middleware-reverseproxy-perl
111                                    pkg: p5-Plack-Middleware-ReverseProxy
112                                    rpm: perl-Plack-Middleware-ReverseProxy
113                                    (ensures redirects are correct when running
114                                     behind nginx or Varnish)
115
116 * highlight                        deb: libhighlight-perl
117                                    (for syntax highlighting with coderepo)
118
119 * xapian-compact (tool)            deb: xapian-tools
120                                    pkg: xapian-core
121                                    rpm: xapian-core
122                                    (optional, for public-inbox-compact(1))
123
124 The following modules are typically pulled in by dependencies listed
125 above, so there is no need to explicitly install them:
126
127 * Encode                           deb: libperl5.$MINOR (or libencode-perl)
128                                    pkg: perl5
129                                    rpm: perl-Encode
130                                    (likely installed with Perl)
131
132 - DBI                              deb: libdbi-perl
133                                    pkg: p5-DBI
134                                    rpm: perl-DBI
135                                    (pulled in by DBD::SQLite)
136
137 * Devel::Peek                      deb: libperl5.$MINOR (e.g. libperl5.24)
138                                    pkg: perl5
139                                    rpm: perl-Devel-Peek
140                                    (optional for stale FD cleanup in daemons,
141                                     typically installed alongside Perl5)
142
143 - Linux::Inotify2                  deb: liblinux-inotify2-perl
144                                    rpm: perl-Linux-Inotify2
145                                    (for public-inbox-watch and -imapd on Linux)
146
147 - IO::Compress (::Gzip)            deb: perl-modules (or libio-compress-perl)
148                                    pkg: perl5
149                                    rpm: perl-IO-Compress
150                                    (for gzipped mbox over HTTP, v2 format)
151
152 Uncommonly needed modules:
153
154 - Socket6                          deb: libsocket6-perl
155                                    pkg: p5-Socket6
156                                    rpm: perl-Socket6
157                                    (pulled in by SpamAssassin and Net::Server,
158                                     only necessary if using IPv6 with
159                                     Plack::Middleware::AccessLog or similar
160                                     on Perl <= 5.12)
161
162 - Crypt::CBC                       deb: libcrypt-cbc-perl
163                                    pkg: p5-Crypt-CBC
164                                    (for PublicInbox::Unsubscribe (rarely used))
165
166 Optional packages testing and development:
167
168 - Plack::Test                      deb: libplack-test-perl
169                                    pkg: p5-Plack
170                                    rpm: perl-Plack-Test
171
172 - Test::Simple                     deb: perl-modules-5.$MINOR
173                                    pkg: perl5
174                                    rpm: perl-Test-Simple
175
176 - XML::TreePP                      deb: libxml-treepp-perl
177                                    pkg: p5-XML-TreePP
178                                    rpm: perl-XML-TreePP
179
180 standard MakeMaker installation (Perl)
181 --------------------------------------
182
183 To use MakeMaker, you need to ensure ExtUtils::MakeMaker is available.
184 This is typically installed with Perl, but RPM-based systems will likely
185 need to install the `perl-ExtUtils-MakeMaker' package.
186
187 Once the dependencies are installed, you should be able to build and
188 install the system (into /usr/local) with:
189
190         perl Makefile.PL
191         make
192         make test    # see HACKING for faster tests for hackers
193         make install # root permissions may be needed
194
195 When installing Search::Xapian, make sure the underlying Xapian
196 installation is not affected by an index corruption bug:
197
198         https://bugs.debian.org/808610
199
200 For Debian 8.x (jessie), this means using Debian 8.5 or later.
201
202 public-inbox will never store unregeneratable data in Xapian
203 or any other search database we might use; Xapian corruption
204 will not destroy critical data.
205
206 See the public-inbox-overview(7) man page for the next steps once
207 the installation is complete.
208
209 Copyright
210 ---------
211
212 Copyright 2013-2021 all contributors <meta@public-inbox.org>
213 License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>