海龙-redhat6.x64位系列 yum极速安装最新版rabbitmq及erlang
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了海龙-redhat6.x64位系列 yum极速安装最新版rabbitmq及erlang相关的知识,希望对你有一定的参考价值。
redhat6.x64位系列 yum极速安装最新版rabbitmq及erlang
简易操作步骤:
【注意】:如果网速比较差,可以先源码安装好erlang环境后,设置好系统变量后再使用rpm直接安装rabbitmq即可。网络可以还是建议直接全部yum安装
安装RabbitMQ
# rpm -i --nodeps rabbitmq-server-3.6.6-1.e16.noarch.rpm
直接用#rpm -i rabbitmq-server-3.6.6-1.noarch.rpm,会提示缺少erlang的环境,前面源码安装了erlang,所以加上--nodeps则能安装成功。
安装成功后需要在rabbitmq安装好的脚本里面添加erlang环境,否则启动rabbitmq会报错:
vim /usr/lib/rabbitmq/bin/rabbitmqctl
source /etv/profile
:wq
vim /usr/lib/rabbitmq/bin/rabbitmq-server
source /etv/profile
:wq
/etc/init.d/rabbitmq-server start
cd /etc/yum.repo
vim erlang.repo
[erlang-solutions]
name=Centos $releasever - $basearch - Erlang Solutions
baseurl=https://packages.erlang-solutions.com/rpm/centos/6/$basearch
gpgcheck=1
gpgkey=https://packages.erlang-solutions.com/rpm/erlang_solutions.asc
enabled=1
:wq
wget http://mirrors.aliyun.com/repo/epel-6.repo
cd /tmp/
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el6.noarch.rpm
yum install gcc kernel-devel m4 ncurses-devel openssl-devel unixODBC-devel gcc-c++ xmlto unixODBC wxBase wxGTK SDL wxGTK-gl lksctp-tools socat erlang
rpm -ivh rabbitmq-server-3.6.6-1.el6.noarch.rpm
/etc/init.d/rabbitmq-server start
rabbitmq-plugins enable rabbitmq_management
rabbitmqctl add_user mon mon4498
rabbitmqctl set_user_tags mon administrator
cd /var/lib/rabbitmq/
vim .erlang.cookie
:wq!
chown rabbitmq .erlang.cookie
chgrp rabbitmq .erlang.cookie
more .erlang.cookie
ll .erlang.cookie
/etc/init.d/rabbitmq-server start
rabbitmqctl stop_app
rabbitmqctl join_cluster [email protected]
rabbitmqctl start_app
rabbitmqctl cluster_status
分别说明:
1.cd /etc/yum.repo
2.vim erlang.repo
[erlang-solutions]
name=Centos $releasever - $basearch - Erlang Solutions
baseurl=https://packages.erlang-solutions.com/rpm/centos/6/$basearch
gpgcheck=1
gpgkey=https://packages.erlang-solutions.com/rpm/erlang_solutions.asc
enabled=1
:wq
3.wget http://mirrors.aliyun.com/repo/epel-6.repo
4.yum install gcc kernel-devel m4 ncurses-devel openssl-devel unixODBC-devel gcc-c++ xmlto unixODBC wxBase wxGTK SDL wxGTK-gl lksctp-tools socat erlang
5.cd /data
6.wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.6/rabbitmq-server-3.6.6-1.el6.noarch.rpm
7.rpm -ivh rabbitmq-server-3.6.6-1.el6.noarch.rpm
安装完毕后,rabbitmq和erl的相关命令会自动关联到/usr/bin和/usr/sbin/路径下,系统可以直接引用。
启动rabbitmq:
# /etc/init.d/rabbitmq-server start
启动后默认是磁盘模式,不需要修改
日志路径:/var/log/rabbitmq/
查看状态:# rabbitmqctl status
启动web监控插件:
# rabbitmq-plugins enable rabbitmq_management
查看当前系统种存在的节点信息:
# rabbitmqctl list_queues
# rabbitmqctl add_user mon mon4498
# rabbitmqctl set_user_tags mon administrator
浏览器打开ip:15672即可浏览
以上是关于海龙-redhat6.x64位系列 yum极速安装最新版rabbitmq及erlang的主要内容,如果未能解决你的问题,请参考以下文章