Online demo Privacy policy GoBD notes Blog

Differences

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

Link to this comparison view

Next revision
Previous revision
current:post-install [2015/08/05 14:37]
sj created
current:post-install [2020/04/21 11:35] (current)
sj
Line 14: Line 14:
 <code> <code>
 make key make key
-cp piler.key /usr/local/etc +cp piler.key /usr/local/etc/piler 
-chgrp piler /usr/local/etc/piler.key +chgrp piler /usr/local/etc/piler/piler.key 
-chmod 640 /usr/local/etc/piler.key+chmod 640 /usr/local/etc/piler/piler.key
 </code> </code>
  
 This command will read 56 bytes from /dev/urandom and write to ./piler.key. Piler uses the key to encrypt archived files, and decrypt retrieved messages from the archive. This command will read 56 bytes from /dev/urandom and write to ./piler.key. Piler uses the key to encrypt archived files, and decrypt retrieved messages from the archive.
  
-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.+**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.**
  
 **Create a database for piler** **Create a database for piler**
Line 27: Line 27:
 <code> <code>
 #mysql -u root -p #mysql -u root -p
-mysql>create database piler character set 'utf8';+mysql>create database piler character set 'utf8mb4';
 mysql>grant all privileges on piler.* to piler@localhost identified by 'verystrongpassword'; mysql>grant all privileges on piler.* to piler@localhost identified by 'verystrongpassword';
 mysql>flush privileges; mysql>flush privileges;
Line 42: Line 42:
  
 <code> <code>
-#cp etc/sphinx.conf.in /usr/local/etc +# cp etc/sphinx.conf.in /usr/local/etc/piler/sphinx.conf 
-#su - piler +# chmod +x /usr/local/etc/piler/sphinx.conf 
-$indexer --all+# su - piler 
 +$ indexer --all --config /usr/local/etc/piler/sphinx.conf
 </code> </code>
  
Line 65: Line 66:
 </code> </code>
  
-Set up cron jobs +**Set up cron jobs for piler user**
- +
-For piler user:+
  
 <code> <code>
-*/5 * * * * LC_ALL=C mpstat | tail -1 | awk '{print $11}' > /var/piler/stat/cpu.stat +5,35 * * * * /usr/local/libexec/piler/indexer.delta.sh 
-*/15 * * * * /usr/local/bin/indexer --quiet delta1 --rotate && sleep 2 && /usr/local/bin/indexer --quiet --merge main1 delta1 --merge-dst-range deleted 0 0 --rotate +30   2 * * * /usr/local/libexec/piler/indexer.main.sh 
-*/15 * * * * /usr/local/bin/indexer --quiet tag1 --rotate +40 3 * * * /usr/local/libexec/piler/purge.sh 
-*/15 * * * * /usr/local/bin/indexer --quiet note1 --rotate +*/15 * * * * /usr/bin/indexer --config /usr/local/etc/piler/sphinx.conf --quiet tag1 --rotate 
-# optional +*/15 * * * * /usr/bin/indexer --config /usr/local/etc/piler/sphinx.conf --quiet note1 --rotate 
-30 7 * * * /usr/bin/php /usr/local/libexec/piler/daily-report.php /var/piler/www+*/* * * *  /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
 </code> </code>
  
Line 92: Line 94:
 </code> </code>
  
-Create config-site.php (in the same directory where config.php resides), and add every site specific variables to config-site.php. Any variable that presents in config-site.php overrides the config.php default values. This way your local settings may survive a gui upgrade when the contents of config.php is changed.+Create /usr/local/etc/piler/config-site.php, and add every site specific variables to config-site.php. Any variable that presents in config-site.php overrides the config.php default values. This way your local settings may survive a gui upgrade when the contents of config.php is changed.
  
 On the demo site we use the following config-site.php file: On the demo site we use the following config-site.php file:
Line 103: Line 105:
 $config['DIR_BASE'] = '/var/piler/www/'; $config['DIR_BASE'] = '/var/piler/www/';
  
-$config['ENABLE_AUDIT'] = 0; 
-$config['MEMCACHED_ENABLED'] = 0; 
-$config['ENABLE_SYSLOG'] = 1; 
 $config['PILER_HOST'] = '1.2.3.4'; $config['PILER_HOST'] = '1.2.3.4';
 $config['SMTP_DOMAIN'] = 'demo.mailpiler.org'; $config['SMTP_DOMAIN'] = 'demo.mailpiler.org';
Line 111: Line 110:
 $config['ADMIN_EMAIL'] = 'admin@demo.mailpiler.org'; $config['ADMIN_EMAIL'] = 'admin@demo.mailpiler.org';
  
-?> 
 </code> </code>
  
-Set url rewriting rules +Check out the contrib/webserver directory on how to setup a virtual host for apache and nginx.
- +
-If you have apache, then you are done since the .htaccess file has all the required stuff. You may find some examples in the contrib/webserver directory how to setup a virtual host for apache and nginx.+
Google Analytics Alternative