Use rabbitmq commands

Source: Internet
Author: User
It is very easy to compile and install the rabbitmq commands in ubuntu or debian # apt-getinstallrabbitmq-server default database content when the service is started for the first time, check whether the database is not initialized or deleted. it uses the following resources for initialization... compiling and installing ubuntu or debian is very simple # apt-get install rabbitmq-server default database content
When the service is started for the first time and the database is not initialized or deleted, it will use the following resources to initialize a new database: A virtual host named "/" and a user named "guest" and "guest" have all the permissions of the/virtual host. if your middleware is publicly accessible, it is best to change the password of the guest user.
Management Overview www.2cto.com rabbitmqctl is a command line management tool for RabbitMQ middleware. It connects to a middleware node to execute all the actions. The local node is named "rabbit" by default ". You can use the "-n" flag to specify the node name before the command, for example:
# Rabbitmqctl-n rabbit @ brief stop add_user tonyg changeit this command instructs RabbitMQ middleware to create a tonyg/changeit user on the rabbit @ brief stop node. On a host named "server.example.com", the name of the RabbitMQ Erlang node is usually rabbit @ server (unless RABBITMQ_NODENAM is set when the middleware is started ).
The hostnam-s output is usually the correct suffix of the "@" symbol. By default, rabbitmqctl generates detailed output. You can select quiet mode through "-q. Rabbitmqctl-q status application and cluster management 1. stop the RabbitMQ application and close the node # rabbitmqctl stop 2. stop the RabbitMQ application # rabbitmqctl stop_app 3. start the RabbitMQ application # rabbitmqctl start_app 4. displays various information about RabbitMQ middleware # rabbitmqctl status 5. reset RabbitMQ node # rabbitmqctl reset # rabbitmqctl force_reset
Remove from any cluster that it belongs to, and remove all data from the management database, such as configured users and virtual hosts, and delete all persistent messages. The difference between the force_reset command and the reset command is that the node is reset unconditionally, regardless of the current management database status and cluster configuration. This final method is used if the database or cluster configuration is incorrect. Note: reset and force_reset can be successful only after the RabbitMQ application is stopped.
6. cyclic log file # rabbitmqctl rotate_logs [suffix] 7. cluster management www.2cto.com # rabbitmqctl cluster clusternode... User Management 1. add user # rabbitmqctl add_user username password 2. delete User # rabbitmqctl delete_user username 3. change password # rabbitmqctl change_password username newpassword 4. list all users # rabbitmqctl list_users permission control 1. create a VM # rabbitmqctl add_vhost vhostpath 2. delete the VM www.2cto.com # rabbitmqctl delete_vhost vhostpath 3. list all virtual hosts # rabbitmqctl list_vhosts 4. set user permissions # rabbitmqctl set_permissions [-p vhostpath] username regexp 5. clear user permissions # rabbitmqctl clear_permissions [-p vhostpath] username 6. list all permissions on the VM # rabbitmqctl list_permissions [-p vhostpath] 7. list user permissions # rabbitmqctl list_user_permissions username author cooler1217

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.