Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

All rpms for postfix is built for MySQL 5.0, however I have MySQL 5.1 installed on my server, how do I proceed installing postfix for MySQL 5.1 with the MySQL support?

share|improve this question
1  
postfix build with the mysql 5.0 libs should be able to talk to a mysql 5.1 server –  topdog Jul 17 '10 at 11:36
add comment

2 Answers

up vote 0 down vote accepted

The existing one in CentosPlus repository should work, it's dependency is on:

libmysqlclient.so.15  
libmysqlclient.so.15(libmysqlclient_15)

However if it doesn't work, then grab the source existing RPM:

http://mirror.centos.org/centos/5.5/centosplus/SRPMS/

Make sure the following are installed on your system ("yum install FOO" as root) as well as the "rpm-build" package :

$ cat postfix.spec | grep BuildRequires
BuildRequires: gawk, perl, sed, ed, db4-devel, pkgconfig, zlib-devel
BuildRequires: setup >= 2.5.36-1
BuildRequires: openldap >= 2.0.27, openldap-devel >= 2.0.27
BuildRequires: cyrus-sasl >= 2.1.10, cyrus-sasl-devel >= 2.1.10
BuildRequires: pcre, pcre-devel
BuildRequires: mysql, mysql-devel
BuildRequires: postgresql, postgresql-libs, postgresql-devel
BuildRequires: openssl-devel >= 0.9.6

Run these commands as your normal user to set up basic RPM building:

cd ~/
mkdir -p redhat/{BUILD,SOURCES,SPECS,SRPMS}
mkdir -p redhat/RPMS/{athlon,i386,i486,i586,i668,x86_64,noarch}
echo -e "%_topdir $HOME/redhat\n%packager root <root@localhost>" > ~/.rpmmacros

Place your downloaded SRPM from above into ~/redhat/SRPMS/, then:

rpmbuild -ba postfix-2.3.3-2.1.centos.mysql_pgsql.src.rpm

...to create a compatible package for the MySQL 5.1 RPMs you have installed that you know is built against them.

share|improve this answer
    
Thanks for your comprehensive answer :) –  TheOnly92 Jul 17 '10 at 18:15
add comment

There's no need to rebuild Postfix. Just install the Mysql 5.1 shared-compat package of the same version of your Mysql 5.1 server. That'll provide the libmysql Centos 5.x expects.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.