os:centos6.5
rabbitmq:3.6.10
erlang/otp:19.3java
##pre #yum install ncurses-devel #yum install openssl-devel #yum install java-devel #yum install unixODBC-devel #yum install gcc-c++ ##安裝erlang運行環境 #wget http://www.erlang.org/download/otp_src_19.3.tar.gz #tar -zxf otp_src_19.3.tar.gz #cd otp_src_19.3 #export ERL_TOP=`pwd` #./configure #make #make install
crypto : No usable OpenSSL found
jinterface : No Java compiler found
odbc : ODBC library - link check failed
orber : No C++ compiler found
ssh : No usable OpenSSL found
ssl : No usable OpenSSL found
解決方案見安裝erlang章節c++
wx : wxWidgets not found, wx will NOT be usable|
解決方案以下git
##precondition #yum install gtk2-devel #yum install mesa* #wget --no-check-certificate https://github.com/wxWidgets/wxWidgets/releases/download/v3.0.3/wxWidgets-3.0.3.tar.bz2 #bzip2 -d wxWidgets-3.0.3.tar.bz2 #tar -xf wxWidgets-3.0.3.tar #cd wxWidgets-3.0.3 #./configure --with-opengl --enable-debug --enable-unicode #make & make install
fop is missing.
Using fakefop to generate placeholder PDF files.github
##安裝rabbitmq #wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.10/rabbitmq-server-generic-unix-3.6.10.tar.xz #xz -d rabbitmq-server-generic-unix-3.6.10.tar.xz #tar -xf rabbitmq-server-generic-unix-3.6.10.tar #mv rabbitmq_server-3.6.10 rabbitmq3610 #cd rabbitmq3610
##啓動 #/sbin/rabbit-server start ##中止 #/sbin/rabbit-server stop ##重啓動 #/sbin/rabbit-server restart
# ./sbin/rabbitmq-plugins enable rabbitmq_management The following plugins have been enabled: mochiweb webmachine rabbitmq_web_dispatch amqp_client rabbitmq_management_agent rabbitmq_management Plugin configuration has changed. Restart RabbitMQ for changes to take effect.
##默認帳號/密碼 guest/guest 不支持遠程IP訪問,只支持localhost訪問 ##建立帳號test;密碼123456 #./rabbitmqctl add_user test 123456 ##設置管理員權限 #./rabbitmqctl set_user_tags test administrator ##支持遠程IP訪問 #./rabbitmqctl set_permissions -p "/" test ".*" ".*" ".*"
打開 http://192.168.5.101:15672,輸入test/123456,界面以下web
Rabbitmq服務器的主要經過rabbitmqctl和rabbimq-plugins兩個工具來管理,如下是一些經常使用功能正則表達式
注意:重啓服務器後生效。centos
撤銷virtual_host:rabbitmqctl delete_vhost xxxbash
用戶管理服務器
新建用戶:rabbitmqctl add_user xxxpwdssh
刪除用戶: rabbitmqctl delete_user xxx
改密碼: rabbimqctlchange_password {username} {newpassword}
設置用戶角色:rabbitmqctlset_user_tags {username} {tag ...}
Tag能夠爲 administrator,monitoring, management
權限管理
Read
Write
Conf
Vhostpath
Vhost路徑
user
權限設置:set_permissions [-pvhostpath] {user} {conf} {write} {read}
用戶名
一個正則表達式match哪些配置資源可以被該用戶訪問。
一個正則表達式match哪些配置資源可以被該用戶讀。
一個正則表達式match哪些配置資源可以被該用戶訪問。
獲取服務器狀態信息
Channelinfoitem有consumer_count,messages_unacknowledged,messages_uncommitted,acks_uncommitted,messages_unconfirmed,prefetch_count,client_flow_blocked
Connectioninfoitem有:recv_oct,recv_cnt,send_oct,send_cnt,send_pend等。
Bindinginfoitem有:source_name,source_kind,destination_name,destination_kind,routing_key,arguments
Exchangeinfoitem有:name,type,durable,auto_delete,internal,arguments.
Queueinfoitem能夠爲:name,durable,auto_delete,arguments,messages_ready,messages_unacknowledged,messages,consumers,memory
服務器狀態:rabbitmqctl status
隊列信息:rabbitmqctl list_queues[-p vhostpath] [queueinfoitem ...]
Exchange信息:rabbitmqctllist_exchanges[-p vhostpath] [exchangeinfoitem ...]
Binding信息:rabbitmqctllist_bindings[-p vhostpath] [bindinginfoitem ...]
Connection信息:rabbitmqctllist_connections [connectioninfoitem ...]
Channel信息:rabbitmqctl list_channels[channelinfoitem ...]