Centos 5 with PHP-5.2

From Open CSTA

Jump to: navigation, search

This has been tested OK on CentOS 5.1(32 bit i386) & it is INSTALLED AND TESTING as at 2/Feb/2009 on CentOS 5.2(64 bit x86_64) in production environments.

I have my own yum repository for testing, which has no updates. Ignore the instruction change to online repos - you probably won't need it.

No warranty with these instructions. Send feedback to chrisSPAM@mrvoipSPAM.com.au

Contents

Get Source RPMS

yum install aspell-devel freetds-devel libtidy-devel mhash-devel libmcrypt-devel t1lib-devel freetype-devel libpng-devel libjpeg-devel libXpm-devel ncurses-devel libxml2-devel libxslt-devel  net-snmp-devel libxml2-devel unixODBC-devel postgresql-devel mysql-devel openldap-devel cyrus-sasl-devel libc-client-devel krb5-devel gcc-c++ libtool bzip2 readline-devel smtpdaemon pcre-devel zlib-devel sqlite-devel  openssl-devel libstdc++-devel pam-devel  httpd-devel gmp-devel expat-devel  db4-devel curl-devel bzip2-devel make httpd rpm-build libXaw libXmu libidn-devel perl apr-util-devel expat-devel apr-devel

32 bit - extra dag rpms

64 bit - extra dag rpms

Then you need to install them.

  • rpm -Uvh t1lib*

Extra Step Not required by 99% of people

  • Change to online repositories for the extra, plus and other repos that I don't have. This step is likely to be skipped by 99% of people.
    • Change to online repos (rename localmirror.repo to localmirror.repo.bak & rename CentOS-Base.repo.bak to CentOS-Base.repo)

Install 2nd lot of RPMS

These 4 packages can be installed in the first yum install command, but because I don't keep updates in my network, I have to do the repository juggling.

yum install libmcrypt-devel mhash-devel libtidy-devel freetds-devel
  • Change repos back to localmirror being the only one enabled.

Rebuild SRPM

  • Change directory to where the SRPM is and type
rpmbuild --rebuild php-5.2.6-5.src.rpm

Install RPMS

  • Install rpms located in /usr/src/redhat/RPMS/i386/
    • rpm -Uvh /usr/src/redhat/RPMS/i386/*

or if you only want certain ones, install those.

Possible Issues

NOTE: The x86_64 yum stuff misses some dependencies, namely - libidn-devel for curl-devel, and perl/apr-util-devel/expat-devel/apr-devel for httpd-devel - therefore it has been added to the yum install file-list in the first section so you don't have problems with it.

You get an error message saying that curl-devel-7.9 is required but you have 7.15 installed.
un-install yum remove curl curl-devel then install it yum install curl curl-devel then it should work.
Personal tools