ubuntu 使用pecl 安装 PHP AMQP Extension

下载扩展:
sudo apt-get -y install gcc make autoconf libc-dev pkg-config
sudo apt-get -y install libssl-dev
sudo apt-get -y install librabbitmq-dev
安装amqp:
sudo pecl install amqp
当出现如下提示时,只需按回车键即可
Set the path to librabbitmq install prefix [autodetect] :
添加 extension=amqp.so
sudo bash -c "echo extension=amqp.so > /etc/php/7.2/mods-avaliable/amqp.ini"

复制到conf.d:
sudo ln -s /etc/php/7.2/mods-available/amqp.ini /etc/php/7.2/fpm/conf.d/20-amqp.ini
sudo ln -s /etc/php/7.2/mods-available/amqp.ini /etc/php/7.2/fpm/conf.d/20-amqp.ini
重启php-fpm:
sudo service php7.2-fpm restart

 

posted on 2019-08-26 13:58  GulperMao  阅读(843)  评论(0编辑  收藏  举报