centos6.x安装rabbitmq

        今天有心学习rabbitmq,想着再自己的测试机上安装rabbitmq来玩玩,参考官网折腾了半天,终于安装好了rabbitmq,特此记录下来,以供后续复习。

        首先安装erlang(我叫它二郎),之所以要安装这个玩意,是因为rabbitmq是用二郎写的,所以必须的有它的友情支持啊,不然rabbitmq没法玩。

我是用root用户安装的,直接在root目录下创建了个rabbitmq临时目录,读者根据自己的爱好来吧。接着执行如下命令:

  1. yum install epel-release
  2. yum update
  3. wget http://packages.erlang-solutions.com/erlang-solutions-1.0-1.noarch.rpm
  4. rpm -Uvh erlang-solutions-1.0-1.noarch.rpm
  5. yum install erlang

这里要特别说明一下,对于1,2两条命了其实官网并没有给出,但是我在安装过程中,发现安装不成功,错误提示如下,所以加了1,2两条命令。

[root@aboboo rabbitmq]# rpm -Uvh ./erlang-solutions-1.0-1.noarch.rpm 
error: Failed dependencies:
	epel-release is needed by erlang-solutions-1.0-1.noarch

接下来安装rabbitmq,注意哦,centos7盒centos6安装的rpm是不同的,centos7因为支持systemd所以安装包不一样。执行如下命令:

vim /etc/yum.repos.d/rabbitmq.rep

添加如下内容:

[bintray-rabbitmq-server]
name=bintray-rabbitmq-rpm
baseurl=https://dl.bintray.com/rabbitmq/rpm/rabbitmq-server/v3.7.x/el/6/
gpgcheck=0
repo_gpgcheck=0
enabled=1

接着执行如下命令:

  1. rpm --import https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
  2. wget https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.7.9/rabbitmq-server-3.7.9-1.el6.noarch.rpm
  3. yum install rabbitmq-server-3.7.9-1.el6.noarch.rpm

至此,rabbitmq安装完毕,执行如下命令确认下rabbitmq可以正常启动:

service rabbitmq-server start (启动rabbitmq服务)
rabbitmqctl status(查看rabbitmq状态)

如果没有提示错误信息,那么接下来就可以开始使用rabbitmq啦!

 

有兴趣的读者可以关注本人公众号,一起交流学习,我讲非常不定期的进行更新,是非常不定期哦!

 

 

 

发布了87 篇原创文章 · 获赞 41 · 访问量 18万+
展开阅读全文

linux部署RabbitMQ,启动报错。

07-18

Redirecting to /bin/systemctl start rabbitmq-server.service Job for rabbitmq-server.service failed because the control process exited with error code. See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details. [root@ecs-c05b 15260846833]# /sbin/service rabbitmq-server status Redirecting to /bin/systemctl status rabbitmq-server.service ● rabbitmq-server.service - RabbitMQ broker Loaded: loaded (/usr/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: disabled) Active: failed (Result: exit-code) since Tue 2018-07-17 17:39:19 CST; 30s ago Process: 45226 ExecStop=/usr/sbin/rabbitmqctl stop (code=exited, status=0/SUCCESS) Process: 36903 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE) Main PID: 36903 (code=exited, status=1/FAILURE) Jul 17 17:39:19 ecs-c05b.novalocal rabbitmqctl[45226]: /usr/lib/rabbitmq/bin/rabbitmq-env: line 34: /dev/null: Permission denied Jul 17 17:39:19 ecs-c05b.novalocal rabbitmqctl[45226]: Stopping and halting node 'rabbit@ecs-c05b' ... Jul 17 17:39:19 ecs-c05b.novalocal rabbitmqctl[45226]: Error: unable to connect to node 'rabbit@ecs-c05b': nodedown Jul 17 17:39:19 ecs-c05b.novalocal rabbitmqctl[45226]: DIAGNOSTICS Jul 17 17:39:19 ecs-c05b.novalocal rabbitmqctl[45226]: =========== Jul 17 17:39:19 ecs-c05b.novalocal rabbitmqctl[45226]: attempted to contact: ['rabbit@ecs-c05b'] Jul 17 17:39:19 ecs-c05b.novalocal rabbitmqctl[45226]: rabbit@ecs-c05b: Jul 17 17:39:19 ecs-c05b.novalocal systemd[1]: Failed to start RabbitMQ broker. Jul 17 17:39:19 ecs-c05b.novalocal systemd[1]: Unit rabbitmq-server.service entered failed state. Jul 17 17:39:19 ecs-c05b.novalocal systemd[1]: rabbitmq-server.service failed. 问答

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览