一、安装依赖库
yum -y install git libtool autoconf automake
二、安装rabbitmq-c
cd /data0/software/ git clone git://github.com/alanxz/rabbitmq-c.git cd rabbitmq-c git submodule init git submodule update autoreconf -i && ./configure && make && sudo make install cd ../
三、安装PHP的AMQP扩展
cd /data0/software/ git clone git://github.com/pdezwart/php-amqp cd php-amqp/ git submodule init git submodule update /usr/local/webserver/php/bin/phpize ./configure --with-php-config=/usr/local/webserver/php/bin/php-config make make install cd ../
四、配置php.ini
vi /usr/local/webserver/php/etc/php.ini
在extension_dir相关位置加上下面的配置
extension = "amqp.so"
保存退出之后,重启php fast-cgi即可。
除非注明,本博客文章均为原创,转载请以链接形式标明本文地址
本文地址: http://blog.cnwyhx.com/centos-linux-install-amqp-php-extension