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