下载扩展:
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
原文地址:https://www.cnblogs.com/maoaji/p/11412157.html
时间: 2024-11-07 22:54:05