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