]> Sergey Matveev's repositories - public-inbox.git/blob - INSTALL
t/httpd-corner: improve reliability and diagnostics
[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, 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 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 * Email::MIME                      deb: libemail-mime-perl
40                                    pkg: p5-Email-MIME
41                                    rpm: perl-Email-MIME
42
43 * URI::Escape                      deb: liburi-perl
44                                    pkg: p5-URI
45                                    rpm: perl-URI
46                                    (for HTML/Atom generation)
47
48 Plack and Date::Parse are optional as of public-inbox v1.3.0,
49 but required for older releases:
50
51 * Plack                            deb: libplack-perl
52                                    pkg: p5-Plack
53                                    rpm: perl-Plack, perl-Plack-Test,
54                                    (for HTML/Atom generation)
55
56 - Date::Parse                      deb: libtimedate-perl
57                                    pkg: p5-TimeDate
58                                    rpm: perl-TimeDate
59                                    (for broken, mostly historical emails)
60
61 Where "deb" indicates package names for Debian-derived distributions,
62 "pkg" is for the FreeBSD package (maybe other common BSDs, too), and
63 "rpm" is for RPM-based distributions (only known to work on Fedora).
64
65 Numerous optional modules are likely to be useful as well:
66
67 - DBD::SQLite                      deb: libdbd-sqlite3-perl
68                                    pkg: p5-DBD-SQLite
69                                    rpm: perl-DBD-SQLite
70                                    (for v2, NNTP, or gzipped mboxes)
71
72 - Search::Xapian                   deb: libsearch-xapian-perl
73                                    pkg: p5-Search-Xapian
74                                    rpm: perl-Search-Xapian
75                                    (HTTP search)
76
77 - Net::Server                      deb: libnet-server-perl
78                                    pkg: pkg-Net-Server
79                                    rpm: perl-Net-Server
80                                    (for HTTP/NNTP background daemons,
81                                     not needed as systemd services or
82                                     foreground servers)
83
84 - Inline::C                        deb: libinline-c-perl
85                                    pkg: pkg-Inline-C
86                                    (speeds up process spawning on Linux,
87                                     see public-inbox-daemon(8))
88
89 - Plack::Middleware::ReverseProxy  deb: libplack-middleware-reverseproxy-perl
90                                    pkg: p5-Plack-Middleware-ReverseProxy
91                                    rpm: perl-Plack-Middleware-ReverseProxy
92                                    (ensures redirects are correct when running
93                                     behind nginx or Varnish)
94
95 - Plack::Middleware::Deflater      deb: libplack-middleware-deflater-perl
96                                    pkg: p5 -Plack-Middleware-Deflater
97                                    rpm: perl-Plack-Middleware-Deflater
98                                    (saves bandwidth on responses)
99
100 * highlight                        deb: libhighlight-perl
101                                    (for syntax highlighting with coderepo)
102
103 * xapian-compact (tool)            deb: xapian-tools
104                                    pkg: xapian-core
105                                    rpm: xapian-core
106                                    (optional, for public-inbox-compact(1))
107
108 The following modules are typically pulled in by dependencies listed
109 above, so there is no need to explicitly install them:
110
111 - Email::MIME::ContentType         deb: libemail-mime-contenttype-perl
112                                    pkg: p5-Email-MIME-ContentType
113                                    rpm: perl-Email-MIME-ContentType
114                                    (pulled in by Email::MIME)
115
116 - Email::Simple                    deb: libemail-simple-perl
117                                    pkg: p5-Email-Simple
118                                    rpm: perl-Email-Simple
119                                    (pulled in by Email::MIME)
120
121 * Encode                           deb: libperl5.$MINOR (or libencode-perl)
122                                    pkg: perl5
123                                    rpm: perl-Encode
124                                    (likely installed with Perl)
125
126 - DBI                              deb: libdbi-perl
127                                    pkg: p5-DBI
128                                    rpm: perl-DBI
129                                    (pulled in by DBD::SQLite)
130
131 * Devel::Peek                      deb: libperl5.$MINOR (e.g. libperl5.24)
132                                    pkg: perl5
133                                    rpm: perl-Devel-Peek
134                                    (optional for stale FD cleanup in daemons,
135                                     typically installed alongside Perl5)
136
137 - Filesys::Notify::Simple          deb: libfilesys-notify-simple-perl
138                                    pkg: p5-Filesys-Notify-Simple
139                                    rpm: perl-Filesys-Notify-Simple
140                                    (for public-inbox-watch, pulled in by Plack)
141
142 - Linux::Inotify2                  deb: liblinux-inotify2-perl
143                                    rpm: perl-Linux-Inotify2
144                                    (for public-inbox-watch on Linux)
145
146 - Filesys::Notify::KQueue          pkg: p5-Filesys-Notify-KQueue
147                                    (for public-inbox-watch on FreeBSD)
148
149 - IO::Compress (::Gzip)            deb: perl-modules (or libio-compress-perl)
150                                    pkg: perl5
151                                    rpm: perl-IO-Compress
152                                    (for gzipped mbox over HTTP, v2 format)
153
154 Uncommonly needed modules:
155
156 - Socket6                          deb: libsocket6-perl
157                                    pkg: p5-Socket6
158                                    rpm: perl-Socket6
159                                    (pulled in by SpamAssassin and Net::Server,
160                                     only necessary if using IPv6 with
161                                     Plack::Middleware::AccessLog or similar
162                                     on Perl <= 5.12)
163
164 - Crypt::CBC                       deb: libcrypt-cbc-perl
165                                    pkg: p5-Crypt-CBC
166                                    (for PublicInbox::Unsubscribe (rarely used))
167
168 Optional packages testing and development:
169
170 - Plack::Test                      deb: libplack-test-perl
171                                    pkg: p5-Plack
172                                    rpm: perl-Plack-Test
173
174 - Test::Simple                     deb: perl-modules-5.$MINOR
175                                    pkg: perl5
176                                    rpm: perl-Test-Simple
177
178 - XML::TreePP                      deb: libxml-treepp-perl
179                                    pkg: p5-XML-TreePP
180                                    rpm: perl-XML-TreePP
181
182 standard MakeMaker installation (Perl)
183 --------------------------------------
184
185 To use MakeMaker, you need to ensure ExtUtils::MakeMaker is available.
186 This is typically installed with Perl, but RPM-based systems will likely
187 need to install the `perl-ExtUtils-MakeMaker' package.
188
189 Once the dependencies are installed, you should be able to build and
190 install the system (into /usr/local) with:
191
192         perl Makefile.PL
193         make
194         make test
195         make install # root permissions may be needed
196
197 When installing Search::Xapian, make sure the underlying Xapian
198 installation is not affected by an index corruption bug:
199
200         https://bugs.debian.org/808610
201
202 For Debian 8.x (jessie), this means using Debian 8.5 or later.
203
204 public-inbox will never store unregeneratable data in Xapian
205 or any other search database we might use; Xapian corruption
206 will not destroy critical data.
207
208 See the public-inbox-overview(7) man page for the next steps once
209 the installation is complete.
210
211 Copyright
212 ---------
213
214 Copyright 2013-2020 all contributors <meta@public-inbox.org>
215 License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>