Download openldap-2.0.27.tgz from www.openldap.org. Save patch file to same directory. tar zxvf openldap-2.0.27.tgz patch -p0 < file.patch cd openldap-2.0.27.tgz export CPPFLAGS="-I/usr/kerberos/include" ./configure --with-tls make depend make At this point you can test your ldap binaries (including openldap-2.0.27/clients/tools/ldapsearch). make install I also needed to fix LDAP TLS in PHP, so I did the following: Download the SRPM for your current PHP RPM from a RedHat mirror (I used php-4.2.2-17.2.src.rpm). rpmbuild --rebuild php-4.2.2-17.2.src.rpm A lot will happen here, be patient. cd /usr/src/redhat/RPMS/ You should see all new PHP RPMS, you really only need to remove the old ldap one and install the new one instead. rpm -e php-ldap-4.2.2-17.2 rpm -ivh php-ldap-4.2.2-17.2..rpm You can follow a similar process for any other programs that have SRPMS need openldap fixed.