Jul 192011
 
PHP Logo

A new TLF yum repository has been created for Red Hat Enterprise Linux 6-based distributions (ie CentOS 6).  As of right now, there is only a 64-bit repo.  32-bit packages are forthcoming.  php 5.3.6 packages are available here by running the following set of commands:

There are several php packages available and the above yum command is only an example if you wanted to install php, the cli, and the mysql and mbstring extensions. The extensions you need will be based upon your usage.

Jul 102011
 
PHP Logo

The Linux Fix yum repository has been updated with new rpm’s for the tlf-release package and for php version 5.3.6.  The new tlf-release package includes changes to the layout of the yum repository, including splitting off a separate 32-bit and 64-bit repo.  You can read the release notes for php 5.3.6 here.

You may install or update the TLF repository with the following command:

Note that this command will work on 64-bit architectures as well.  I also need to repeat the disclaimer that using any of the database extensions for this version of php will also update sqlite to version 3.6.20, which replaces some pretty core functionality of RHEL and CentOS, so please use them at your own risk.

 

Feb 252011
 

I’m a big fan of Red Hat Enterprise Linux as a server OS.  For hosts that don’t require high service level agreements, all of the RHEL-based community distributions like CentOS and Scientific Linux are a perfect choice in my opinion.  One of the drawbacks of using these is that as a trade-off for support, reliability, and you don’t always get the latest and greatest versions of software or applications.  That being the case, when I recently found a need to install php 5.3.5 on some CentOS-based hosts, I was a bit put out.

I could download the source and build it from scratch, but why not do something re-usable?  I decided to make an rpm in order to distribute it to any other servers I needed to.  I had an installation of RHEL 6 that I had been playing with, so using the source rpm for the php-5.3.1 rpm distributed with RHEL 6, I had my starting point to build a RHEL 5 rpm.  The end result is that I have published some php-5.3.5 rpm’s in the yum repo hosted at The Linux Fix.

In order to use it, just run the following as root:

This will set up the yum repository configuration file and copy the gpg public key to /etc/pki/rpm-gpg on your system.  From there, you should be able to just do:

as root.  This will download and install (or update) php on your system to version 5.3.5.

There are two things to note; first if you need other php modules, you’ll need to install those separately (for example, yum install php-mysql if you need mysql support), which is pretty standard for any RHEL-based distribution.  The second thing is that if you install the php-sqlite or php-pdo modules, one of the dependencies is sqlite version 3.6, which is also in the tlf repo.  The important thing to note is that sqlite is used by some pretty core components of RHEL (rpm, to be precise),  and upgrading this on a supported system may complicate any support you try to get from Red Hat in the future.  While all of my testing has been successful and I have not run into any problems, if you upgrade sqlite, you do so at your own risk!