Install RabbitMQ server in CentOS 7
About RabbitMQ
RabbitMQ is an open source message broker software, also sometimes known as message-oriented middleware, that implements the Advanced Message Queuing Protocol (AMQP). It is very easy to use, and runs almost on all modern operating systems. It is built on the Open Telecom Platform framework for clustering and failover. RabbitMQ is written in the Erlang programming language, and is actively being developed by Rabbit Technologies Ltd.
In this tutorial, we will see how to install RabbitMQ server in CentOS 7 minimal server.
Prerequisites
RabbitMQ is written using Erlang programming language. So, it is must to install Erlang before installing RabbitMQ.
To install and configure Erlang in CentOS 7 server, refer the following link.
http://www.cnblogs.com/weifeng1463/p/8931543.html
Install RabbitMQ
Once you install Erlang, head over to the RabbitMQ download page for RPM based installers, and download the latest version using command:
wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-3.6.1-1.noarch.rpm
Then, run the following command as root user to add rabbitmq signing key:
rpm --import https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
Finally, install RabbitMQ server using command:
yum install rabbitmq-server-3.6.1-1.noarch.rpm
Sample output:
Loaded plugins: fastestmirror
Examining rabbitmq-server-3.6.1-1.noarch.rpm: rabbitmq-server-3.6.1-1.noarch
Marking rabbitmq-server-3.6.1-1.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package rabbitmq-server.noarch 0:3.6.1-1 will be installed
--> Finished Dependency Resolution Dependencies Resolved ================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
rabbitmq-server noarch 3.6.1-1 /rabbitmq-server-3.6.1-1.noarch 5.5 M Transaction Summary
================================================================================
Install 1 Package Total size: 5.5 M
Installed size: 5.5 M
Is this ok [y/d/N]: y
That’s it. We have installed RabbitMQ.
SELinux and Firewall configuration
We must allow the following ports via SELinux, and Firewall in order to access RabbitMQ remote management console from the remote systems.
Make sure the following ports can be opened:
- 4369 (epmd), 25672 (Erlang distribution)
- 5672, 5671 (AMQP 0-9-1 without and with TLS)
- 15672 (if management plugin is enabled)
- 61613, 61614 (if STOMP is enabled)
- 1883, 8883 (if MQTT is enabled)
To allow the above ports in firewall, run the following commands one by one:
firewall-cmd --permanent --add-port=4369/tcp
firewall-cmd --permanent --add-port=25672/tcp
firewall-cmd --permanent --add-port=5671-5672/tcp
firewall-cmd --permanent --add-port=15672/tcp
firewall-cmd --permanent --add-port=61613-61614/tcp
firewall-cmd --permanent --add-port=8883/tcp
Restart firewall service:
firewall-cmd --reload
And then, run the following command to allow SELinux to enable RabbitMQ service:
setsebool -P nis_enabled 1
Run the following command to start and enable RabbitMQ service:
systemctl start rabbitmq-server
systemctl enable rabbitmq-server
Now, check the status of RabbitMQ server using the following commands:
rabbitmqctl status
Sample output:
Status of node rabbit@server1 ...
[{pid,26591},
{running_applications,
[{rabbitmq_management,"RabbitMQ Management Console","3.6.1"},
{rabbitmq_web_dispatch,"RabbitMQ Web Dispatcher","3.6.1"},
{webmachine,"webmachine","1.10.3"},
{mochiweb,"MochiMedia Web Server","2.13.0"},
{ssl,"Erlang/OTP SSL application","7.3"},
{rabbitmq_management_agent,"RabbitMQ Management Agent","3.6.1"},
{rabbit,"RabbitMQ","3.6.1"},
{mnesia,"MNESIA CXC 138 12","4.13.3"},
{amqp_client,"RabbitMQ AMQP Client","3.6.1"},
{compiler,"ERTS CXC 138 10","6.0.3"},
{os_mon,"CPO CXC 138 46","2.4"},
{syntax_tools,"Syntax tools","1.7"},
{inets,"INETS CXC 138 49","6.2"},
{rabbit_common,[],"3.6.1"},
{public_key,"Public key infrastructure","1.1.1"},
{asn1,"The Erlang ASN1 compiler version 4.0.2","4.0.2"},
{ranch,"Socket acceptor pool for TCP protocols.","1.2.1"},
{crypto,"CRYPTO","3.6.3"},
{xmerl,"XML parser","1.3.10"},
{sasl,"SASL CXC 138 11","2.7"},
{stdlib,"ERTS CXC 138 10","2.8"},
{kernel,"ERTS CXC 138 10","4.2"}]},
{os,{unix,linux}},
{erlang_version,
"Erlang/OTP 18 [erts-7.3] [source-d2a6d81] [64-bit] [async-threads:64] [hipe] [kernel-poll:true]\n"},
{memory,
[{total,54224944},
{connection_readers,0},
{connection_writers,0},
{connection_channels,0},
{connection_other,2680},
{queue_procs,2680},
{queue_slave_procs,0},
{plugins,424296},
{other_proc,19559456},
{mnesia,58312},
{mgmt_db,111720},
{msg_index,32856},
{other_ets,1358408},
{binary,36944},
{code,27354680},
{atom,992409},
{other_system,4290503}]},
{alarms,[]},
{listeners,[{clustering,25672,"::"},{amqp,5672,"::"}]},
{vm_memory_high_watermark,0.4},
{vm_memory_limit,258528051},
{disk_free_limit,50000000},
{disk_free,12428034048},
{file_descriptors,
[{total_limit,924},{total_used,2},{sockets_limit,829},{sockets_used,0}]},
{processes,[{limit,1048576},{used,197}]},
{run_queue,0},
{uptime,55},
{kernel,{net_ticktime,60}}]
Access RabbitMQ management console
RabbitMQ management console will allow you to monitor the server processes via a web browser.
To enable the RabbitMQ management console, run the following command:
rabbitmq-plugins enable rabbitmq_management
chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/
Now. open your web browser and navigate to the following URL to access your RabbitMQ server management console.
- http://ip-address:15672/
The default user name and password of RabbitMQ Management console is ‘guest’ and ‘guest’ .
However, you can create a new admin user if you want.
To do so, run:
rabbitmqctl add_user mqadmin mqadmin
rabbitmqctl set_user_tags mqadmin administrator
rabbitmqctl set_permissions -p / mqadmin ".*" ".*" ".*"
Enter the username and password to access RabbitMQ web console:
Congratulations! Here is how my RabbitMQ web dashboard looks like.
That’s all for now. Start using your RabbitMQ server.
For further details, check the links given at the end of this guide.
Cheers!
Reference links:
参考文章:https://www.unixmen.com/install-rabbitmq-server-centos-7/
Install RabbitMQ server in CentOS 7的更多相关文章
- How to install redis server on CentOS 7 / RHEL 7
在本教程中,我们将学习如何在CentOS 7 / RHEL 7上安装Redis服务器. redis的缩写是REmote DIctionary Server. 它是最流行的开源,高级键值缓存和存储之一. ...
- Official online document, install svn server in centOS
http://www.krizna.com/centos/install-svn-server-on-centos-6/
- 在本地安装RabbitMQ Server教程以及可能遇到的问题及解决办法
1. Download latest erlang OTP platform from : erlang:http://www.erlang.org/download.html (The latest ...
- Install RabbitMQ on CentOS 7
NOTE: this article is only for CentOS 7 How to Install RabbitMQ on CentOS 7 yum update Install erlan ...
- Install TightVNC Server in RHEL/CentOS and Fedora to Access Remote Desktops
Virtual Networking Computing (VNC) is a Kind of remote sharing system that makes it possible to take ...
- Install LAMP Server (Apache, MariaDB, PHP) On CentOS/RHEL/Scientific Linux 7
Install LAMP Server (Apache, MariaDB, PHP) On CentOS/RHEL/Scientific Linux 7 By SK - August 12, 201 ...
- CentOS上安装配置RabbitMQ Server
1. 安装Erlang 由于rabbitmq是基于erlang语言开发的,所以必须先安装erlang. curl -s https://packagecloud.io/install/reposito ...
- rabbitmq server的安装以及常用的命令
Centos 源代码编译 安装 ErlangErlang依赖哪些库? A fully working GCC compiler environment Ncurses developm ...
- 搭建 RabbitMQ Server 高可用集群
阅读目录: 准备工作 搭建 RabbitMQ Server 单机版 RabbitMQ Server 高可用集群相关概念 搭建 RabbitMQ Server 高可用集群 搭建 HAProxy 负载均衡 ...
随机推荐
- VC无闪烁刷屏技术的实现【转】
转自:http://blog.csdn.net/scorpio_tiger/article/details/2888719 http://www.pconline.com.cn/pcedu/empol ...
- 非常好!!!Linux源代码阅读——内核引导【转】
Linux源代码阅读——内核引导 转自:http://home.ustc.edu.cn/~boj/courses/linux_kernel/1_boot.html 目录 Linux 引导过程综述 BI ...
- 华为上机测试题(表达式运算-java)
PS:自己写的,自测试OK,供大家参考. 补充:数据解析的过程,评论区有更好的处理方式,可参考. /* * 输入一个表达式,3*8+7-2,没有括号 输出结果 */ /* 本程序暂不考虑容错处理 */ ...
- (2) python--pandas
import pandas as pd import numpy as np # 创建的Series几种方式 s1 = pd.Series(range(4)) s2 = pd.Series([0, 1 ...
- CSS控制图片显示区域
优化页面响应速度,减少页面向服务端请求图片次数,有时候可能会将多个小图合并到一张图中,用的时候通过css控制显示的区域,比如:上传一张人物图片到服务器检测人脸,最后在页面上列出所有识别出来的人脸,实现 ...
- python每日一类(5):itertools模块
itertools模块包含创建有效迭代器的函数,可以用各种方式对数据进行循环操作,此模块中的所有函数返回的迭代器都可以与for循环语句以及其他包含迭代器(如生成器和生成器表达式)的函数联合使用. ch ...
- eclipse CreateProcess error=87
http://blog.csdn.net/mylove709834360/article/details/9253697 完美解决~
- android 调用系统相机崩溃的解决方案
解决方案: 1.(推荐)7.0之后你的app就算有权限,给出一个URI之后手机也认为你没有权限. 不用修改原有代码,在Application的oncreate方法中: if (Build.VERSIO ...
- iOS手势UIGestureRecognizer的使用失效问题
问题:视图正常展示在界面中,父层是放在window上的,底部的一个控件的点击事件失效(所有设置都正常) 解决思路:虽然视图能够正常展示,但是发现父类视图的底部尺寸比子类的视图的尺寸小,也就是说上层视图 ...
- Codeforces 1010D Mars rover
题目大意:对于一个不完全二分图,根节点为1,叶节点值为0或1,非叶节点包含一个操作(and,or,xor,not),求改变各个叶节点的值时(即0改为1,1改为0),根节点的值是多少 解法:遍历图求各节 ...