rabbitmq安装
Posted lp19910807
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了rabbitmq安装相关的知识,希望对你有一定的参考价值。
http://www.erlang.org/downloads下载erlang otp_src_18.3.tar.gz
wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-generic-unix-3.6.1.tar.xz 下载rabbitmq
useradd rabbit
su - rabbit
tar -xvf otp_src_18.3.tar.gz
cd otp_src_18.3
./configure --prefix=/home/rabbit/erlang
make && make install
cd ../erlang
[[email protected] erlang]$ ./bin/erl
Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:40:40] [async-threads:10] [hipe] [kernel-poll:false]
Eshell V7.3 (abort with ^G)
1>
当出现以上信息时表示安装完成。然后输入’halt().’退出即可。
然后在配置Erlang环境变量,vi /etc/profile文件,增加下面的环境变量:
配置环境变量:
[[email protected] sbin]$ cat ~/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
#set erlang environment
export PATH=$PATH:/home/rabbit/erlang/bin
#set rabbit environment
export PATH=$PATH:/home/rabbit/rabbitmq_server-3.6.1/sbin
export PATH
解压rabbitmq
xz -d rabbitmq-server-generic-unix-3.6.1.tar.xz
tar -xvf rabbitmq-server-generic-unix-3.6.1.tar
cd rabbitmq_server-3.6.1/
cd sbin/
rabbitmq-server -detached初始化
rabbitmqctl status查看状态
rabbitmqctl start/stop
rabbitmq-plugins enable rabbitmq_management 创建web界面 端口15672
操作配置命令:
rabbitmqctl delete_vhost /
rabbitmqctl add_user rabbitysb Sip[z8gH2q
rabbitmqctl add_vhost vhost_ysb
rabbitmqctl list_vhosts
rabbitmqctl set_user_tags rabbitysb administrator
rabbitmqctl set_permissions -p vhost_ysb rabbitysb ".*" ".*" ".*"
rabbitmq常用命令
add_user <UserName> <Password>
delete_user <UserName>
change_password <UserName> <NewPassword>
list_users
add_vhost <VHostPath>
delete_vhost <VHostPath>
list_vhostsset_permissions [-p <VHostPath>] <UserName> <Regexp> <Regexp> <Regexp>
clear_permissions [-p <VHostPath>] <UserName>
list_permissions [-p <VHostPath>]
list_user_permissions <UserName>
list_queues [-p <VHostPath>] [<QueueInfoItem> ...]
list_exchanges [-p <VHostPath>] [<ExchangeInfoItem> ...]
list_bindings [-p <VHostPath>]
list_connections [<ConnectionInfoItem> ...]
以上是关于rabbitmq安装的主要内容,如果未能解决你的问题,请参考以下文章