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