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