Ubuntu16.04安装Rabbitmq

1.为了使用存储库,添加一个用于将RabByMQ版本发布到APT密钥的密钥:

In order to use the repository, add a key used to sign RabbitMQ releases to apt-key

2.添加相应版本的源

echo "deb https://dl.bintray.com/rabbitmq/debian xenial main" | sudo tee /etc/apt/sources.list.d/bintray.rabbitmq.list

3.更新源列表

sudo apt-get update

4.安装支持库

sudo apt-get install erlang erlang-nox -y

5.安装rabbitmq-server,并启动服务

sudo apt-get install rabbitmq-server -y/etc/init.d/rabbitmq-server start #安装完成默认是开启

6.启动插件

rabbitmq既可以命令行操作,也可以用rabbitmq自带的web管理界面,只需要启动插件便可以使用
sudo rabbitmq-plugins enable rabbitmq_management #默认端口15672

访问地址:http://127.0.0.1:15672

7.Rabbitmq-server默认端口

    4369: epmd, a peer discovery service used by RabbitMQ nodes and CLI tools
    5672, 5671: used by AMQP 0-9-1 and 1.0 clients without and with TLS
    25672: used for inter-node and CLI tools communication (Erlang distribution server port) and is allocated from a dynamic range (limited to a single port by default, computed as AMQP port + 20000). Unless external connections on these ports are really necessary (e.g. the cluster uses federation or CLI tools are used on machines outside the subnet), these ports should not be publicly exposed. See networking guide for details.
    35672-35682: used by CLI tools (Erlang distribution client ports) for communication with nodes and is allocated from a dynamic range (computed as server distribution port + 10000 through server distribution port + 10010). See networking guide for details.
    15672: HTTP API clients, management UI and rabbitmqadmin (only if the management plugin is enabled)
    61613, 61614: STOMP clients without and with TLS (only if the STOMP plugin is enabled)
    1883, 8883: (MQTT clients without and with TLS, if the MQTT plugin is enabled
    15674: STOMP-over-WebSockets clients (only if the Web STOMP plugin is enabled)
    15675: MQTT-over-WebSockets clients (only if the Web MQTT plugin is enabled)

8.常用命令

sudo chkconfig rabbitmq-server on  #添加开机启动(chkconfig一般只有redhat系统有)RabbitMQ服务
sudo service rabbitmq-server start  # 启动服务
sudo service rabbitmq-server status  # 查看服务状态
sudo service rabbitmq-server stop   # 停止服务
sudo rabbitmqctl stop   # 停止服务
sudo rabbitmqctl status  # 查看服务状态
sudo rabbitmqctl list_users # 查看当前所有用户
sudo rabbitmqctl list_user_permissions guest # 查看默认guest用户的权限
sudo rabbitmqctl delete_user guest# 删掉默认用户(由于RabbitMQ默认的账号用户名和密码都是guest。为了安全起见, 可以删掉默认用户)
sudo rabbitmqctl add_user username password # 添加新用户
sudo rabbitmqctl set_user_tags username administrator# 设置用户tag
sudo rabbitmqctl set_permissions -p / username ".*" ".*" ".*" # 赋予用户默认vhost的全部操作权限
sudo rabbitmqctl list_user_permissions username # 查看用户的权限

本文章部分资料来源于这里,部分资料来源于官网

原文地址:https://www.cnblogs.com/Roobbin/p/9606041.html

时间: 2024-10-16 09:57:45

Ubuntu16.04安装Rabbitmq的相关文章

Ubuntu16.04安装RabbitMQ(快速安装)

RabbitMQ:是程序与程序之间的通讯中转站,通过消息读写,实现程序之间通讯,经典实用场景-生产消费者模式(异步分发消费者执行,保障消息正确) Ubuntu16.04安装rabbitmq:1.为了避免签名错误,需要把公钥加入可信列表 sudo wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc sudo apt-key add rabbitmq-singning-key-public.asc 控制台出现:OK,表示我们公钥导

ubuntu16.04 安装rabbitmq

1.apt-get install rabbitmq-server2.新增管理员用户 rabbitmqctl add_user admin admin rabbitmqctl set_user_tags admin administrator3.安装RabbitMQ监控管理插件进行RabbitMQ的管理,插件rabbitmq_management启动成功后就可以通过web页面进行RabbitMQ的监控和管理.rabbitmq-plugins enable rabbitmq_management4

ubuntu14.04安装rabbitmq

ubuntu14.04安装rabbitmq及配置 1.修改/etc/apt/sources.list文件 命令:vi /etc/apt/sources.list 在最后一行加上:deb http://www.rabbitmq.com/debian/ testing main 2.加rabbitmq的公钥为可信 命令:wget https://www.rabbitmq.com/rabbitmq-signing-key-public.asc sudo apt-key add rabbitmq-sig

Ubuntu16.04安装tensorflow+安装opencv+安装openslide+安装搜狗输入法

Ubuntu16.04在cuda以及cudnn安装好之后,安装tensorflow,tensorflow以及opencv可以到网上下载对应的安装包并且直接在安装包所在的路径下直接通过pip与conda进行安装,如下图所示: 前提是要下载好安装包.安装好tensorflow之后还需要进行在~/.bashrc文件中添加系统路径,如下图所示 Openslide是医学图像一个重要的库,这里给出三条命令进行安装 sudo apt-get install openslide-tools sudo apt-g

Ubuntu16.04安装opencv for python/c++

Ubuntu16.04安装opencv for python/c++ 网上关于opencv的安装已经有了不少资料,但是没有一篇资料能让我一次性安装成功,因此花费了大量时间去解决各种意外,希望这篇能给一些人带去便利,节省时间. 1.安装OpenCV所需的库 1 sudo apt-get install build-essential 2 sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavforma

Ubuntu16.04 安装JDK Tomcat

Ubuntu16.04安装jdk,下载linux中的64版本 需要下载jdk,tomcat安装包 tar.gz版本的 http://pan.baidu.com/s/1mi4WVhA 安装JDK: [email protected]:~$ sudo mkdir /java [sudo] hongdada 的密码: hongdada[email protected]:~$ cd /Downloads bash: cd: /Downloads: 没有那个文件或目录 [email protected]:

Linux入门(9)——Ubuntu16.04安装flash player

打开网页经常提示安装flash player,不安装flash player很多网页的视频都看不了. Ubuntu16.04安装flash player 打开终端,输入: sudo apt-get install flashplugin-installer

ubuntu16.04安装部署监控系统zabbix2.4

Ubuntu16.04安装部署监控系统Zabbix2.4 第一部分,php+mysql+nginx组件安装 1.系统更新 sudo apt-get update && sudo apt-get upgrade 2.安装php-fpm 检索系统当前自带的PHP版本:apt-cache search php-fpm 安装依赖包:sudo apt-get install make  bison g++ build-essential libncurses5-dev cmake 安装php-fpm

ubuntu16.04安装python3,numpy,pandas等量化计算库

ubunt安装python3 sudo add-apt-repository ppa:fkrull/deadsnakessudo apt-get updatesudo apt-get install python3.5安装完成后在终端输入"python"会进入默认的python2.7中,如果要修改成我们刚安装的python3.5的话需要做如下三步:sudo cp /usr/bin/python /usr/bin/python_bak,先备份sudo rm /usr/bin/python