Thanks for the quick reply and information provided Janos.
On 7/29/2013 11:14 AM, Janos SUTO wrote:
Hello Michael,
On 2013-07-29 17:06, Michael Wessel wrote:
I installed Piler last night to check it out and test it and have it
all up and running now.
So far I like it a lot (though I had to jump through a few hoops to
get it all working).
share with us, and I'll review the install procedure to fix them
OK, here goes: Most of the hoops were my own fault (the major one being
that I had SELinux enabled without realizing it for some time which
resulted in all sorts of strange behavior...)
I did a fresh install of CentOS6.4 Minimum install, so what I was
missing is based on that install.
I used the PDF documentation from the website which I later saw seems
dated. The requirements have changed some compared to the on-line
documentation and there is no reference to the helpful "make
postinstall" in the PDF. So updating the PDF would be a good thing.
I installed epel and rpmforge repos and then used the following yum to
install all the dependencies I was missing (I pieced this together
through several compile attempts):
yum install man vim telnet net-snmp cronie sysstat rsync ntp wget make
gcc db4-devel patch zip unzip mysql mysql-server mysql-devel gcc-devel
php php-xml php-mysql libzip libzip-devel tre tre-devel tcp_wrappers
tcp_wrappers-libs tcp_wrappers-devel catdoc unrtf poppler poppler-devel
I did an rpm install of sphinx and had to edit
/usr/local/src/piler-0.1.23/init.d/rc.searchd and change
## Change the line (line 10):
su piler -c '/usr/local/bin/searchd'
##to this
su piler -c '/usr/bin/searchd'
After that I had 2 other gotchas. One was that I had to create
/etc/ld.so.conf.d/piler.conf and add to it: /usr/local/lib
Then run ldconfig
Finally in /usr/local/etc/piler.conf I had to set the database host to
127.0.0.1 (as opposed to localhost). Using localhost piler was not able
to connect to the database. Haven't looked into that yet to find out
why. Probably a permission problem since localhost will use a socket and
127.0.0.1 TCP/IP.
At that point everything started working.
One question I have is how do I backup and restore? It's listed as a
feature but not documented from what I have seen.
Is it a simple matter of rsyncing the /var/piler directory? And in
case a restore is needed I just put it all back and it'll work (plus
the database of course)?
Is there a recommended procedure?
piler has 3 kinds of data:
- emails (/var/piler/store)
- sphinx database (/var/piler/sphinx)
- mysql database
in order to make a backup you have to save these data. If you can see
/var/piler/store/00 then you may find directories like 51b, 51c, 51d, ...
They come from the timestamp, and each of them contains ~12 days of
emails,
so you don't have to rsync old dirs since they don't change any more.
It's also a good idea (although it depends on your setup) to create a
mysql
replica, so you have kinda backup of your database.
Sphinx has fewer although bigger files.
However there's another approach: to export emails (with pilerexport),
then in
case of a restore, you can import them (with pilerimport).
pilerexport is able to retrieve all emails of the given day to the
current
directory, eg, pilerexport --start-date 2013.07.29 --stop-date 2013.07.29
Then you can move it to tape, etc. This latter approach is a more
lightweight
one, you have to deal with less data, however a complete restore takes
more time.
Thanks very much for this, I'll play around with both and see what will
work out best once I have a substantial amount of mail in the archive
(which won't take very long).
And a minor issue - the health monitor permanently shows a red bar
and no text for the CPU usage. The cron job is set up and seems to
produce the correct result:
cat /var/piler/stat/cpu.stat
99.43
Regardless of the value in cpu.stat all I see is the red bar.
Any ideas?
Try replacing $11 with $10 in piler's crontab.
Tried that but it's still the same. The bar is all red regardless of the
value
cat /var/piler/stat/cpu.stat
0.00
The raw mpstat:
09:09:09 PM CPU %usr %nice %sys %iowait %irq %soft
%steal %guest %idle
09:09:09 PM all 0.23 0.00 0.10 0.58 0.00
0.00 0.00 0.00 99.09
And one additional minor thing, the SMTP Status shows "piler: Error"
even though it's running. I do have it listen on a port other than 25,
is that why?
Janos
Michael