centos7安装erlang、rabbitmq以及php扩展
标签(空格分隔): liunx,php
安装Erlang
版本:el7 erlang-20.3.8.25 erlang-20.3.8.25-1.el7.x86_64.rpm
1. 下载
wget --content-disposition "https://packagecloud.io/rabbitmq/erlang/packages/el/7/erlang-20.3.8.25-1.el7.x86_64.rpm/download.rpm?distro_version_id=140"
2. yum安装本地rmp
yum localinstall erlang-20.3.8.25-1.el7.x86_64.rpm
安装RabbitMq-Server
版本:rabbitmq-server-3.10.0-1.el7.noarch.rpm
1. 下载
https://packagecloud.io/rabbitmq/rabbitmq-server/packages/el/7/rabbitmq-server-3.10.0-1.el7.noarch.rpm?distro_version_id=140
2. yum安装本地rpm
wget --content-disposition "https://packagecloud.io/rabbitmq/rabbitmq-server/packages/el/7/rabbitmq-server-3.10.0-1.el7.noarch.rpm/download.rpm?distro_version_id=140"
yum localinstall rabbitmq-server-3.10.0-1.el7.noarch.rpm
启动rabbitmq
systemctl status rabbitmq-server
systemctl start rabbitmq-server
systemctl restart rabbitmq-server
安装web管理插件
1. 安装插件
rabbitmq-plugins enable rabbitmq_management [http://127.0.0.1:15672]
2. 增加用户 账号:admin 密码:admin
rabbitmqctl add_user admin admin
3. 设置权限
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions -p "/" admin ".*" ".*" ".*"
PHP扩展amqp
1. 首先安装依赖:librabbitmq
wget https://github.com/alanxz/rabbitmq-c/releases/download/v0.7.1/rabbitmq-c-0.7.1.tar.gz
tar -xzvf rabbitmq-c-0.7.1.tar.gz
cd rabbitmq-c-0.7.1
./configure --prefix=/usr/local/rabbitmq-c-0.7.1
make && make install
2. 安装amqp扩展
https://pecl.php.net/package/amqp
tar -zxvf amqp-1.11.0.tar
cd amqp-1.11.0
/usr/local/php7.3.3/bin/phpize
./configure --with-php-config=/usr/local/php7.3.3/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c-0.7.1
make && make install
配置文件增加扩展
php.ini amqp.so
验证扩展
php --ri amqp
标签:php,rabbitmq,server,centos7,erlang,rpm,el7
From: https://www.cnblogs.com/yanweifeng/p/17427980.html