Hi Guys,

I created a guide as i was installing mailpiler on CentOS.

Janos,  you are welcome to put this in tarball or wiki if its good enough...

if anyone reading it have suggestions or if i completely missed stuff
please let me know.

Thanks
Mailpiler Mailpiler provides a secure and safe solution for email archiving, you can download a copy of the OVA for quick and easy deployments or for testing, however I am more of a RHEL guy so it's natural for me to install it on RHEL/CentOS. Preparing the box Install EPEL Repository
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Install RPMforge Repository
rpm -Uvh http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm
Install required packages
yum install -y openssl httpd openssl-devel tre-devel mysql-server php-mysql memcached catdoc libpst libzip tre sysstat poppler-utils unrtf mysql-devel
Setup MySQL
service mysqld start && chkconfig mysqld on
Configure your root password for MySQL
mysqladmin -u root password securepass
Download and install xlhtml
wget https://bitbucket.org/jsuto/piler/downloads/xlhtml-0.5-sj-mod.tar.gz
Extract the package
tar xfvz xlhtml-0.5-sj-mod.tar.gz
cd xlhtml-0.5-sj-mod
./configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
make && make install
Install Sphinx
wget http://sphinxsearch.com/files/sphinx-2.0.9-1.rhel6.x86_64.rpm
yum localinstall sphinx-2.0.9-1.rhel6.x86_64.rpm
Create a user for piler
groupadd piler
useradd -g piler -s /bin/sh -d /var/piler piler
usermod -L piler
Download and Install Mailpiler
wget https://bitbucket.org/jsuto/piler/downloads/piler-0.1.23.tar.gz
Extract the package
tar xfvz piler-0.1.23.tar.gz
Compile and install
cd piler-0.1.23
./configure --localstatedir=/var
make && make install
make postinstall
This will launch a script to configure piler, supply your own documentroot path and credentials
This is the postinstall utility for piler
It should be run only at the first install. DO NOT run on an existing piler installation!


Continue? [Y/N] [N] y


Please enter the path of your documentroot [/var/www/localhost] /var/www/html/mailpiler

Please enter the webserver groupname [apache]

Please enter mysql hostname [localhost]

Please enter mysql database [piler]

Please enter mysql user name [piler]

Please enter mysql password for piler []

Please enter mysql root password []
mysql connection successful


Please enter the path of sphinx.conf [/etc/sphinx.conf] /etc/sphinx/sphinx.conf

Please enter smtp relay [] smtp.example.com

Please enter smtp relay port [25]
Register the liberary
echo /usr/local/lib > /etc/ld.so.conf.d/piler.conf
ldconfig
Setup Apache Virtual Host
vi /etc/httpd/conf.d/mailpiler.conf
<VirtualHost *:80>
ServerName mailarchiver.example.com
DocumentRoot /var/www/html/mailpiler
<Directory /var/www/html/mailpiler>
AllowOverride All
</Directory>
ServerAdmin [email protected]
ErrorLog /var/log/httpd/mailarchiver-error.log
CustomLog /var/log/httpd/mailarchiver-access_log common
</VirtualHost>
service httpd start && chkconfig httpd on
Configure Mailpiler SQL Setting
vi /usr/local/etc/piler.conf
;
; mysql stuff
;

mysqlhost=127.0.0.1
mysqlport=3306
mysqlsocket=/tmp/mysql.sock
mysqluser=piler
mysqlpwd=securepass
mysqldb=piler
mysql_connect_timeout=2
Initialise search indexes
su piler
indexer --all
Setup Mailpiler startup script
cd piler-0.1.23/init.d
mv rc.piler mailpiler
Change init script to work with chkconfig
vi mailpiler
Add the following just below the shebang
# chkconfig: 235 98 40
# description: startup script for mailpiler
Copy the init script in the correct location
cp mailpiler /etc/init.d/
Make it executable
chmod +x /etc/init.d/mailpiler
Add the service to chkconfig and set it to startup at boot
chkconfig --add mailpiler && chkconfig mailpiler on
Setup Sphinx init script Mailpiler supplies it own init script that starts sphinx however since we install sphinx from a rpm the binary executable for sphinx is located at /usr/bin/ and not /usr/local/bin as stated in the init script.
vi rc.searchd
# chkconfig: 235 97 42
# description: startup script for sphinx
Also change the section as below
start() {
        echo "starting searchd . . ."
        su piler -c '/usr/bin/searchd'
}
Copy rc.searchd /etc/init.d/searchd
chmod +x /etc/init.d/searchd
chkconfig --add searchd && chkconfig searchd on
Finally we need to configure so settings for Mailpiler
vi /var/www/html/mailpiler/config-site.php
$config['SITE_URL'] = 'http://mailarchiver.example.com/';
This is important as mailpiler uses this url to redirect requests. This will always match your virtual host server name.
service mailpiler start && service searchd start
You can now access http://mailarchiver.exameple.com Default credentials Username: admin@local Password: pilerrocks

Reply via email to