centos 安装amqp扩展

执行

php --ri amqp

如果出现:

 

amqp

Version => 1.4.0
Revision => $Revision: 327551 $
Compiled => Jun 8 2015 @ 18:26:57
AMQP protocol version => 0-9-1
librabbitmq version => 0.5.2

Directive => Local Value => Master Value
amqp.host => localhost => localhost
amqp.vhost => / => /
amqp.port => 5672 => 5672
amqp.timeout => no value => no value
amqp.read_timeout => 0 => 0
amqp.write_timeout => 0 => 0
amqp.connect_timeout => 0 => 0
amqp.login => guest => guest
amqp.password => guest => guest
amqp.auto_ack => 0 => 0
amqp.prefetch_count => 3 => 3

代表已经成功安装,

如出现:

 

Extension 'amqp' not present.

代表未安装。

如果出现:

 

checking for amqp files in default path... not found
configure: error: Please reinstall the librabbit-mq distribution
ERROR: `/var/tmp/amqp/configure' failed

也可以尝试以下步骤:
请尝试以下步骤:

1、查找 librabbitmq

 

yum search librabbitmq

2、安装 librabbitmq-devel

 

yum install librabbitmq-devel

3、安装 pecl install amqp

 

pecl install amqp

4、看到
Build process completed successfully
Installing '/usr/lib64/php/modules/amqp.so'
install ok: channel://pecl.php.net/amqp-1.4.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=amqp.so" to php.ini
代表已经安装成功,修改 php.ini,然后 重启php-fpm 即可完成安装

转载于:https://my.oschina.net/u/588516/blog/1457076

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值