My activities New request

contact atmail support

PH: +61 (7) 5357-6605

support@atmail.com

Follow

ArchiveVault Dependency Resolution

Stewart -

PROBLEM
I need the correct packages installed for ArchiveVault.

ENVIRONMENT

  • ArchiveVault

CAUSE

  • ArchiveVault not yet installed

RESOLUTION

Archive vault makes extensive use of indexing and searching services. These services require that PHP 5.3.x or newer is installed, and some other dependencies are met.Depending on the Operating system being installed on, this can be a bit tricky so information is supplied here to get past these problems. Please send us notes on your experiences and how you resolved them and we will add them to this howto.

Compiling PHP 5.3.x for Atmail and ArchiveVault

While tools such as yum, apt-get and pkg_add can make our life a lot easier when it comes to installing PHP and it's extensions (among other things), there is often a time when we need to go the old-fashioned route and compile from source. This brief article explains how to build PHP 5.3.x from source while detailing the configure options required for compiling PHP 5.3.x so that it plays nice with Atmail 6 and ArchiveVault.

 

General Install Instructions

On a fresh install of CentOs5.4 start by installing:

yum install httpd-devel libxml2-devel openssl-devel mysql-devel php-mysql php-mbstring gcc-c++ php-devel libc-client-devel.i386
 
# N.B. You will need to start MySQL after it is installed for the first time. service mysqld start
# httpd-devel   (Fixes: apxs requirements)
# libxml2-devel (Fixes: configure: error: xml2-config not found. Please check your libxml2 installation. )
# openssl-devel (Fixes: configure: error: Can't find OpenSSL's evp.h )
# php-devel (Fixes: configure: error: Can't find apxs )
 
#CPRE installs with unicode support off by default (at least on CentOS 5.4 32 and 64 bit), but is required for ArchiveVault Lucene indexing to function.
#The following PRM fixes that:
 
rpm -Uvh /usr/local/archivevault/server_source/pcre-6.6-2.7.i386.rpm              
 
#OR for 64 bit:
 
rpm -Uvh /usr/local/archivevault/server_source/pcre-66-27x86_64.rpm              
 
#make apache and mysql start automatically at boot time
chkconfig httpd on
chkconfig mysqld on
  • Download the PHP 5.3.x source from http://php.net
  • Extract into a temporary location on your server, say /tmp
  • cd into the php-5.3.x/ dir that you just extracted
  • Now it's time to configure the PHP source for the options you want compiled so run this command:
./configure --with-apxs2=/usr/sbin/apxs --with-mysql --enable-mbstring --with-ldap --with-pdo-mysql --with-zlib --with-openssl --prefix=/usr/local/php5 --with-imap --with-kerberos --with-imap-ssl
  • Once configure has successfully completed run this command :
make install
  • To make this new PHP also the CLI php:
rm -rf /usr/bin/php
ln -s /usr/local/php5/bin/php /usr/bin/php
  • PHP 5.3 expects the default location for php.ini in a different location so it will need to be moved and preconfigured:
#Move the existing/old php.ini file to where new PHP is looking for it (php -i|grep php.ini)
# e.g. mv /etc/php.ini /usr/local/lib/php.ini ( or /usr/local/php5/lib etc. depending on your OS)
cp /usr/share/zoneinfo/Australia/Brisbane /etc/localtime
 
#edit php.ini (wherever it is located)
nano -w /etc/php.ini
#change:
;date.timezone
#to
date.timezone = Australia/Brisbane
 
Australia/Brisbane would be replaced by the required timezone.
 
Important Notes:
  • You will need to replace /usr/sbin/apxs with the path to your apxs
  • You may need to install mysql-devel if you run into configure or compile errors relating to the mysql extension
  • You may need to install the zlib library if you run into errors relating to zlib extension (and may need to point to the location of zlib with --with-zlib=/path/to/zlib)
  • You may need to install the OpenSSL library if it is not on your system
  • On some 64bit systems (eg CentOS, RH) you may need to run: ln -s /usr/lib64/mysql/libmysqlclient.so /usr/lib/mysql/libmysqlclient.so

 

Have more questions? Submit a request

Comments

  • Avatar
    Justin

    Messages are stored using bzip2 compression and I was unable to view any of them without errors. To fix it, on CentOS 6 I needed to install the bzip2-devel and bzip2-libs packages through YUM, and also needed to include '--with-bz2=/usr/bin' to my ./configure string when installing PHP from source. After that, I was able to view all messages without errors!

  • Avatar
    Stewart

    Thanks Justin! Very helpful comment.