操作步骤没有错,在不同的系统下安装可能会有不同的错,需要具体问题具体对待了。
1.erlang安装
在openSUSE下,安装erlang。
下载地址:http://www.erlang.org/download.html
linux-bnnq:/opt # wget http://www.erlang.org/download/otp_src_R15B.tar.gz
cd otp_src_R15B
linux-bnnq: # ./configure
linux-bnnq: #make
linux-bnnq: #make install
或者使用opensuse12.3软件包安装最新版本:
linux-bnnq:~ # zypper install erlang
Loading repository data...
Reading installed packages...
Resolving package dependencies...
The following NEW packages are going to be installed:
erlang unixODBC
2 new packages to install.
Overall download size: 30.5 MiB. After the operation, additional 59.8 MiB will be used.
Continue? [y/n/?] (y): y
Retrieving package unixODBC-2.2.12-219.1.1.x86_64 (1/2), 409.2 KiB ( 1.6 MiB unpacked)
Retrieving: unixODBC-2.2.12-219.1.1.x86_64.rpm ..........................................................................................[done]
Retrieving package erlang-R15B03-5.1.5.x86_64 (2/2), 30.1 MiB ( 58.2 MiB unpacked)
Retrieving: erlang-R15B03-5.1.5.x86_64.rpm ..................................................................................[done (3.5 MiB/s)]
(1/2) Installing: unixODBC-2.2.12-219.1.1 ...............................................................................................[done]
(2/2) Installing: erlang-R15B03-5.1.5 ...................................................................................................[done]
Additional rpm output:
Updating /etc/sysconfig/erlang...
2. rabbitmq安装配置
采用源码安装,下载rabbitmq-server-2.7.1.tar.gz,也可以下载rpm包安装。
linux-bnnq:~ # wget http://www.rabbitmq.com/releases/rabbitmq-server/v2.7.1/rabbitmq-server-2.7.1.tar.gz
linux-bnnq:~ # tar -zxvf rabbitmq-server-2.7.1.tar.gz -C /opt #解压到指定的文件夹下
linux-bnnq:/opt/rabbitmq-server-2.7.1 # vi Makefile #编辑Makefile,添加如下内容
TARGET_DIR=/usr/local/rabbitmq
SBIN_DIR=/usr/local/sbin
MAN_DIR=/usr/local/man
linux-bnnq: # ./configure
linux-bnnq:~ #make #编译
linux-bnnq:~ #make install #安装
环境变量配置
[root@test-1 sbin]# vi /etc/profile
export PATH=/usr/local/ruby/bin:/opt/rabbitmq_server-2.8.2/sbin:$PATH
安装报错:
/bin/sh: xmlto: command not found
/bin/sh: line 2: xmlto: command not found
基本都是很多依赖包没有安装,安装了nmap,simplejson-3.5.2,xmlto,docbook-style-xsl,ncurses等等。
再有就是erlang 和rabbitmq的版本之间的匹配问题。
启动成功后访问管理界面,端口没有指定的话可能变化:
http://172.10.23.249:55672/
使用guest:guest登录。
suse查看所有可用源:
linux-bnnq:/opt # zypper lr
openSUSE安装
linux-bnnq:/opt # zypper install
常用命令:
开启插件:
linux-bnnq:~ # rabbitmq-plugins enable rabbitmq_management
重启rabbitmq-server服务
linux-bnnq:~ # /etc/init.d/rabbitmq-server restart
服务器启动与关闭
启动:
linux-bnnq:~ # rabbitmq-server –detached
linux-bnnq:~ # /etc/init.d/rabbitmq-server start
关闭:
linux-bnnq:~ # rabbitmqctl stop
linux-bnnq:~ # rabbitmq-service stop
通过查看端口是否被监听
[root@test-1 ~]# netstat -nlp | grep beam
tcp 0 0 0.0.0.0:55672 0.0.0.0:* LISTEN 31054/beam.smp
tcp 0 0 0.0.0.0:55354 0.0.0.0:* LISTEN 31054/beam.smp
tcp 0 0 :::5672 :::* LISTEN 31054/beam.smp
创建web管理用户
linux-bnnq:~ # rabbitmqctl add_user web_admin 123.com #添加web监听账户
设置web管理用户的角色
linux-bnnq:~ # rabbitmqctl set_user_tags web_admin monitoring #设置用户角色
查看设置的用户是否正确
linux-bnnq:~ # rabbitmqctl list_users #查看监听用户
参考网页:
http://www.rabbitmq.com/blog/2011/12/20/rabbitmq-2-7-0-and-2-7-1-are-released/
https://www.nuget.org/packages/RabbitMQ.ServiceModel/2.7.1
http://www.rabbitmq.com/install-rpm.html
http://blog.csdn.net/mlks_2008/article/details/18988301
http://blog.csdn.net/linvo/article/details/5750987