rabbitmq安装完整版
2016-09-22 00:00
218 查看
摘要: 最近在学习rabbitmq,网上搜的安装教程,总是不完整,我自己参考了别人的教程,加上自己的实践,记录下安装步骤,供以后使用
[root@lugu-wugu-wxfile mq]# yum -y install openssl
[root@lugu-wugu-wxfile mq]# yum -y install ssl
[root@lugu-wugu-wxfile mq]# yum -y install xmlto
[root@lugu-wugu-wxfile mq]# yum -y install python-simplejson
[root@lugu-wugu-wxfile mq]# yum -y install python
进入 http://www.erlang.org/download.html 选择源文件下载
[root@lugu-wugu-wxfile mq]# wget http://www.erlang.org/download/otp_src_17.5.tar.gz
[root@lugu-wugu-wxfile mq]# tar zxvf otp_src_17.5.tar.gz
[root@lugu-wugu-wxfile mq]# cd otp_src_17.5
[root@lugu-wugu-wxfile mq]# ./configure
[root@lugu-wugu-wxfile mq]# make && make install
安装完成以后,执行erl看是否能打开eshell,用’halt().’退出,注意后面的点号,那是erlang的结束符。
[root@lugu-wugu-wxfile mq]# erl
Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.4 (abort with ^G)
1> 9+1.
10
2> halt().
[root@lugu-wugu-wxfile mq]# wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.0/rabbitmq-server-3.6.0.tar.xz
[root@lugu-wugu-wxfile mq]# xz -d rabbitmq-server-3.6.0.tar.xz
[root@lugu-wugu-wxfile mq]# tar xvf rabbitmq-server-3.6.0.tar
[root@lugu-wugu-wxfile mq]# cd rabbitmq-server-3.6.0
[root@lugu-wugu-wxfile mq]# make
[root@lugu-wugu-wxfile mq]# make install TARGET_DIR=/opt/rabbitmq SBIN_DIR=/opt/rabbitmq/sbin MAN_DIR=/opt/rabbitmq/man DOC_INSTALL_DIR=/opt/rabbitmq/doc
注意1:可能出现xz:Command not found
xz命令提示linux下提示bash:command not found解决方法
http://blog.sina.com.cn/s/blog_ba08e8e00101b1rs.html
注意2:make install时可能会报错:zip command not found.解决方法如下:
[root@lugu-wugu-wxfile mq]# yum install -y unzip zip;
[root@lugu-wugu-wxfile rabbitmq-server-3.6.0]# cd scripts/
[root@lugu-wugu-wxfile scripts]# ./rabbitmq-server -detached
Warning: PID file not written; -detached was passed.
查看状态
[root@lugu-wugu-wxfile scripts]# ./rabbitmqctl status
停止服务
[root@lugu-wugu-wxfile scripts]# ./rabbitmqctl stop
Stopping and halting node 'rabbit@lugu-wugu-wxfile' …
安装RabbitMQWeb管理插件
[root@lugu-wugu-wxfile scripts]# ./rabbitmq-plugins enable rabbitmq_management
Error: {cannot_write_enabled_plugins_file,"/etc/rabbitmq/enabled_plugins",
enoent}
此时需要手动创建/etc/rabbitmq目录
[root@lugu-wugu-wxfile scripts]# mkdir /etc/rabbitmq
再次安装即可
[root@lugu-wugu-wxfile scripts]# ./rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management
Applying plugin configuration to rabbit@lugu-wugu-wxfile... failed.
* Could not contact node rabbit@lugu-wugu-wxfile.
Changes will take effect at broker restart.
* Options: --online - fail if broker cannot be contacted.
--offline - do not try to contact broker.
添加账号
PS:默认账号guest只能在localhost访问
[root@lugu-wugu-wxfile scripts]# ./rabbitmqctl add_user admin admin
Creating user "admin" …
设置管理员
[root@lugu-wugu-wxfile scripts]# ./rabbitmqctl set_user_tags admin administrator
Setting tags for user "admin" to [administrator] …
设置读写权限
命令使用户admin具有/vhost1这个virtual host中所有资源的配置、写、读权限以便管理其中的资源
首先需要创建/vhost1
[root@lugu-wugu-wxfile scripts]# ./rabbitmqctl add_vhost /vhost1
Creating vhost "/vhost1” .
[root@lugu-wugu-wxfile scripts]# ./rabbitmqctl set_permissions -p /vhost1 admin '.*' '.*' '.*'
Setting permissions for user "admin" in vhost "/vhost1" …
然后就可以登录web页面了
http://192.168.1.20:15672
1.安装依赖文件
[root@lugu-wugu-wxfile mq]# yum install ncurses-devel[root@lugu-wugu-wxfile mq]# yum -y install openssl
[root@lugu-wugu-wxfile mq]# yum -y install ssl
[root@lugu-wugu-wxfile mq]# yum -y install xmlto
[root@lugu-wugu-wxfile mq]# yum -y install python-simplejson
[root@lugu-wugu-wxfile mq]# yum -y install python
进入 http://www.erlang.org/download.html 选择源文件下载
[root@lugu-wugu-wxfile mq]# wget http://www.erlang.org/download/otp_src_17.5.tar.gz
[root@lugu-wugu-wxfile mq]# tar zxvf otp_src_17.5.tar.gz
[root@lugu-wugu-wxfile mq]# cd otp_src_17.5
[root@lugu-wugu-wxfile mq]# ./configure
[root@lugu-wugu-wxfile mq]# make && make install
安装完成以后,执行erl看是否能打开eshell,用’halt().’退出,注意后面的点号,那是erlang的结束符。
[root@lugu-wugu-wxfile mq]# erl
Erlang/OTP 17 [erts-6.4] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V6.4 (abort with ^G)
1> 9+1.
10
2> halt().
2.安装RabbitMQ
下载rabbitmq安装包[root@lugu-wugu-wxfile mq]# wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.0/rabbitmq-server-3.6.0.tar.xz
[root@lugu-wugu-wxfile mq]# xz -d rabbitmq-server-3.6.0.tar.xz
[root@lugu-wugu-wxfile mq]# tar xvf rabbitmq-server-3.6.0.tar
[root@lugu-wugu-wxfile mq]# cd rabbitmq-server-3.6.0
[root@lugu-wugu-wxfile mq]# make
[root@lugu-wugu-wxfile mq]# make install TARGET_DIR=/opt/rabbitmq SBIN_DIR=/opt/rabbitmq/sbin MAN_DIR=/opt/rabbitmq/man DOC_INSTALL_DIR=/opt/rabbitmq/doc
注意1:可能出现xz:Command not found
xz命令提示linux下提示bash:command not found解决方法
http://blog.sina.com.cn/s/blog_ba08e8e00101b1rs.html
注意2:make install时可能会报错:zip command not found.解决方法如下:
[root@lugu-wugu-wxfile mq]# yum install -y unzip zip;
3.使用RabbitMQ
启动MQ[root@lugu-wugu-wxfile rabbitmq-server-3.6.0]# cd scripts/
[root@lugu-wugu-wxfile scripts]# ./rabbitmq-server -detached
Warning: PID file not written; -detached was passed.
查看状态
[root@lugu-wugu-wxfile scripts]# ./rabbitmqctl status
停止服务
[root@lugu-wugu-wxfile scripts]# ./rabbitmqctl stop
Stopping and halting node 'rabbit@lugu-wugu-wxfile' …
安装RabbitMQWeb管理插件
[root@lugu-wugu-wxfile scripts]# ./rabbitmq-plugins enable rabbitmq_management
Error: {cannot_write_enabled_plugins_file,"/etc/rabbitmq/enabled_plugins",
enoent}
此时需要手动创建/etc/rabbitmq目录
[root@lugu-wugu-wxfile scripts]# mkdir /etc/rabbitmq
再次安装即可
[root@lugu-wugu-wxfile scripts]# ./rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
mochiweb
webmachine
rabbitmq_web_dispatch
amqp_client
rabbitmq_management_agent
rabbitmq_management
Applying plugin configuration to rabbit@lugu-wugu-wxfile... failed.
* Could not contact node rabbit@lugu-wugu-wxfile.
Changes will take effect at broker restart.
* Options: --online - fail if broker cannot be contacted.
--offline - do not try to contact broker.
添加账号
PS:默认账号guest只能在localhost访问
[root@lugu-wugu-wxfile scripts]# ./rabbitmqctl add_user admin admin
Creating user "admin" …
设置管理员
[root@lugu-wugu-wxfile scripts]# ./rabbitmqctl set_user_tags admin administrator
Setting tags for user "admin" to [administrator] …
设置读写权限
命令使用户admin具有/vhost1这个virtual host中所有资源的配置、写、读权限以便管理其中的资源
首先需要创建/vhost1
[root@lugu-wugu-wxfile scripts]# ./rabbitmqctl add_vhost /vhost1
Creating vhost "/vhost1” .
[root@lugu-wugu-wxfile scripts]# ./rabbitmqctl set_permissions -p /vhost1 admin '.*' '.*' '.*'
Setting permissions for user "admin" in vhost "/vhost1" …
然后就可以登录web页面了
http://192.168.1.20:15672
相关文章推荐
- Debian下的Subverson安装完整版
- 群集安装完整版
- 一个完整的Installshield安装程序实例—艾泽拉斯之海洋女神出品(五) --补遗 (已补充第三部分完整版)
- 【转】安装Android的SDK--中文教程(完整版,包括Eclipse安装)
- Centos5.5下安装LAMP完整版
- RabbitMQ安装和测试小记
- 原创-在Debian 5.0下的使用源代码安装LAMP笔记[完整版]
- RabbitMQ 安装配置和简单实例
- 完整版WPF Browser Application证书制作、发布与自动下载安装
- 在Redhat9上安装Oracle 9(修改后的完整版)
- ITAA-JUNOS虚拟机完整版V2.0(无需安装)下载 推荐
- JUDDI安装完整版 (转帖W3CHINA)
- AIR Express Install Badge下载及安装(完整版)
- 中文VS2008中安装ASP.NET MVC框架出现问题的解决方法之完整版
- Openads,phpadsnew广告统计系统,中文安装和使用说明,教程完整版
- IBM T61 8889-A91 XP完整版安装说明
- ITAA-JUNOS虚拟机8.5完整版免费下载(无需安装)
- 原创-在Debian 5.0下的使用源代码安装LAMP笔记[完整版,带HTTPS]
- Centos5.5下安装LAMP完整版
- Centos5.5下安装LAMP完整版