Online demo Privacy policy GoBD notes Blog

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
current:installation [2017/10/29 09:57]
sj
current:installation [2021/03/09 19:30] (current)
sj
Line 1: Line 1:
 ==== Installation ==== ==== Installation ====
- 
-Notes for Debian/Ubuntu users: Debian ships a pretty outdated version (2.0.4) of sphinxsearch. I strongly suggest to grab a recent 2.2.x release (either a deb package or the source) from the sphinx website. 
  
 Debian and Ubuntu users please see the [[:faq|FAQ]] to avoid a common pitfall, and fix ///etc/default/sphinxsearch// before start using sphinx. Debian and Ubuntu users please see the [[:faq|FAQ]] to avoid a common pitfall, and fix ///etc/default/sphinxsearch// before start using sphinx.
Line 10: Line 8:
  
   * openssl   * openssl
-  * MariaDB, MySQL or Percona +  * MySQL 5.5+, MariaDB or Percona 
-  * [[http://sphinxsearch.com/|sphinx search 2.2.x]] +  * [[http://sphinxsearch.com/|sphinx search 3.x.x]] (Sphinx 2.2.x is still supported) 
-  * php 5.3+ (with the following modules: LDAP, GD, Memcache, PDO, MySQL, CURL)+  * php 7.(with the following modules: LDAP, GD, Memcache, PDO, MySQL, CURL, Zip)
   * a rewriting rule capable webserver, eg. apache, lighttpd, nginx, ... (in case of apache be sure to enable the rewrite module)   * a rewriting rule capable webserver, eg. apache, lighttpd, nginx, ... (in case of apache be sure to enable the rewrite module)
   * [[http://laurikari.net/tre/|TRE regex library 0.8.x]]   * [[http://laurikari.net/tre/|TRE regex library 0.8.x]]
   * [[http://nih.at/libzip/|libzip]]   * [[http://nih.at/libzip/|libzip]]
   * mpstat utility (eg. the 'sysstat' package on Debian Linux)   * mpstat utility (eg. the 'sysstat' package on Debian Linux)
-  * python with mysqldb support (python-mysqldb package on debian/ubuntu)+  * python3 with mysqldb support (python3-mysqldb package on debian/ubuntu)
  
 **Highly recommended:** **Highly recommended:**
  
-  * tcp_wrappers 
   * [[http://www.wagner.pp.ru/~vitus/software/catdoc/|catdoc]]   * [[http://www.wagner.pp.ru/~vitus/software/catdoc/|catdoc]]
   * [[http://poppler.freedesktop.org/|pdftotext]]   * [[http://poppler.freedesktop.org/|pdftotext]]
Line 55: Line 52:
  
 Note that piler stores all emails and attachments as separate files. You may tweak inode ratio, if necessary. Note that piler stores all emails and attachments as separate files. You may tweak inode ratio, if necessary.
 +
 +See [[https://bitbucket.org/jsuto/piler/issues/961/archive-size-mismatch|https://bitbucket.org/jsuto/piler/issues/961/archive-size-mismatch]] for some additional hints.
 +
  
 **Create a dedicated and non-privileged user to run piler** **Create a dedicated and non-privileged user to run piler**
Line 60: Line 60:
 <code> <code>
 groupadd piler groupadd piler
-useradd -g piler -m -s /bin/sh -d /var/piler piler+useradd -g piler -m -s /bin/bash -d /var/piler piler
 usermod -L piler usermod -L piler
 chmod 755 /var/piler chmod 755 /var/piler
Line 70: Line 70:
 tar zxvf piler-x.y.z.tar.gz tar zxvf piler-x.y.z.tar.gz
 cd piler-x.y.z cd piler-x.y.z
-./configure +./configure --localstatedir=/var --with-database=mysql
-        --localstatedir=/var +
-        --with-database=mysql +
- --enable-tcpwrappers +
 make make
 su -c 'make install' su -c 'make install'
Line 85: Line 81:
  
 <code> <code>
-sed 's/InnoDB/XtraDB/g' util/db-mysql.sql > a; mv a util/db-mysql.sql+sed -i 's/InnoDB/XtraDB/g' util/db-mysql.sql
 </code> </code>
  
 **Compiling on FreeBSD** **Compiling on FreeBSD**
  
-FreeBSD is supported from build 881 (since 2014.07.21), see the [[https://bitbucket.org/jsuto/piler/get/master.tar.gz|master branch]].+FreeBSD is supported from build 881 (since 2014.07.21)
 + 
 +Update: from 1.3.2 (since 2017.10.29) piler uses the epoll event polling methodwhich is Linux-only. For FreeBSD you must download (or checkout) the //prefork branch// ([[https://bitbucket.org/jsuto/piler/get/prefork.tar.gz|https://bitbucket.org/jsuto/piler/get/prefork.tar.gz]]).
  
 You also need the following packages from either the ports collection, or install them from whatever source: You also need the following packages from either the ports collection, or install them from whatever source:
Line 106: Line 104:
 LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure \ LDFLAGS="-L/usr/local/lib" CPPFLAGS="-I/usr/local/include" ./configure \
                                                                     --localstatedir=/var \                                                                     --localstatedir=/var \
-                                                                    --with-database=mysql +                                                                    --with-database=mysql
-                                                                    --enable-tcpwrappers+
 gmake clean all gmake clean all
 </code> </code>
Line 118: Line 115:
  
 Important! The 'hostid' parameter in piler.conf should be the hostname of piler, what is configured on your mailserver at always_bcc (see below). Eg. if you set archive@piler.yourdomain.com on your mailserver, then set hostid=piler.yourdomain.com in piler.conf Important! The 'hostid' parameter in piler.conf should be the hostname of piler, what is configured on your mailserver at always_bcc (see below). Eg. if you set archive@piler.yourdomain.com on your mailserver, then set hostid=piler.yourdomain.com in piler.conf
 +
 +If you have sphinx 2.2.x or less, then be sure to fix etc/sphinx.conf.dist and set the SPHINX_VERSION to 221 before running the postinstall.
  
 <code> <code>
Line 155: Line 154:
    /(.*)/   prepend X-Envelope-To: $1    /(.*)/   prepend X-Envelope-To: $1
 </code> </code>
 +
 +Note that such configuration might reveal Bcc addresses to the recipients in the To/Cc fields. To prevent it happening piler features the HEADER_LINE_TO_HIDE config.php variable to automatically hide the X-Envelope-To: line.
 +
 +When set (and the default is as seen below) it will hide such header lines from regular users on the GUI, only auditors are allowed to see all recipients, including the Bcc addresses.
 +
 +<code>
 +$config['HEADER_LINE_TO_HIDE'] = 'X-Envelope-To:';
 +</code>
 +
 +
  
 If you have Exim, then add the following at the beginning of the routers-section: If you have Exim, then add the following at the beginning of the routers-section:
Line 173: Line 182:
 </code> </code>
  
-**IMPORTANT! Make sure you never lose/overwrite the key otherwise you won't access your archive ever again. So whenever you upgrade be sure to keep your existing key file. Also NEVER change the //iv// parameter in piler.conf after installation**+**IMPORTANT! Make sure you never lose/overwrite the key otherwise you won't access your archive ever again. So whenever you upgrade be sure to keep your existing key file. Also NEVER change the //iv// parameter in piler.conf after installation. The piler mysql database contains essential information, including metadata, permissions, tags, etc. If you lost the piler database, your archive would stop working! So you must take a good care of the piler database.**
  
  
Google Analytics Alternative