手记

安装php-mq扩展

################################ 安装php-mq扩展 ####################
相关安装包: http://rpms.famillecollet.com/enterprise/5/remi/x86_64/

wget http://rpms.famillecollet.com/enterprise/5/remi/x86_64/librabbitmq-devel-0.5.1-1.el5.remi.x86_64.rpm
rpm -ivh librabbitmq-devel-0.5.1-1.el5.remi.x86_64.rpm
yum -y install librabbitmq-devel

wget http://pecl.php.net/get/amqp-1.0.3.tgz

tar zxf amqp-1.0.3.tgz
cd amqp-1.0.3
phpize
./configure --with-php-config=/usr/bin/php-config
make && make install
ll /usr/lib64/php/modules/|grep mq
vi /etc/php.ini
  extension_dir = "/usr/lib64/php/modules/"
  extension = amqp.so

/etc/init.d/php-fpm restart
php -m|grep mq

0人推荐
随时随地看视频
慕课网APP