Home > Dev Tools | Development > RabbitMQ, PHP, Centos5

RabbitMQ, PHP, Centos5

Trying out RabbitMQ as a messaging system for modules written in different languages. The installation is a little bit tricky.  The target  is running in Virtual Box. I started with:

  • Centos 5.6 (64bit)
  • PHP 5.2.10
  • Rabbit MQ Server 2.6.1

The PHP module ampq is picky about which version of PHP it runs against. Centos 5 comes with PHP5.2 which ampq wont run compile with, So my first step was to upgrade PHP to the right version. Since I like to try and use yum for package management whenever possible I found a repo with the versions I was looking for. I added the repo by creating the following file:

/etc/yum.repo.d/webtatic.repo

And then adding the following content to it:

[webtatic]
name=Webtatic Repository
baseurl=http://repo.webtatic.com/yum/centos/5/x86_64/
gpgcheck=0

Once that is done you can then update the PHP version. I updated to the latest version that Webtatic had available which at the time was 5.3.8

yum update php*

The PHP update pooched my php.ini file and was incompatible with my Mongo module. The php.ini file no longer allows “#” as a comment marker anymore. To upgrade the Mongo module simply use PECL:

pecl upgrade mongo

Now you can finally install the ampq module:

pecl install amqp

Make sure to add a link to the amqp.so file

extension=amqp.so

Comments are closed.

TOP