Press "Enter" to skip to content

centos7下安装amqp

1.先安装rabbitmq-c

wget https://github.com/alanxz/rabbitmq-c/archive/refs/tags/v0.11.0.tar.gz
tar -zxvf v0.11.0.tar.gz -C /usr/local/
cd /usr/local/rabbitmq-c-0.11.0/
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/rabbitmq-c-0.11.0
cmake –build . –target install
ln -s /usr/local/rabbitmq-c-0.11.0/lib64 /usr/local/rabbitmq-c-0.11.0/lib


2.安装php-amqp

wget https://pecl.php.net/get/amqp-1.11.0.tgz
tar -zxvf amqp-1.11.0.tgz
cd amqp-1.11.0/
/www/server/php/73/bin/phpize

./configure –with-php-config=/www/server/php/73/bin/php-config –with-amqp –with-librabbitmq-dir=/usr/local/rabbitmq-c-0.11.0
make && make install
————————————————

3.php.ini启用扩展并重启

extension=/www/server/php/73/lib/php/extensions/no-debug-non-zts-20180731/amqp.so

发表评论