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