Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS6.8 安装 RebbitMQ #7

Open
johnnian opened this issue Jun 29, 2017 · 0 comments
Open

CentOS6.8 安装 RebbitMQ #7

johnnian opened this issue Jun 29, 2017 · 0 comments
Labels

Comments

@johnnian
Copy link
Owner

johnnian commented Jun 29, 2017

操作系统环境:CentOS 6.8
RabbitMQ版本:3.7.2

安装步骤:

1、安装 erlang 环境:

[root@a6a766e6204a ~]# wget https://github.com/rabbitmq/erlang-rpm/releases/download/v19.3.6.5/erlang-19.3.6.5-1.el6.x86_64.rpm
[root@a6a766e6204a ~]# rpm -ivh erlang-19.3.6.5-1.el6.x86_64.rpm

备注:如果下载失败,可以:

2、导入Rabbit签名文件:

[root@a6a766e6204a ~]# rpm --import https://www.rabbitmq.com/rabbitmq-release-signing-key.asc

3、安装依赖:

[root@a6a766e6204a ~]# yum -y install initscripts
[root@a6a766e6204a ~]# yum -y install logrotate
#安装socat
[root@a6a766e6204a ~]#  wget http://mirror.centos.org/centos/6/os/x86_64/Packages/compat-readline5-5.2-17.1.el6.x86_64.rpm
[root@a6a766e6204a ~]# wget http://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/s/socat-1.7.2.3-1.el6.x86_64.rpm
[root@ a6a766e6204a ~]# rpm -ivh compat-readline5-5.2-17.1.el6.x86_64.rpm
[root@ a6a766e6204a ~]# rpm -ivh socat-1.7.2.3-1.el6.x86_64.rpm

相关网址:

4、安装RabbitMQ:

[root@a6a766e6204a ~]# wget https://dl.bintray.com/rabbitmq/all/rabbitmq-server/3.7.2/rabbitmq-server-3.7.2-1.el6.noarch.rpm
[root@a6a766e6204a ~]# rpm -ivh rabbitmq-server-3.7.2-1.el6.noarch.rpm

5、运行RabbitMQ的命令:

#启动
service rabbitmq-server start
#停止
service rabbitmq-server stop 		
#重启
service rabbitmq-server restart

6、配置RabbitMQ的账户权限

A、配置管理员账号:

#创建管理员账号
rabbitmqctl add_user admin adminpasspord
rabbitmqctl set_user_tags admin administrator

#管理员账号分配权限
 rabbitmqctl list_users  #列出用户权限
 rabbitmqctl  set_permissions -p / admin '.*' '.*' '.*'  #使用户具有‘/’这个virtual host中所有资源的配置、写、读权限以便管理其中的资源

B、启动rabbitmq内置web插件, 管理rabbitmq账号等信息

rabbitmq-plugins enable rabbitmq_management

控制台的访问地址: http://IP地址:15672/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant