Outils pour utilisateurs

Outils du site


linux:mailpiler

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
linux:mailpiler [2022/09/09 19:44] – créée rootlinux:mailpiler [2023/03/27 13:08] (Version actuelle) – [Installation de Piler] root
Ligne 1: Ligne 1:
 ====== Mail Piler ====== ====== Mail Piler ======
-<code bash> 
-apt install libtre5 
-wget https://bitbucket.org/jsuto/piler/downloads/piler_1.3.12-focal-eb2b22b2_amd64.deb 
-wget http://mirrors.kernel.org/ubuntu/pool/universe/libz/libzip/libzip5_1.5.1-0ubuntu1_amd64.deb 
  
-dpkg -i libzip5_1.5.1-0ubuntu1_amd64.deb +===== Installation des prérequis =====
-dpkg -i piler_1.3.12-focal-eb2b22b2_amd64.deb+
  
-cp /etc/piler/piler.conf.dist /etc/piler/piler.conf +<code bash>apt purge postfix 
-nano /etc/piler/piler.conf+apt install gnupg2 sysstat python3-mysqldb mariadb-server default-libmysqlclient-dev memcached libapache2-mod-php php-mysql libtre5 libtre-dev openssl libssl-dev  libzip-dev libzip4 build-essential gcc libwrap0 libwrap0-dev</code>
  
-hostid=piler.yourdomain.com 
-listen_addr=0.0.0.0 
-listen_port=2525 
-mysqldb=piler 
-mysqlpwd=verystrongpassword 
-mysqluser=piler 
  
 +===== Installation de Manticore =====
  
 +<code bash>wget https://repo.manticoresearch.com/manticore-repo.noarch.deb
 +dpkg -i manticore-repo.noarch.deb
 +apt update
 +apt install manticore manticore-columnar-lib
 +systemctl start manticore
 +systemctl disable manticore
 +</code>
  
-mysql -u root -p 
-create database piler character set 'utf8mb4'; 
-grant all privileges on piler.* to piler@localhost identified by 'verystrongpassword'; 
-flush privileges; 
-quit; 
  
-mysql -u piler -p piler < /usr/share/piler/db-mysql.sql+===== Création des accès/droits =====
  
-wget http://sphinxsearch.com/files/sphinx-3.4.1-efbcc65-linux-amd64.tar.gz +  <code bash>groupadd piler 
-tar xvzf sphinx-3.4.1-efbcc65-linux-amd64.tar.gz +useradd -g piler --s /bin/bash -d /var/piler piler 
-cp /sphinx-3.4.1/bin//usr/bin+usermod -L piler 
 +chmod 755 /var/piler</code>
  
 +  - <code bash>mysql -u root -p</code> <code mysql>CREATE OR REPLACE USER 'piler'@'localhost' IDENTIFIED BY 'superpassword';
 +quit;</code>
  
-crontab -e -u piler+===== Installation de Piler =====
  
-/// A VERIFIER +<code bash>wget https://bitbucket.org/jsuto/piler/downloads/piler-1.4.1.tar.gz 
-5,35 * * * * /usr/local/libexec/piler/indexer.delta.sh +tar xvzf piler-1.4.1.tar.gz</code>
-30   2 * * * /usr/local/libexec/piler/indexer.main.sh +
-40 3 * * * /usr/local/libexec/piler/purge.sh +
-*/15 * * * * /usr/bin/indexer --config /usr/local/etc/piler/sphinx.conf --quiet tag1 --rotate +
-*/15 * * * * /usr/bin/indexer --config /usr/local/etc/piler/sphinx.conf --quiet note1 --rotate +
-*/5 * * * *  /usr/bin/find /var/piler/www/tmp -type f -name i.\* -exec rm -f {} \; +
-*/5 * * * * /usr/bin/find /var/piler/error -type f|wc -l /var/piler/stat/error +
-3 * * * * /usr/local/libexec/piler/watch_sphinx_main_index.sh +
-2 0 * * * /usr/local/libexec/piler/pilerpurge.py+
  
-/var/piler/www/+<code bash>./configure --localstatedir=/var 
 +--with-database=mysql \ 
 +--enable-tcpwrappers \ 
 +--enable-memcached 
 +make 
 +make install 
 +ldconfig</code>
  
-/etc/piler/config-site.php</code>+<code bash>nano /usr/local/etc/piler/manticore.conf.dist</code> 
 + et retirer network_timeout 
 + 
 + 
 +<code bash>make postinstall</code> 
 + Please enter the webserver groupname [apache] www-data 
 + Please enter smtp relay [] 
 + 
 +Faire un backup du keyfile: /usr/local/etc/piler/piler.key 
 + 
 +<code bash>nano /usr/local/etc/piler/piler.conf</code> 
 + modifier le hostid 
 + 
 +touch /usr/local/etc/piler/MANTICORE 
 + 
 +<code bash>nano /usr/local/etc/piler/manticore.conf</code> 
 +define('RT', 1); 
 + 
 +<code bash>nano /var/piler/www/config.php</code> 
 + $config['SPHINX_MAIN_INDEX'] = 'piler1'; 
 + 
 +<code bash>systemctl daemon-reload 
 +systemctl enable rc.piler.service 
 +systemctl enable rc.searchd.service 
 +systemctl start rc.piler.service 
 +systemctl start rc.searchd.service</code> 
 + 
 +<code bash>nano /etc/apache2/sites-enabled/000-default.conf</code> <code apache2> DocumentRoot /var/www/piler 
 + 
 + 
 +        <Directory /var/piler/www> 
 +                Require all granted 
 +                AllowOverride all 
 +        </Directory</code> 
 + 
 +<code bash> 
 +a2enmod rewrite 
 +systemctl restart apache2 
 +</code> 
 + 
 +<code bash> 
 +nano /usr/local/etc/piler/config-site.php </code><file - config-site.php> 
 +$config['ENABLE_IMPORT'] = 1;</file> 
 + 
 +<code bash>nano /usr/local/etc/piler/piler.conf</code><file - piler.conf> 
 +archive_address=archive@mail-arch.makeitsimple.be 
 +rtindex=1 
 +sphxdb=piler1 
 +sphxhost=127.0.0.1 
 +sphxport=9306 
 +</file> 
 + 
 +Config MYSQL Recommandée: 
 +<code> 
 +innodb_buffer_pool_size = 256M 
 +innodb_flush_log_at_trx_commit=1 
 +innodb_log_buffer_size=64M 
 +innodb_log_file_size=64M 
 +innodb_read_io_threads=4 
 +innodb_write_io_threads=4 
 +innodb_log_files_in_group=2 
 + 
 +innodb_file_per_table</code> 
 + 
 +Import piler: 
 +<code bash> 
 +mkdir /etc/piler 
 +ln -s /usr/local/etc/piler/piler.conf /etc/piler/piler.conf 
 +ln -s /usr/local/bin/pilerimport /usr/bin/pilerimport 
 +/usr/local/libexec/piler/import.sh 
 +</code>
  
linux/mailpiler.1662752675.txt.gz · Dernière modification : de root