Installation of RabbitMQ under Windows

RabbitMQ installation under windows RabbitMQ
It depends on Erlang, Erlang needs to be installed first. First, determine whether your Windows computer is 32-bit or 64-bit. The following installation takes a Windows 64-bit computer as an example. 
The first step The



second step is to run
the installation steps of Erlang/OTP (otp_win64_17.5.exe), and press the next step.








The third step is to install rabbit mq to download and install RabbitMQ Server.





.exe, select the directory to be installed, and install it.




The fifth step is to check whether RabbitMQ is running normally.
My installation here is installed under D:\java\RabbitMQ_Server. The
actual installation is like this. The



sixth step is to start rabbitMq and
open the command line command. OK, enter the RabbitMQ installation directory: cd rabbitmq_server-3.5.2\sbin
, enter rabbitmqctl status , if the following figure appears, the installation is successful, and the RabbitMQ Server has now been started and is running normally.





The installation and startup were successful. Step

7 Install the management plugin of rabbitMq web.
Then continue to enter the following command (rabbitmq-plugins enable rabbitmq_management), press Enter



At this point, you can access the web management interface through the http://127.0.0.1:15672/ address. The default account and password are guest. However, it may be necessary to create a new management account in actual use. Step
8 Create a new account and grant administrator privileges to
view the default account list information (input: rabbitmqctl.bat list_users). Create a




 new account
Rabbitmqctl.bat add_user czh wangjiao




to grant administrator privileges
( Input: rabbitmqctl.bat set_permissions -p / czh ".*" ".*" ".*")





Extra:
ERLANG environment variable configuration
1) Add the system environment variable ERLANG_HOME, the value is the installation directory. 
2) Modify the system environment variable Path, Add "%ERL_HOME%\bin" to the PATH variable 
3) After restarting the computer, enter erl in the console, if the words like "Eshell V6.1 (abort with ^G)" appear, the installation is successful.
Management function:
Official address: http://www.rabbitmq.com/man/rabbitmqctl.1.man.html
-n node The default node name is "rabbit@server", if your host is 'server.example.com', then the node name is rabbit@server -q Quiet output mode, information will be prohibited from output rabbitmqctl [-n node] [-t timeout] [-q] {command} [command options...]


First: basic management function
stop [<pid_file>] #Stop rabbitmq running on erlang node, which will stop
rabbitmq stop_app #stop erlang node The application of rabbitmq on the erlang node, but the erlang node will continue to run
start_app #Start the application of rabbitmq on the erlan node
wait <pid_file> #Wait for the rabbitmq service to start
reset #Initialize the node state, the node will be deleted from the cluster, and the database will be deleted from the management database. delete all data like vhosts etc. Before initialization, the application of rabbitmq must stop
force_reset #Unconditionally initialize node status
rotate_logs <suffix> #Rotate log files

Second : cluster management
join_cluster <clusternode> [--ram] #clusternode indicates the node name, --ram indicates that the node starts with The ram node joins the cluster. By default, the node joins the cluster as the disc node. Before a node joins the cluster, the rabbitmq application of the node must be stopped, that is, stop_app is executed first.
cluster_status #Display all nodes in
a cluster change_cluster_node_type disc | ram #Change the mode of a node in a cluster, the node must be stopped before conversion, and the only disk node in a cluster cannot be converted into a ram node
forget_cluster_node [--offline] # Remotely remove a node in the cluster, the premise is that the node must be in the offline state. If it is in the online state, the --offline parameter needs to be added.
update_cluster_nodes clusternode #
sync_queue queue #Sync mirror queue
cancel_sync_queue queue

Third: user management
add_user <username> <password> #Add user
delete_user <username> #delete a user
change_password <username> <newpassword> #Change user Password \\Change web management login password clear_password <username> #Clear user passwords, prohibit users from logging
in set_user_tags <username> <tag> ... #Set user tags
list_users #List users add_vhost <vhostpath> #Create a vhosts
delete_vhost < vhostpath>
list_vhosts [<vhostinfoitem> ...] #List vhosts
set_permissions [-p <vhostpath>] <user> <conf> <write> <read> #Give relevant permissions to users for a vhosts
clear_permissions [-p <vhostpath>] <username> #Clear a user's permissions to vhosts
list_permissions [-p <vhostpath>] #List which users can access the vhosts
list_user_permissions <username> #List the user's access permissions
set_parameter [-p <vhostpath>] <component_name > <name> <value> #
clear_parameter [-p <vhostpath>] <component_name> <key> # l
ist_parameters [-p <vhostpath>] #Fourth

: policy management
policy management, policies are used to control and modify queues and exchanges Behavior in the cluster, policies can be applied to vhosts
set_policy [-p <vhostpath>] [--priority <priority>] [--apply-to <apply-to>] <name> <pattern> <definition> #name Policy name, pattern regular expression, used to match Resource, the set policy will be applied if it matches, apply-to indicates what type of place the policy is applied to, generally there are queues, exchange and all, the default is all. priority is an integer priority, and definition is the policy set in json format. clear_policy [-p <vhostpath>] <name> #Clear a policy list_policies [-p <vhostpath>] #List existing policies

Fifth : queue&exchange status information
list_queues [-p <vhostpath>] [<queueinfoitem> ...] #Return the information of the queue, if the -p parameter is omitted, the information of "/" vhosts is displayed by default. list_exchanges [-p <vhostpath>] [<exchangeinfoitem> ...] #Return exchange information. list_bindings [-p <vhostpath>] [<bindinginfoitem> ...] #Return binding information. list_connections [<connectioninfoitem> ...] #Return link information. list_channels [<channelinfoitem> ...] #Return all current channels. list_consumers [-p <vhostpath>] #Return consumers, status #Display the status of the broker environment #Display the information of the environment parameters report #Return a service status report, eval <expr>

The sixth plugin management
rabbitmq supports various plugins, and you can open the plugins Use the rabbitmq-plugins command
rabbitmq-plugins <command> [<command options>] Commands: list [-v] [-m] [-E] [-e] [<pattern>] to display all plugins. -v show version -m show name -E show explicitly enabled -e show explicit and implicitly enabled enable <plugin> ... enable a plugin disable <plugin> ...

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326313094&siteId=291194637