如何在 Oracle 上安装离线 RabbitMQ Linux 7
How to install offline RabbitMQ on Oracle Linux 7
我正在尝试在 Oracle Linux 7 上安装离线 RabbitMQ(因为服务器机器不允许互联网连接)
这是我所做的:
- 下载必要的安装包并复制到服务器(erlang-22.3.4.12-1.el6.x86_64.rpm,socat-1.7.3.2 -2.el7.aarch64.rpm, logrotate-3.8.6-19.el7.x86_64.rpm, rabbitmq-server -3.6.15-1.el7.noarch.rpm, rabbitmq-release-signing-key, firewalld-0.6.3-8.el7_8.1.noarch.rpm)
- 写一个shell脚本来离线安装如下:
yum repolist
#Install Erlang
sudo rpm -Uvh erlang-22.3.4.12-1.el6.x86_64.rpm
sudo yum install erlang
echo $(erl -version)
# Install socat
sudo yum install socat-1.7.3.2-2.el7.aarch64.rpm
#Install logrotate
sudo yum install logrotate-3.8.6-19.el7.x86_64.rpm
#Install RabbitMQ
sudo rpm --import rabbitmq-release-signing-key
sudo yum -y install rabbitmq-server-3.6.15-1.el7.noarch.rpm
# install firewall
sudo yum -y install firewalld-0.6.3-8.el7_8.1.noarch.rpm
sudo systemctl start firewalld
sudo systemctl enable firewalld
#config firewall
sudo firewall-cmd --zone=public --permanent --add-port=4369/tcp --add-port=25672/tcp --add-port=1521/tcp --add-port=5500/tcp --add-port=8080/tcp --add-port=5671-5672/tcp --add-port=15672/tcp --add-port=61613-61614/tcp --add-port=1883/tcp --add-port=8883/tcp
sudo firewall-cmd --reload
# Start service
sudo systemctl start rabbitmq-server.service
sudo systemctl enable rabbitmq-server.service
sudo rabbitmq-plugins enable rabbitmq_management
sudo chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/
# add users
sudo rabbitmqctl add_user mqadmin mqadminpassword
sudo rabbitmqctl set_user_tags mqadmin administrator
sudo rabbitmqctl set_permissions -p / mqadmin ".*" ".*" ".*"
服务器上安装了RabbitMQ 但无法启动Rabbit 服务。我收到错误
* Could not contact node rabbit@ip-172-31-6-180.
Changes will take effect at broker restart.
* Options: --online - fail if broker cannot be contacted.
--offline - do not try to contact broker.
Error: unable to connect to node 'rabbit@ip-172-31-6-180': nodedown
DIAGNOSTICS
===========
attempted to contact: ['rabbit@ip-172-31-6-180']
rabbit@ip-172-31-6-180:
* connected to epmd (port 4369) on ip-172-31-6-180
* epmd reports: node 'rabbit' not running at all
no other nodes on ip-172-31-6-180
* suggestion: start the node
current node details:
- node name: 'rabbitmq-cli-72@ip-172-31-6-180'
- home dir: /var/lib/rabbitmq
- cookie hash: S2XLDmtwBa8t9RmQxEF3Xg==
Error: unable to connect to node 'rabbit@ip-172-31-6-180': nodedown
DIAGNOSTICS
===========
attempted to contact: ['rabbit@ip-172-31-6-180']
rabbit@ip-172-31-6-180:
* connected to epmd (port 4369) on ip-172-31-6-180
* epmd reports: node 'rabbit' not running at all
no other nodes on ip-172-31-6-180
* suggestion: start the node
current node details:
- node name: 'rabbitmq-cli-09@ip-172-31-6-180'
- home dir: /var/lib/rabbitmq
- cookie hash: S2XLDmtwBa8t9RmQxEF3Xg==
Error: unable to connect to node 'rabbit@ip-172-31-6-180': nodedown
DIAGNOSTICS
===========
attempted to contact: ['rabbit@ip-172-31-6-180']
rabbit@ip-172-31-6-180:
* connected to epmd (port 4369) on ip-172-31-6-180
* epmd reports: node 'rabbit' not running at all
no other nodes on ip-172-31-6-180
* suggestion: start the node
current node details:
- node name: 'rabbitmq-cli-74@ip-172-31-6-180'
- home dir: /var/lib/rabbitmq
- cookie hash: S2XLDmtwBa8t9RmQxEF3Xg==
以及 RabbitMQ 服务的状态
Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2020-11-04 02:07:45 UTC; 4s ago
Process: 18953 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 18953 (code=exited, status=1/FAILURE)
Nov 04 02:07:45 ip-172-31-6-180.ap-southeast-1.compute.internal systemd[1]: Failed to start RabbitMQ broker.
Nov 04 02:07:45 ip-172-31-6-180.ap-southeast-1.compute.internal systemd[1]: Unit rabbitmq-server.service entered failed state.
Nov 04 02:07:45 ip-172-31-6-180.ap-southeast-1.compute.internal systemd[1]: rabbitmq-server.service failed.
我该如何解决这个问题。谢谢
这似乎对我有用。
- 下载了 rpm。
- 安装rabbitmq-server-3.6.2-1.noarch.rpm
- rabbitmq-plugins 启用 rabbitmq_management
- rabbitmqctl add_user 管理员密码
- rabbitmq-plugins 启用 rabbitmq_federation
- rabbitmq-plugins 启用 rabbitmq_federation_management
- systemctl 重启rabbitmq-server
- chown -R root:rabbitmq /etc/rabbitmq
我已经解决问题了。它是由 erlang 和 rabbitmq-server 版本之间不兼容引起的。我签出并使用兼容版本。问题得到解决
谢谢
我正在尝试在 Oracle Linux 7 上安装离线 RabbitMQ(因为服务器机器不允许互联网连接) 这是我所做的:
- 下载必要的安装包并复制到服务器(erlang-22.3.4.12-1.el6.x86_64.rpm,socat-1.7.3.2 -2.el7.aarch64.rpm, logrotate-3.8.6-19.el7.x86_64.rpm, rabbitmq-server -3.6.15-1.el7.noarch.rpm, rabbitmq-release-signing-key, firewalld-0.6.3-8.el7_8.1.noarch.rpm)
- 写一个shell脚本来离线安装如下:
yum repolist
#Install Erlang
sudo rpm -Uvh erlang-22.3.4.12-1.el6.x86_64.rpm
sudo yum install erlang
echo $(erl -version)
# Install socat
sudo yum install socat-1.7.3.2-2.el7.aarch64.rpm
#Install logrotate
sudo yum install logrotate-3.8.6-19.el7.x86_64.rpm
#Install RabbitMQ
sudo rpm --import rabbitmq-release-signing-key
sudo yum -y install rabbitmq-server-3.6.15-1.el7.noarch.rpm
# install firewall
sudo yum -y install firewalld-0.6.3-8.el7_8.1.noarch.rpm
sudo systemctl start firewalld
sudo systemctl enable firewalld
#config firewall
sudo firewall-cmd --zone=public --permanent --add-port=4369/tcp --add-port=25672/tcp --add-port=1521/tcp --add-port=5500/tcp --add-port=8080/tcp --add-port=5671-5672/tcp --add-port=15672/tcp --add-port=61613-61614/tcp --add-port=1883/tcp --add-port=8883/tcp
sudo firewall-cmd --reload
# Start service
sudo systemctl start rabbitmq-server.service
sudo systemctl enable rabbitmq-server.service
sudo rabbitmq-plugins enable rabbitmq_management
sudo chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/
# add users
sudo rabbitmqctl add_user mqadmin mqadminpassword
sudo rabbitmqctl set_user_tags mqadmin administrator
sudo rabbitmqctl set_permissions -p / mqadmin ".*" ".*" ".*"
服务器上安装了RabbitMQ 但无法启动Rabbit 服务。我收到错误
* Could not contact node rabbit@ip-172-31-6-180.
Changes will take effect at broker restart.
* Options: --online - fail if broker cannot be contacted.
--offline - do not try to contact broker.
Error: unable to connect to node 'rabbit@ip-172-31-6-180': nodedown
DIAGNOSTICS
===========
attempted to contact: ['rabbit@ip-172-31-6-180']
rabbit@ip-172-31-6-180:
* connected to epmd (port 4369) on ip-172-31-6-180
* epmd reports: node 'rabbit' not running at all
no other nodes on ip-172-31-6-180
* suggestion: start the node
current node details:
- node name: 'rabbitmq-cli-72@ip-172-31-6-180'
- home dir: /var/lib/rabbitmq
- cookie hash: S2XLDmtwBa8t9RmQxEF3Xg==
Error: unable to connect to node 'rabbit@ip-172-31-6-180': nodedown
DIAGNOSTICS
===========
attempted to contact: ['rabbit@ip-172-31-6-180']
rabbit@ip-172-31-6-180:
* connected to epmd (port 4369) on ip-172-31-6-180
* epmd reports: node 'rabbit' not running at all
no other nodes on ip-172-31-6-180
* suggestion: start the node
current node details:
- node name: 'rabbitmq-cli-09@ip-172-31-6-180'
- home dir: /var/lib/rabbitmq
- cookie hash: S2XLDmtwBa8t9RmQxEF3Xg==
Error: unable to connect to node 'rabbit@ip-172-31-6-180': nodedown
DIAGNOSTICS
===========
attempted to contact: ['rabbit@ip-172-31-6-180']
rabbit@ip-172-31-6-180:
* connected to epmd (port 4369) on ip-172-31-6-180
* epmd reports: node 'rabbit' not running at all
no other nodes on ip-172-31-6-180
* suggestion: start the node
current node details:
- node name: 'rabbitmq-cli-74@ip-172-31-6-180'
- home dir: /var/lib/rabbitmq
- cookie hash: S2XLDmtwBa8t9RmQxEF3Xg==
以及 RabbitMQ 服务的状态
Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2020-11-04 02:07:45 UTC; 4s ago
Process: 18953 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 18953 (code=exited, status=1/FAILURE)
Nov 04 02:07:45 ip-172-31-6-180.ap-southeast-1.compute.internal systemd[1]: Failed to start RabbitMQ broker.
Nov 04 02:07:45 ip-172-31-6-180.ap-southeast-1.compute.internal systemd[1]: Unit rabbitmq-server.service entered failed state.
Nov 04 02:07:45 ip-172-31-6-180.ap-southeast-1.compute.internal systemd[1]: rabbitmq-server.service failed.
我该如何解决这个问题。谢谢
这似乎对我有用。
- 下载了 rpm。
- 安装rabbitmq-server-3.6.2-1.noarch.rpm
- rabbitmq-plugins 启用 rabbitmq_management
- rabbitmqctl add_user 管理员密码
- rabbitmq-plugins 启用 rabbitmq_federation
- rabbitmq-plugins 启用 rabbitmq_federation_management
- systemctl 重启rabbitmq-server
- chown -R root:rabbitmq /etc/rabbitmq
我已经解决问题了。它是由 erlang 和 rabbitmq-server 版本之间不兼容引起的。我签出并使用兼容版本。问题得到解决 谢谢