]> Sergey Matveev's repositories - public-inbox.git/blob - INSTALL
public-inbox 1.7.0
[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, IMAP or NNTP clients
6 if they want to import mail into their personal inboxes.
7
8 As of 2021, public-inbox is packaged by several OS distributions,
9 listed in alphabetical order: Debian, GNU Guix, NixOS, and Void Linux.
10
11 public-inbox is developed on Debian GNU/Linux systems and will
12 never depend on packages outside of the "main" component of
13 the "stable" distribution, currently Debian 10.x ("buster"),
14 but older versions of Debian remain supported.
15
16 Most packages are available in other GNU/Linux distributions
17 and FreeBSD.  CentOS 7.x users will likely want newer git and
18 Xapian packages for better performance and v2 inbox support:
19 https://public-inbox.org/meta/20210421151308.yz5hzkgm75klunpe@nitro.local/
20
21 TODO: this still needs to be documented better,
22 also see the scripts/ and sa_config/ directories in the source tree
23
24 Requirements
25 ------------
26
27 public-inbox requires a number of other packages to access its full
28 functionality.  The core tools are, of course:
29
30 * Git (1.8.0+, 2.6+ for writing v2 inboxes)
31 * Perl 5.10.1+
32 * DBD::SQLite (needed for IMAP, NNTP, message threading, and v2 inboxes)
33
34 To accept incoming mail into a public inbox, you'll likely want:
35
36 * MTA - postfix is recommended (for public-inbox-mda)
37 * SpamAssassin (spamc/spamd)   (for public-inbox-watch/public-inbox-mda)
38
39 Beyond that, there is one non-standard Perl package required:
40
41 * URI                              deb: liburi-perl
42                                    pkg: p5-URI
43                                    rpm: perl-URI
44                                    (for HTML/Atom generation)
45
46 Plack and Date::Parse are optional as of public-inbox v1.3.0,
47 but required for older releases:
48
49 * Plack                            deb: libplack-perl
50                                    pkg: p5-Plack
51                                    rpm: perl-Plack, perl-Plack-Test,
52                                    (for HTML/Atom generation)
53
54 - Date::Parse                      deb: libtimedate-perl
55                                    pkg: p5-TimeDate
56                                    rpm: perl-TimeDate
57                                    (for broken, mostly historical emails)
58
59 Where "deb" indicates package names for Debian-derived distributions,
60 "pkg" is for the FreeBSD package (maybe other common BSDs, too), and
61 "rpm" is for RPM-based distributions (only known to work on Fedora).
62
63 Numerous optional modules are likely to be useful as well:
64
65 - DBD::SQLite                      deb: libdbd-sqlite3-perl
66                                    pkg: p5-DBD-SQLite
67                                    rpm: perl-DBD-SQLite
68                                    (for v2, IMAP, NNTP, or gzipped mboxes)
69
70 - Search::Xapian or Xapian(.pm)    deb: libsearch-xapian-perl
71                                    pkg: p5-Search-Xapian OR p5-Xapian
72                                    rpm: perl-Search-Xapian
73                                    (HTTP and IMAP search)
74
75 - Inline::C                        deb: libinline-c-perl
76                                    pkg: pkg-Inline-C
77                                    rpm: perl-Inline (or perl-Inline-C)
78                                    (speeds up process spawning on Linux,
79                                     see public-inbox-daemon(8))
80
81 - Email::Address::XS               deb: libemail-address-xs-perl
82                                    pkg: pkg-Email-Address-XS
83                                    (correct parsing of tricky email
84                                     addresses, phrases and comments,
85                                     required for IMAP)
86
87 - Parse::RecDescent                deb: libparse-recdescent-perl
88                                    pkg: p5-Parse-RecDescent
89                                    rpm: perl-ParseRecDescent
90                                    (optional, for public-inbox-imapd(1))
91
92 - Mail::IMAPClient                 deb: libmail-imapclient-perl
93                                    pkg: p5-Mail-IMAPClient
94                                    rpm: perl-Mail-IMAPClient
95                                    (optional for lei and public-inbox-watch)
96
97 - BSD::Resource                    deb: libbsd-resource-perl
98                                    pkg: p5-BSD-Resource
99                                    rpm: perl-BSD-Resource
100                                    (optional, for PSGI limiters
101                                     see public-inbox-config(5))
102
103 - Plack::Middleware::ReverseProxy  deb: libplack-middleware-reverseproxy-perl
104                                    pkg: p5-Plack-Middleware-ReverseProxy
105                                    rpm: perl-Plack-Middleware-ReverseProxy
106                                    (ensures redirects are correct when running
107                                     behind nginx or Varnish)
108
109 * highlight                        deb: libhighlight-perl
110                                    (for syntax highlighting with coderepo)
111
112 * xapian-compact (tool)            deb: xapian-tools
113                                    pkg: xapian-core
114                                    rpm: xapian-core
115                                    (optional, for public-inbox-compact(1))
116
117 * curl (tool)                      deb, pkg, rpm: curl
118                                    (for HTTP(S) externals with curl)
119
120 - Linux::Inotify2                  deb: liblinux-inotify2-perl
121                                    rpm: perl-Linux-Inotify2
122                                    (for lei, public-inbox-watch and -imapd
123                                     on Linux)
124
125 - IO::KQueue                       pkg: p5-IO-KQueue
126                                    (for lei, public-inbox-watch and -imapd
127                                     on *BSDs)
128
129 - Net::Server                      deb: libnet-server-perl
130                                    pkg: pkg-Net-Server
131                                    rpm: perl-Net-Server
132                                    (for HTTP/IMAP/NNTP background daemons,
133                                     not needed as systemd services or
134                                     foreground servers)
135
136 The following module is typically pulled in by dependencies listed
137 above, so there is no need to explicitly install them:
138
139 - DBI                              deb: libdbi-perl
140                                    pkg: p5-DBI
141                                    rpm: perl-DBI
142                                    (pulled in by DBD::SQLite)
143
144 Uncommonly needed modules (see HACKING for development-only modules):
145
146 - Socket6                          deb: libsocket6-perl
147                                    pkg: p5-Socket6
148                                    rpm: perl-Socket6
149                                    (pulled in by SpamAssassin and Net::Server,
150                                     only necessary if using IPv6 with
151                                     Plack::Middleware::AccessLog or similar
152                                     on Perl <= 5.12)
153
154 - Crypt::CBC                       deb: libcrypt-cbc-perl
155                                    pkg: p5-Crypt-CBC
156                                    (for PublicInbox::Unsubscribe (rarely used))
157
158 standard MakeMaker installation (Perl)
159 --------------------------------------
160
161 To use MakeMaker, you need to ensure ExtUtils::MakeMaker is available.
162 This is typically installed with Perl, but RPM-based systems will likely
163 need to install the `perl-ExtUtils-MakeMaker' package.
164
165 Once the dependencies are installed, you should be able to build and
166 install the system (into /usr/local) with:
167
168         perl Makefile.PL
169         make
170         make test    # see HACKING for faster tests for hackers
171         make install # root permissions may be needed
172
173 symlink-install (public-inbox.git and 1.7.0+)
174 ---------------------------------------------
175
176 For users who lack permissions and/or wish to minimize their
177 installation footprint, the "symlink-install" target is available in
178 public-inbox.git.  The following installs symlinks to $HOME/bin
179 pointing to the source tree:
180
181         perl Makefile.PL
182         make symlink-install prefix=$HOME
183
184 Other installation notes
185 ------------------------
186
187 Debian 8.x (jessie) users, use Debian 8.5 or later if using Xapian:
188         https://bugs.debian.org/808610
189
190 public-inbox-* commands will never store unregeneratable data in
191 Xapian nor any other search database we might use; Xapian
192 corruption will not destroy critical data.  Note: `lei' DOES store
193 unregeneratable data in Xapian and SQLite.
194
195 See the public-inbox-overview(7) man page for the next steps once
196 the installation is complete.
197
198 The following required packages are part of the Perl standard
199 library.  Debian-based distros put them in "libperl5.$MINOR" or
200 "perl-modules-5.$MINOR"; and FreeBSD puts them in "perl5".
201 RPM-based distros split them out into separate packages:
202
203 * Digest::SHA                      rpm: perl-Digest-SHA
204 * Data::Dumper                     rpm: perl-Data-Dumper
205 * Encode                           rpm: perl-Encode
206 * IO::Compress                     rpm: perl-IO-Compress
207 * Storable                         rpm: perl-Storable
208 * Text::ParseWords                 rpm: perl-Text-Parsewords
209
210 Copyright
211 ---------
212
213 Copyright 2013-2021 all contributors <meta@public-inbox.org>
214 License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>