Install and configure RabbitMQ in CentOS
Installation Steps (rpm package installation): rpm installation Official Website: http://www.rabbitmq.com/install-rpm.htmldownload rpmand install:
Wget http://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-3.6.1-1.noarch.rpmrpm -- import https://www.rabbitmq.com/rabbitmq-signing-key-public.ascyum install rabbitmq-server-3.6.1-1.noarch.rpm (which prompts you to download and install dependency packages such as erlang) start: service rabbitmq-server start/stop/status Register as boot: chkconfig rabbitmq-server on default log Path:/var/log/rabbitmq Viewing Status: rabbitmqctlstatus you can view the default listening port: {listeners, [{clustering, 25672 ,":: "},{ amqp, 5672,": "}]}, configuration file: environment variable configuration: vi/etc/rabbitmq/rabbitmq-env.confRabbitMQ configuration: vi/etc/rabbitmq. config user Management: New user: rabbitmqctl add_user <user> pwd delete user: rabbitmqctl delete_user <user> View user list: rabbitmqctl list_users user permission: View permissions of all users: rabbitmqctllist_permissions sets the user permission: rabbitmqctl set_permissions <user> '. *''. *''. * '(<conf> <write> <read>, regular expression ,'. * 'indicates all permissions.) Clear user Permissions: rabbitmqctl clear_permissions <user> roles:
- None
- Cannot access management plugin
- Management
-
- You can do anything through AMQP plus:
- List virtual hosts that you can log on to through AMQP.
- View queues, exchanges, and bindings in your virtual hosts.
- View and disable your channels and connections
- View the "Global" Statistics of your virtual hosts, including the activities of other users in these virtual hosts.
- Policymaker
- Management can do anything plus:
- View, create, and delete the parameter ies and parameters of your virtual hosts.
- Monitoring
- Management can do anything plus:
- List all virtual hosts, including virtual hosts that they cannot log on
- View connections and channels of other users
- View node-level data such as clustering and memory usage
- View real global statistics on all virtual hosts
- Administrator
- Policymaker and monitoring can do anything plus:
- Create and delete virtual hosts
- View, create, and delete users
- View create and delete permissions
- Disable connections of other users
Set user Role: rabbitmqctl set_user_tags <user> [administrator | monitoring | yymaker | management]
For details about permissions and roles, visit http://www.rabbitmq.com/access-control.htmland use the rabbitmqwebmanagement plug-in: rabbitmq-plugins enable rabbitmq_management. Access: http: // <server-name>: 15672/CentOS Firewall: firewall-cmd -- zone = public -- add-port = 15672/tcp -- permanentfirewall-cmd -- reload. In addition, you can directly extract rabbitmq-server-generic-unix-xxx.tar from the Linux system that does not support rpmpackages. xz file: Download: http://www.rabbitmq.com/install-generic-unix.html download to directly decompress: xz-d rabbitmq-server-generic-unix-3.6.1.tar.xztar-xvf rabbitmq-server-generic-unix-3.6.1.tar to create a soft connection: ln-s rabbitmq_server-3.6.1 rabbitmq start: cd rabbitmq_server-3.6.1 (or use soft connection: cd rabbitmq) sbin/rabbitmq-server-detached or: service rabbitmq-server start/stop/start/status modify Startup Script: vi/etc/init. d/boot. local/opt/app/rabbitmq_server-3.6.1/sbin/rabbitmq-server-detached or: register as boot start: chkconfig rabbitmq-server on may need to install the following dependency package first: Install Erlang: official Website: http://www.erlang.org/downloadswget http://erlang.org/download/otp_src_18.3.tar.gztar-zxvfotp_src_18.3.tar.gz cdotp_src_18.3export ERL_TOP = 'pwd '. /configure (Note: If you are prompted that the curses library error cannot be found, you need to install ncurses first) makemake install default installation path:/usr/local/bin/erl run the command: erl install ncurses: tar zxvfncurses-5.9.tar.gzcd ncurses-5.9. /configure -- with-shared -- prefix =/usrmakemake install