CentOS6.8 安装 RebbitMQ

本文同步于个人Github博客:https://github.com/johnnian/Blog/issues/7,欢迎留言。

操作系统环境:CentOS 6.8

安装步骤:

1、安装 erlang 环境:

[root@a6a766e6204a ~]# wget https://github-production-release-asset-2e65be.s3.amazonaws.com/47679505/4a43ec4a-4c60-11e7-9784-b62ceba7e504?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20170629%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170629T092259Z&X-Amz-Expires=300&X-Amz-Signature=5787b5fab64e1aaaff4667a288132f6156facf5021ef43e2dab40c51f0745674&X-Amz-SignedHeaders=host&actor_id=2493670&response-content-disposition=attachment%3B%20filename%3Derlang-19.3.6-1.el6.x86_64.rpm&response-content-type=application%2Foctet-stream
[root@a6a766e6204a ~]# rpm -ivh erlang-19.3.6-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
[root@a6a766e6204a ~]# wget –no-cache http://www.convirture.com/repos/definitions/rhel/6.x/convirt.repo -O /etc/yum.repos.d/convirt.repo
[root@a6a766e6204a ~]# yum makecache
[root@a6a766e6204a ~]# yum install socat

4、安装RabbitMQ:

[root@a6a766e6204a ~]# wget https://bintray.com/rabbitmq/rabbitmq-server-rpm/download_file?file_path=rabbitmq-server-3.6.10-1.el6.noarch.rpm
[root@a6a766e6204a ~]# rpm -ivh rabbitmq-server-3.6.10-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

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

rabbitmq-plugins enable rabbitmq_management

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


问题1:直接安装的时候报错,需要一些依赖

[root@a6a766e6204a ~]# rpm -ivh rabbitmq-server-3.6.10-1.el6.noarch.rpm
warning: rabbitmq-server-3.6.10-1.el6.noarch.rpm: Header V4 RSA/SHA512 Signature, key ID 6026dfca: NOKEY
error: Failed dependencies:
    initscripts is needed by rabbitmq-server-3.6.10-1.el6.noarch
    logrotate is needed by rabbitmq-server-3.6.10-1.el6.noarch
    socat is needed by rabbitmq-server-3.6.10-1.el6.noarch

需要导入 签名文件 & RabbitMQ的依赖包,然后重新安装一下就可以了~

你可能感兴趣的:(CentOS6.8 安装 RebbitMQ)