]> Sergey Matveev's repositories - public-inbox.git/blob - INSTALL
lei import: support shell completion of known folders
[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 module required:
40
41 * URI::Escape                      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 - Net::Server                      deb: libnet-server-perl
76                                    pkg: pkg-Net-Server
77                                    rpm: perl-Net-Server
78                                    (for HTTP/IMAP/NNTP background daemons,
79                                     not needed as systemd services or
80                                     foreground servers)
81
82 - Inline::C                        deb: libinline-c-perl
83                                    pkg: pkg-Inline-C
84                                    rpm: perl-Inline (or perl-Inline-C)
85                                    (speeds up process spawning on Linux,
86                                     see public-inbox-daemon(8))
87
88 - Email::Address::XS               deb: libemail-address-xs-perl
89                                    pkg: pkg-Email-Address-XS
90                                    (correct parsing of tricky email
91                                     addresses, phrases and comments,
92                                     required for IMAP)
93
94 - Parse::RecDescent                deb: libparse-recdescent-perl
95                                    pkg: p5-Parse-RecDescent
96                                    rpm: perl-ParseRecDescent
97                                    (optional, for public-inbox-imapd(1))
98
99 - BSD::Resource                    deb: libbsd-resource-perl
100                                    pkg: p5-BSD-Resource
101                                    rpm: perl-BSD-Resource
102                                    (optional, for PSGI limiters
103                                     see public-inbox-config(5))
104
105 - Plack::Middleware::ReverseProxy  deb: libplack-middleware-reverseproxy-perl
106                                    pkg: p5-Plack-Middleware-ReverseProxy
107                                    rpm: perl-Plack-Middleware-ReverseProxy
108                                    (ensures redirects are correct when running
109                                     behind nginx or Varnish)
110
111 * highlight                        deb: libhighlight-perl
112                                    (for syntax highlighting with coderepo)
113
114 * xapian-compact (tool)            deb: xapian-tools
115                                    pkg: xapian-core
116                                    rpm: xapian-core
117                                    (optional, for public-inbox-compact(1))
118
119 - Linux::Inotify2                  deb: liblinux-inotify2-perl
120                                    rpm: perl-Linux-Inotify2
121                                    (for public-inbox-watch and -imapd on Linux)
122
123 The following module is typically pulled in by dependencies listed
124 above, so there is no need to explicitly install them:
125
126 - DBI                              deb: libdbi-perl
127                                    pkg: p5-DBI
128                                    rpm: perl-DBI
129                                    (pulled in by DBD::SQLite)
130
131 Uncommonly needed modules (see HACKING for development-only modules):
132
133 - Socket6                          deb: libsocket6-perl
134                                    pkg: p5-Socket6
135                                    rpm: perl-Socket6
136                                    (pulled in by SpamAssassin and Net::Server,
137                                     only necessary if using IPv6 with
138                                     Plack::Middleware::AccessLog or similar
139                                     on Perl <= 5.12)
140
141 - Crypt::CBC                       deb: libcrypt-cbc-perl
142                                    pkg: p5-Crypt-CBC
143                                    (for PublicInbox::Unsubscribe (rarely used))
144
145 standard MakeMaker installation (Perl)
146 --------------------------------------
147
148 To use MakeMaker, you need to ensure ExtUtils::MakeMaker is available.
149 This is typically installed with Perl, but RPM-based systems will likely
150 need to install the `perl-ExtUtils-MakeMaker' package.
151
152 Once the dependencies are installed, you should be able to build and
153 install the system (into /usr/local) with:
154
155         perl Makefile.PL
156         make
157         make test    # see HACKING for faster tests for hackers
158         make install # root permissions may be needed
159
160 symlink-install (public-inbox.git and 1.7.0+)
161 ---------------------------------------------
162
163 For users who lack permissions and/or wish to minimize their
164 installation footprint, the "symlink-install" target is available in
165 public-inbox.git.  The following installs symlinks to $HOME/bin
166 pointing to the source tree:
167
168         perl Makefile.PL
169         make symlink-install prefix=$HOME
170
171 Other installation notes
172 ------------------------
173
174 Debian 8.x (jessie) users, use Debian 8.5 or later if using Xapian:
175         https://bugs.debian.org/808610
176
177 public-inbox will never store unregeneratable data in Xapian
178 or any other search database we might use; Xapian corruption
179 will not destroy critical data.
180
181 See the public-inbox-overview(7) man page for the next steps once
182 the installation is complete.
183
184 The following required packages are part of the Perl standard
185 library.  Debian-based distros put them in "libperl5.$MINOR" or
186 "perl-modules-5.$MINOR"; and FreeBSD puts them in "perl5".
187 RPM-based distros split them out into separate packages:
188
189 * Digest::SHA                      rpm: perl-Digest-SHA
190 * Data::Dumper                     rpm: perl-Data-Dumper
191 * Encode                           rpm: perl-Encode
192 * IO::Compress                     rpm: perl-IO-Compress
193 * Storable                         rpm: perl-Storable
194 * Text::ParseWords                 rpm: perl-Text-Parsewords
195
196 Copyright
197 ---------
198
199 Copyright 2013-2021 all contributors <meta@public-inbox.org>
200 License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>