Refer to it before installationwww.rabbitmq.com/which-erlan…
Install Erlang
Since RabbitMQ is written in Erlang, you need to install Erlang in centos first, see www.erlang.org/downloads
Install dependencies
yum -y install gcc glibc-devel make ncurses-devel openssl-devel xmlto perl wget gtk2-devel binutils-devel
Copy the code
Download (slow)
Can be in: download.csdn.net/download/ta… download
Wget HTTP: / / http://erlang.org/download/erlang_otp_src_22.3.tar.gzCopy the code
Unpack the
Tar - ZXVF erlang_otp_src_22. 3. The tar. GzCopy the code
Move files
The mv otp_src_22. 3 / usr/local /Copy the code
Switch directory
cd /usr/local/ otp_src_22. 3 /Copy the code
Create the directory to install
mkdir .. /erlangCopy the code
The installation
make install
Copy the code
Check whether the installation is successful
ll /usr/local/erlang/bin
Copy the code
Configuring the Installation Path
./configure --prefix=/usr/local/erlang
Copy the code
Adding environment variables
echo 'export PATH=$PATH:/usr/local/erlang/bin' >> /etc/profile
Copy the code
Refreshing environment variables
source /etc/profile
Copy the code
Install the RabbitMQ
The website www.rabbitmq.com
Rabbitmq download: github.com/rabbitmq/ra… Tangzhengfeng_admin.giite. IO /driftwood-f… > toolwa.com/github/)
Download the RabbitMQ
Wget HTTP: / / https://github.com/rabbitmq/rabbitmq-server/releases/download/v3.8.9/rabbitmq-server-generic-unix-3.8.9.tar.xz Or accelerator download WGET https://hub.fastgit.org/rabbitmq/rabbitmq-server/releases/download/v3.8.9/rabbitmq-server-generic-unix-3.8.9.tar.xzCopy the code
Because it is tar.xz format so need to use XZ, if not, install first
yum install -y xz
Copy the code
First decompression
/ bin/xz - d the rabbitmq server - generic - Unix - 3.8.9. Tar. XzCopy the code
Second decompression
The tar XVF - the rabbitmq server - generic - Unix - 3.8.9. TarCopy the code
Move files
Mv rabbitmq_server - 3.8.9 / / usr /local/
Copy the code
rename
mv /usr/local/ rabbitmq_server - 3.8.9 / rabbitmqCopy the code
Configuring environment Variables
echo 'export PATH=$PATH:/usr/local/rabbitmq/sbin' >> /etc/profile
Copy the code
Refreshing environment variables
source /etc/profile
Copy the code
Creating a Configuration directory
mkdir /etc/rabbitmq
Copy the code
Start the
rabbitmq-server -detached
Copy the code
stop
rabbitmqctl stop
Copy the code
state
rabbitmqctl status
Copy the code
Set automatic startup upon startup
systemctl enable rabbitmq-server
Copy the code
Viewing Service Status
systemctl status rabbitmq-server
Copy the code
Open port 15672
To access the RabbitMQ login page from your browser, do the following:
rabbitmq-plugins enable rabbitmq_management
Copy the code
Enter http://ip:15672/ in the browser. Both the login and password are guest
Set the configuration
Refer to www.rabbitmq.com/configure.h…
RabbitMQ comes with default built-in Settings. In some environments, such as development and quality checks, these may be sufficient. For all other cases, as well as production deployment adjustments, there is a way to configure many things in agents and plug-ins
Rabbitmq3.8 default configuration file location: ${RABBITMQ_HOME}/etc/rabbitmq/
RabbitMQ has three configuration files
- Master configuration file (rabbitmq.conf)
- Erlang Term format configuration file (advance.config)
- Environment variable configuration file (rabbitmq-env.conf)
Rabbitmq. conf Configures the RabbitMQ server and plug-ins.
Rabbitmq-env.conf defines the environment variables to be used by the proxy. The RABBITMQ_CONF_ENV_FILE environment variable can be used to configure its location [on UNIX-based systems (Linux, MacOS and BSD versions)]
Advanced. config: Some configuration Settings are impossible or difficult to configure using the SYSCTL format. Therefore, other configuration files can be used in Erlang terminology format (same as rabbitmq.config). This file is usually named advance.config. It will be merged with the configuration provided in rabbitmq. conf.
Save the configuration and restart the RabbitMQ service
rabbitmq.conf
# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # RabbitMQ broker part # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =# # the documentation guidelines: https://rabbitmq.com/configure.html. see
The ToC # # https://rabbitmq.com/documentation.html for documentation.# # networking# # = = = = = = = = = = = = = = = = = = = =
# #
# # the documentation guidelines: https://rabbitmq.com/networking.html.
# #
By default, RabbitMQ will be used
## Standard (reserved) AMQP 0-9-1 and 1.0 ports
# ## listeners. TCP. Default = 5672To listen on a specific interface, provide an IP address with a port.
For example, listen on IPv4 and IPv6 only on localhost:
# ## process # listeners. Tcp. local = 127.0.0.1:5672 # process # listenersYou can define multiple listeners using listener names# listeners.tcp.other_port = 5673 # listeners.tcp.other_ip = 10.10.10.10:5672TLS listeners are configured in the same way as TCP listeners,
## includes control interface selection options.
# ## listeners. SSL. Default = 5671Normal TCP (non-TLS) listeners can be disabled. Our customer base
Ports that are not configured to use TLS and have TLS enabled correctly will not be available
## Connect to this node.# listeners. TCP = none## Number of Erlang processes that will accept TCP connections
## and TLS listeners.
# ## num_acceptors.tcp = 10 # num_acceptors.ssl = 10## The socket writer will force GC every time that many bytes are transferred.
The default value is 1 GiB (' 1000000000 '). Set to Off to disable.
# ## socket_writer.gc_threshold = 1000000000 ## # disabled:# socket_writer gc_threshold = off## AMQP 0-9-1 Maximum time allowed for AMQP 1.0 handshake
## (executed after the socket connection and TLS handshake) is done in milliseconds.
# ## handshake_timeout = 10000## Set to "true" to perform a reverse DNS lookup on receiving the following
# # the connection. Rabbitmqctl and the admin UI will then display the host name
## instead of IP address. The default value is false.
# ## reverse_dns_lookups =false
# #
## Security, access control
# # = = = = = = = = = = = = = =
# #
## Related documentation guide: https:// rabbitmq.com/access-control.html.
Only the default "guest" user is allowed to access the server
## through the loopback interface (for example localhost).
## {loopback_users, [<< "guest" >>]},
# ## loopback_users. Guest =true
To allow access to the following, uncomment the following line:From anywhere on the web## guest users.# loopback_users. Guest =false
# TLS configuration.
# #
## Related documentation guide: https:// rabbitmq.com/ssl.html.
# ## ssl_options.verify = verify_peer # ssl_options.fail_if_no_peer_cert =falseCertfile = /path/to/cert.pem # ssl_options.keyfile = /path/to/cert.pem # ssl_options.keyfile = /path/to/cert.pem # ssl_options.keyfile = /path/to/key.pem # # ssl_options.honor_cipher_order =true# ssl_options honor_ecc_order =trueCiphers.2 = ecdhe-rsa-aes256-GMM-sha384 # ssl_options.ciphers.2 = ecdhe-rsa-aes256-GMm-sha384 # ssl_options.ciphers Ssl_options. ciphers.4 = ecdhe-rsa-aes256-sha384 # ssl_options.ciphers Ciphers.6 = ecdh-rsa-aes256-GMM-sha384 # ssl_options.ciphers.6 = ecdh-rsa-aes256-GMm-sha384 # ssl_options.ciphers Ciphers.8 = ecdh-rsa-aes256-sha384 # ssl_options.ciphers.9 = ecdh-rsa-aes256-sha384 # ssl_options.ciphers = dhe-rsa-aes256-gmc-sha384 # ssl_options.ciphers.10 = Dhe-DSs-aes256-GMc-sha384 # ssl_options.ciphers Ciphers.12 = dhe-dss-aes256 -SHA256 # ssl_options.ciphers.13 = dhe-dss-aes256 -SHA256 # ssl_options.ciphers Ecdhe-rsa-aes128-cm-sha256 # ssl_options.ciphers.14 = ecdhe-rsa-aes128-cm-sha256 # ssl_options.ciphers.15 = ecdhe-rsa-aes128-cm-sha256 # ssl_options.ciphers Ecdhe-rsa-aes128-sha256 # ssl_options.ciphers.16 = ecdhe-rsa-aes128-sha256 # ssl_options.ciphers.17 = ecdhe-rsa-aes128-sha256 # ssl_options.ciphers Ecdh-ecdsa-aes128-cm-sha256 # ssl_options.ciphers.18 = ecdh-rsa-aes128-cm-sha256 # ssl_options.ciphers.19 = ecdh-rsa-aes128-cm-sha256 # ssl_options.ciphers Ecdh-ecdsa-aes128-sha256 # ssl_options.ciphers.20 = ecdh-rsa-aes128-sha256 # ssl_options.ciphers Ciphers.22 = dhe-dss-aes128-cm-sha256 # ssl_options.ciphers.23 = dhe-dss-aes128-cm-sha256 # ssl_options.ciphers Dhe-rsa-aes128-sha256 # ssl_options.ciphers.24 = dhe-dss-aes128-sha256 # ssl_options.ciphers.25 = ecdhe-ecdsa-aes256-sha Ciphers.27 = dhe-rsa-aes256-sha # ssl_options.ciphers.28 = ecdhe-rsa-aes256-sha # ssl_options.ciphers Ciphers.29 = ecdh-ecdsa-aes256-sha # ssl_options.ciphers.30 = ecdh-rsa-aes256-sha # ssl_options.ciphers Ciphers.32 = ecdhe-rsa-aes128-sha # ssl_options.ciphers.33 Ciphers.34 = dHE-dss-aes128-sha # ssl_options.ciphers.35 = ecdh-ecdsa-aes128-sha # ssl_options. Ciphers. 36 = ECDH - RSA - either AES128 - SHA## Select the authentication/authorization backend to use.
# #
## Alternate backends are provided by plug-ins such as rabbitmq-auth-backend-ldap.
# #
## Note: These Settings require certain plug-ins to be enabled.
# #
## Related documentation guide:
# #
## * https://rabbitmq.com/plugins.html
## * https://rabbitmq.com/access-control.html
# ## auth_backends. 1 = Rabbit_auth_backend_internalUse a separate back end for authentication and authorization,# # see below. 1. Authn = rabbit_auth_backend_ldap # auth_backends.1. Authz = rabbit_auth_backend_internalThe Rabbitmq_auth_backend_ldap plugin allows brokers to do the following:
## Through delayed authentication and authorization
# external LDAP server.
# #
## Related documentation guide:
# #
## * https://rabbitmq.com/ldap.html
## * https://rabbitmq.com/access-control.html
# #
Use LDAP for authentication and authorization# auth_backends. 1 = Rabbit_auth_backend_ldapUse the HTTP service for authentication and
# # authorization# auth_backends. 1 = rabbit_auth_backend_http## Use two backends in the chain: HTTP first, then internal# auth_backends.1 = rabbit_auth_backend_http # auth_backends.2 = Rabbit_auth_backend_internal## Authentication
## The built-in mechanism is "normal",
##'AMQPLAIN' and 'EXTERNAL' other mechanisms can be added
# # plug-in.
# #
# # the documentation guidelines: https://rabbitmq.com/authentication.html.
# ## auth_mechanisms.1 = PLAIN # auth_mechanisms.2 = AMQPLAINThe rabbitmq-auth-mechanism-ssl plugin can do this
Authenticate the user against the client's X509 (TLS) certificate.
# # the documentation guidelines: https://rabbitmq.com/authentication.html.
# #
## To use auth-mechanism-ssl, the EXTERNAL mechanism should
## enabled:
# ## params.1 = PLAIN # params.2 = AMQPLAIN # params.3 = EXTERNALTo enforce x509 certificate-based authentication on all clients,
## Exclude all other mechanisms (note: this will disable password-based
## authentication, even for managing UI!) :
# ## auth_mechanisms. 1 = EXTERNAL## This works with the Rabbitmq-auth-mechanism-ssl plugin and
STOMP SSL_cert_login configuration. See the RabbitMQ STOMP pluginFollowing this file## Configuration section and README contents
# # https://github.com/rabbitmq/rabbitmq-auth-mechanism-ssl further# # Details.# #
Use CN of TLS certificate instead of DN as user name
# ## ssl_cert_login_from = common_nameTLS handshake timeout, in milliseconds.
# ## ssl_handshake_timeout = 5000# cluster name
# ## cluster_name = dev3. Eng. Megacorp. LocalPassword hash implementation. It only affects the new ones
## create user. Recalculate the hashes of existing users
## Must update her password.
# #
To use SHA-512, set it to rabbit_password_hashing_sha512.
# ## password_hashing_module = rabbit_password_hashing_sha256## Import definitions exported from earlier versions
## higher than 3.6.0, you can return to MD5 (only do this operation
## as a temporary measure!) , set it to rabbit_password_hashing_md5.
# ## password_hashing_module = rabbit_password_hashing_md5# #
Default user/VHost
# # = = = = = = = = = = = = = = = = = = = =
# #
Starting RabbitMQ for the first time will create a virtual host and a user. these
Configuration items control what content is created.
## Related documentation guide: https:// rabbitmq.com/access-control.html
# #/ # default_user = guest # default_pass = guest # default_permissions * # default_permissions. Write =.*## Default user tag
# #
For more details on tags, see
# # management plug-ins, https://rabbitmq.com/management.html.
# ## default_user_tags. Administrator =true
## Define additional tags, as shown below:# default_user_tags. Management =true# default_user_tags custom_tag =true
# #
Other network and protocol related configurations
# # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
# #
## Set the default AMQP 0-9-1 heartbeat interval in seconds.
## Related documentation guide:
# #
## * https://rabbitmq.com/heartbeats.html
## * https://rabbitmq.com/networking.html
# ## heartbeat = 60## Set the maximum allowed size (in bytes) for AMQP frames.
# ## frame_max = 131072# set the maximum frame size that the server will accept before connecting
## Adjustment occurred
# ## initial_frame_max = 4096# set the maximum number of channels allowed per connection.
## 0 means "unlimited".
# ## channel_max = 128Custom TCP listener (socket) configuration.
# #
## Related documentation guide:
# #
## * https://rabbitmq.com/networking.html
## * https://www.erlang.org/doc/man/inet.html#setopts-2
# #Backlog = 128 # tcp_listen_options.nodelay =true# tcp_listen_options exit_on_close =false# # tcp_listen_options keepalive =trueSndbuf = 196608 # tcp_listen_options.sndbuf = 196608 # tcp_listen_options.sndbuf = 196608 # tcp_listen_options recbuf = 196608# #
## Resource limits and flow control
# # = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
# #
# # the documentation guidelines: https://rabbitmq.com/memory.html.
## Memory-based flow control threshold.
# ## vm_memory_high_watermark. Relative = 0.4In addition, we can set a limit (in bytes) on the amount of RAM used by the node.
# ## vm_memory_high_watermark. Absolute = 1073741824Or you can use the storage unit (RabbitMQ 3.6.0+) to set the absolute value.
## If relative is defined, absolute watermarking is ignored!
# ## vm_memory_high_watermark. Absolute = 2 gb# #
## Supported unit symbols:
# #
## k, kiB: kilobytes (2 ^ 10-1,024 bytes)
## M, MiB: Megabytes (2 ^ 20-1,048,576 bytes)
## G, GiB: gigabytes (2 ^ 30-1,073,741,824 bytes)
## kB: kilobytes (10 ^ 3-1,000 bytes)
## MB: megabytes (10 ^ 6-1,000,000 bytes)
## GB: gigabytes (10 ^ 9-1,000,000,000 bytes)
## The number of watermark caps that the queue starts to reach
## page messages are output to the disk to free up memory.
For example, when vm_memory_high_watermark is set to 0.4 and this value is set to 0.5,
## Paging can start as early as a node using 20% of the total available RAM.
# #
## values greater than 1.0 can be dangerous and should be used with caution.
# #
## One alternative is to use persistent queues and publish messages
## indicates permanence (delivery mode = 2). With this combination, the queue will
## Move messages to disk faster.
# #
## Another option is to configure queues to paginate all messages (both
## Permanent and transient) transfer to disk as soon as possible
# #, please refer to https://rabbitmq.com/lazy-queues.html.
# ## vm_memory_high_watermark_paging_ratio = 0.5Select the Erlang VM memory consumption calculation strategy. Can be "assigned", "RSS" or "old edition" (alias "Erlang"),
## introduced in 3.6.11. As of 3.6.12, the default is RSS.
# # see https://github.com/rabbitmq/rabbitmq-server/issues/1223 and the rabbitmq/rabbitmq - common# 224 understand background.# vm_memory_calculation_strategy = RSS## The time interval (in milliseconds) at which we perform memory checks
## Level with watermark.
# ## memory_monitor_interval = 2500The total memory available can be calculated from OS resources
##- Default option - or provided as a configuration parameter.# total_memory_available_override_value = 2 gb## Set the disk availability limit in bytes. Once available disk space reaches this value
## lower limit, which will set disk alerts - see documentation
## More details are listed above.
# #
## If relative is defined, absolute watermarking is ignored!# disk_free_limit. Absolute = 50000## Or you can use the memory unit for setting (same as in vm_memory_high_watermark)
Use RabbitMQ 3.6.0+.Absolute = 500KB # disk_free_limit. Absolute = 50MB # disk_free_limit. Absolute = 5GBIn addition, we can set a limit relative to the total available RAM.
# #
Values below 1.0 can be dangerous and should be used with caution.# disk_free_limit. Relative = 2.0# #
# # clustering
# # = = = = = = = = = = = = = = = = = = = = =
# ## cluster_partition_handling = ignore## Pause_if_all_DOWN policy requires additional configuration# cluster_partition_handling = pause_if_all_down## Recovery policy. It could be "Autoheal" or "Ignore"# cluster_partition_handling. Pause_if_all_down. Recover = ignoreThe name of the node to check# cluster_partition_handling. Pause_if_all_down. Nodes. 1 = rabbit @ localhost # cluster_partition_handling. Pause_if_all_down. Nodes. 2 = hare @ localhost## Mirror sync batch size in message. Increasing this speed will speed up
## Sync up, but the total batch size in bytes must not exceed 2 GiB.
Available in RabbitMQ 3.6.0 or later.
# ## mirroring_sync_batch_size = 4096# enable the cluster to be "automatically" started. Only available
To the node that was just reset or started for the first time.
# #
## Related documentation guide: https:// rabbitmq.com//cluster-formation.html
# #Peer_discovery_backend = rabbit_peer_discovery_classic_config # # cluster_formation. Classic_config.nodes.1 = rabbit1@hostname # cluster_formation. Classic_config.nodes.2 = rabbit2@hostname # cluster_information.classic_config.nodes.3 = rabbit3@hostname # cluster_information.classic_config.nodes.4 = rabbit4@hostname## DNS based peer discovery. The back end will list A records
Configure the host name and perform the reverse query
## Return address.Peer_discovery_backend = rabbit_peer_discovery_dns # cluster_formation.dns.hostname = Discovery.eng.example.localThe type of this node can be configured. If you're not sure
## Which node type to use, always use 'disc'.# cluster_formation node_type = disc## The interval (in milliseconds) at which we send the stay active message
## Other cluster members. Mind you, it's not the same thing
# # for net_ticktime; A missed Keepalive message does not cause a node
## is considered a failure.
# ## cluster_keepalive_interval = 10000# #
## Statistical data collection
# # = = = = = = = = = = = = = = = = = = = = =
# #
The interval between collecting statistics in milliseconds. More and more
## This will reduce the load on the administrative database.
# ## collect_statistics_interval = 5000## Fine and rough statistics# # This value is no longer meant to be configured directly. See https://www.rabbitmq.com/management.html for # ## fine - stats.
# #
# # Ra Settings
# # = = = = = = = = = = = = = = = = = = = = =
# ## raft.segment_MAX_entries = 65536 # raft.wal_max_size_bytes = 1048576 # raft.wal_max_batch_size = 4096 # raft. Snapshot_chunk_size = 1000000# #
## Other/advanced options
# # = = = = = = = = = = = = = = = = = = = = =
# #
## Note: Change these only if you know what you are doing!
# #
# wait for the Mnesia table in the cluster to time out
# # is available.
# ## mnesia_table_loading_retry_timeout = 30000## Try again while waiting for the Mnesia table during cluster startup. Pay attention to
## This setting does not apply to Mnesia upgrades or node deletions.
# ## mnesia_table_loading_retry_limit = 10## Size, in bytes, below which the message is embedded in the queue index.
# # the documentation guidelines: https://rabbitmq.com/persistence-conf.html
# ## queue_index_embed_msgs_below = 4096You can also set this size in storage units
# ## queue_index_embed_msgs_below = 4 KB## Whether to enable the background to force GC to run periodically for everyone
## Erlang processes on nodes in the "wait" state.
# #
Disabling background GC reduces client latency
## Keeping enabled may reduce the average RAM usage of the binary heap
# # (see https://www.erlang-solutions.com/blog/erlang-garbage-collector.html).
# #
## Take a look at memory before trying this option
# # fault (https://www.rabbitmq.com/memory-use.html).
# ## background_gc_enabled =false
## The target (expected) interval in milliseconds at which we run the background GC.
## The actual interval will vary depending on how long it takes to execute
## operation (can be larger than this interval). Value is less than
## Use 30000 ms is not recommended.
# ## background_gc_target_interval = 60000Whether to enable proxy protocol support.
Once enabled, the client will not be able to connect directly to the proxy
# #. They must be connected through a load balancer, which will connect them
The proxy protocol header to the proxy at connection time.
## This setting only applies to AMQP clients, other protocols
## Things like MQTT or STOMP have their own Settings to enable proxy protocols.
## Refer to the plug-in documentation for more information.
# ## proxy_protocol =false
## Overwrite product name and version.
The default is "RabbitMQ" and distribution.Name = RabbitMQ # product.version = 1.2.3## "Daily Message" file.
## Its content is used to extend the recorded and printed banner.
On Unix the default is /etc/rabbitmq/motd, % APPDATA % \ rabbitmq/motd.txt
## on Windows.# motd_file = / etc/rabbitmq/motd# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
## Advanced Erlang networking/clustering options.
# #
# # the documentation guidelines: https://rabbitmq.com/clustering.html
# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # kernel part # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =Timeout is used to detect peer unavailability, including with CLI tools.
# # the documentation guidelines: https://www.rabbitmq.com/nettick.html.
# ## net_ticktime = 60Range of communication ports between nodes.
Parameters inet_dist_listen_min and inet_dist_listen_max
## Can only be configured in classic configuration format.
# # the documentation guidelines: https://www.rabbitmq.com/networking.html#epmd-inet-dist-port-range.
# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
RabbitMQ management plugin
# #
# # the documentation guidelines: https://rabbitmq.com/management.html.
# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # management part # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =## Preload schema definitions from the following JSON file.
# # the documentation guidelines: https://rabbitmq.com/management.html#load-definitions.
# ## management load_definitions = / path/to/exported/definitions. JsonLog all requests to the admin HTTP API to a file.
# ## management http_log_dir = / path/to/access log## HTTP listener and embedded Web server Settings.
## # about detailed information, see https://rabbitmq.com/management.html.Port = 15672 # management-tcp. IP = 0.0.0.0 # # management-tcp. shutdown_timeout = 7000 # management. TCP. Max_keepalive = 120 # management. TCP. Idle_timeout = 120 # management. TCP inactivity_timeout = 120 # management.tcp.request_timeout = 120 # management.tcp.press =true
## HTTPS listener Settings.
# # about detailed information, see https://rabbitmq.com/management.html and https://rabbitmq.com/ssl.html.
# #15671 # # management. SSL. The port = management SSL. Cacertfile = / path/to/ca_certificate. Pem # management. SSL certfile = Pem # management-ssl. keyfile = /path/to/server_key.pem## More TLS options# management. SSL. Honor_cipher_order =true# management. SSL. Honor_ecc_order =true# management. SSL. Client_renegotiation =false# management. SSL. Secure_renegotiate =true
## Supported TLS version# management. SSL. Versions. # 1 = tlsv1.2 management SSL. Versions. 2 = tlsv1.1Password suite that allows the server to useCiphers.2 = ecdhe-rsa-aes256-gmm-sha384 # management 3 = ecdhe-ecdsa-aes256-sha384 # management. Ciphers.4 = ecdhe-rsa -aes256-sha384 # management. Ciphers.6 = ecdh-rsa-aes256-GMm-sha384 # management # management = ecdh-ecdsa-aes256-sha384 # management = ecdh-rsa-aes256-sha384 9 # management. SSL. Ciphers. = DHE - RSA - AES256 - GCM - SHA384## URL path prefix for HTTP API and admin UI# management path_prefix = / a - prefix## "Basic", "detailed" or one of "None". see
# # https://rabbitmq.com/management.html#fine-stats for more details.# management. Rates_mode = basicConfigure the timing of aggregate data (e.g. message rate and queue)
## length) is reserved. Read the plug-in documentation
# # https://rabbitmq.com/management.html#configuration learn more# # Details.## You can use the "minute", "hour" and "day" keys or integer keys (in seconds)# management. Sample_retention_policies.global. minute = 5 # management. Sample_retention_policies.global. hour = 60 Day = 1200 # management. Sample_retention_policies.basic. minute = 5 # management. Sample_retention_policies. Basic. Hour = detailed# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
RabbitMQ Shovel
# #
# # the documentation guidelines: https://rabbitmq.com/shovel.html
# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
For an example of the Shovel plug-in, see advance.config. example
# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
## RabbitMQ STOMP plugin
# #
# # the documentation guidelines: https://rabbitmq.com/stomp.html
# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # STOMP part # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =# # about detailed information, see https://rabbitmq.com/stomp.html.
# TCP listener.
# ## listeners. Tcp. 2 = : 2 # listenersTCP listener Settings
# #Backlog = 2048 # stomp.tcp_listen_options.recbuf = 131072 # stomp.tcp_listen_options.sndbuf = Tcp_listen_options. keepalive =true# stomp. Tcp_listen_options. Nodelay =true# # stomp. Tcp_listen_options. Exit_on_close =true# stomp. Tcp_listen_options. Send_timeout = 120## Proxy agreement support
# ## stomp. Proxy_protocol =false
## TLS listener
# # about detailed information, see https://rabbitmq.com/stomp.html and https://rabbitmq.com/ssl.html.# stomp. Listeners. SSL. Default = 61614 # # ssl_options cacertfile = path/to/cacert. Pem # ssl_options. Certfile = Pem # ssl_options.keyfile = path/to/key.pem # ssl_options.verify = verify_peer # ssl_options fail_if_no_peer_cert =true
## Number of Erlang processes that will accept TCP connections
## and TLS listeners.
# #TCP = 10 # stomp.num_acceptors.ssl = 1## Other TLS options
Extract the name from the client certificate when using TLS.
# ## stomp. Ssl_cert_login =true
Set the default username and password. This is used as the default login name
Whenever the CONNECT framework ignores the login and password headers.
# #
## Note that setting this option will allow clients to connect without having to
## Verifying!
# ## stomp. Default_user = guest # stomp. Default_pass = guestIf the default user is configured, or you have configured the TLS client
## Certificate-based authentication, you can choose to allow clients
## completely omits the CONNECT framework. If set to true, the client is
## Auto connect for default user orAs long as the first frame sent in the session is not## CONNECT framework.
# ## stomp. Implicit_connect =true
Whether to enable proxy protocol support.
Once enabled, the client will not be able to connect directly to the proxy
# #. They must be connected through a load balancer, which will connect them
The proxy protocol header to the proxy at connection time.
## This setting only applies to STOMP clients, other protocolsLike MQTT or AMQP## Have your own Settings to enable the proxy protocol.
## Refer to the plug-in or proxy documentation for more information.
# ## stomp. Proxy_protocol =false
# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
RabbitMQ MQTT adapter
# #
See https://github.com/rabbitmq/rabbitmq-mqtt/blob/stable/README.md for # #
## Learn more
# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # MQTT part # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =TCP listener Settings.
# ## mqtt.listeners. Tcp. 2 = : 1:61613 # mqtt.listeners. Tcp. 2 = : 1:61613## TCP listener options (based on proxy configuration).
# #Backlog = 4096 # mqtt.tcp_listen_options.recbuf = 131072 # mqtt.tcp_listen_options.sndbuf = Tcp_listen_options. Keepalive =true# MQTT. Tcp_listen_options. Nodelay =true# # MQTT. Tcp_listen_options. Exit_on_close =true# MQTT. Tcp_listen_options. Send_timeout = 120## TLS listener Settings
# # # # about detailed information, see https://rabbitmq.com/mqtt.html and https://rabbitmq.com/ssl.html.# # MQTT. Listeners. SSL. Default = 8883 # # ssl_options cacertfile = / path/to/TLS/ca_certificate_bundle pem Ssl_options. keyfile = /path/to/ TLS /server_certificate.pem # ssl_options.verify = verify_peer # ssl_options.fail_if_no_peer_cert =true
#
## Number of Erlang processes that will accept TCP connections
## and TLS listeners.
# ## mqtt.num_acceptors.tcp = 10 # mqtt.num_acceptors.ssl = 10Whether to enable proxy protocol support.
Once enabled, the client will not be able to connect directly to the proxy
# #. They must be connected through a load balancer, which will connect them
The proxy protocol header to the proxy at connection time.
## This setting only applies to STOMP clients, other protocols
## (such as STOMP or AMQP) has its own Settings to enable proxy protocols.
## Refer to the plug-in or proxy documentation for more information.
# ## MQTT. Proxy_protocol =false
## Set the default username and password for anonymous connections (when client
## No credentials provided). It is strongly recommended not to use anonymous connections!
# ## mqtt.default_user = guest # mqtt.default_pass = guest## Enable anonymous connections. If set to false, the customer must provide it
## Credentials to connect. See also mqtt.default_user/mqtt.default_pass
# # key. It is strongly recommended not to use anonymous connections!
# ## MQTT. Allow_anonymous =true
If you have more than one virtual host, please specify a virtual host
## Adapter connection.
# ## MQTT. Vhost = /## Specifies the exchange to which messages from the MQTT client will be published.
# ## MQTT. Exchange = amq. Topic## Specify TTL to control the lifetime of non-cleared sessions.
# ## MQTT. Subscription_ttl = 1800000## Set the prefetch count (manage the maximum number of unacknowledged counts
## Message to be delivered).
# ## MQTT. Prefetch = 10# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
RabbitMQ AMQP 1.0 support
# #
See https://github.com/rabbitmq/rabbitmq-amqp1.0/blob/stable/README.md for # #.
# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 1.0 part # # it = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =## Connections that are not authenticated by SASL will be connected to this
# # account. See the readme file for more information.
# #
## Note that setting this option will allow clients to connect without having to
## Verifying!
# ## amqp1_0 default_user = guestEnable protocol strict mode. See the readme file for more information.
# ## amqp1_0 protocol_strict_mode =false
## Record Settings.
# #
# # about detailed information, see https://rabbitmq.com/logging.html and https://github.com/erlang-lager/lager.
# #
## Log directory, from the RABBITMQ_LOG_BASE env variable by default.
# ## the dir = / var /log/rabbitmq
## Record to file. Can be false or file name.
Default value:# the log. The file = rabbit. Log## Disable recording to file# the log file =false
## Log level of file recording
# ##. The log file. The level = info## File rotation configuration. No rotation by default.
Please do not set the round date to "". If "" is the required value, it is not set#. The log file. The rotation. The date =$D0#. The log file. Rotation. Size = 0## Login to console (can be true or false)
# ## the console =false
The log level of the console log
# ## the log. The console. Level = infoLog to amq.rabbitmq.log switch (can be true or false)
# ## the exchange =false
Log level used for amq.rabbitmq.log switching
# ## log. Exchange. Level = info# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
RabbitMQ LDAP plugin
# #
## Related documentation guide: https:// rabbitmq.com/ldap.html.
# #
# # -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -# = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # LDAP part # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =# #
## Connect to LDAP server
# # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
# #
## Specifies the server to bind to. You * must * set up the plug-in for this
## Working properly.
# ## auth_ldap. The servers. 1 = your server - name - goes - hereYou can define multiple servers2 = # auth_ldap. The servers. Your other -- serverUse TLS to connect to LDAP server
# ## auth_ldap use_ssl =false
## Specifies the LDAP port to connect to
# ## auth_ldap. Port = 389## LDAP connection timeout in milliseconds or "infinity"
# ## auth_ldap. Timeout = infinity# # or Numbers# auth_ldap. Timeout = 500## Enable LDAP query logging.
## One of them
##- false (no logging is performed)
##-true (detail the logic used by the plug-in)
##- Network (this is true, but LDAP network traffic is also logged)
# #
## Defaults to false.
# ## auth_ldap. Log =false
## can also be true or network# auth_ldap. Log =true# auth_ldap. Log = network# #
## Authentication
# # = = = = = = = = = = = = = =
# #
## mode, used to convert the username provided by AMQP to the name before DN# # binding# ## auth_ldap user_dn_pattern = cn =${username},ou=People,dc=example,dc=com
## Alternatively, you can convert the username to Outstanding
## Name by LDAP lookup after binding. Please refer to the relevant documentation
## Details.
When converting the user name to DN by lookup, set it to
## represents the attribute name of the user name, as well
Find the base DN of the query.
# ## auth_ldap.dn_lookup_attribute = userPrincipalName # auth_ldap.dn_lookup_base = DC=gopivotal,DC=com## Control how authorization queries are bound and how
Retrieve details of users who are not logged in
## Password (for example SASL EXTERNAL)
## One of them
##-as_user (bind as authenticated user - password required)
##-anon (anonymous binding)
##-{UserDN, Password} (to bind the specified username and Password)
# #
## Default is 'as_user'.
# ## auth_ldap other_bind = as_user## Or it could be more complicated:User_dn = User # auth_ldap.other_bind. Password = password## If user_DN and password are defined - other options will be ignored.# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- complex part # # LDAP -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --# #
# # authorization
# # = = = = = = = = = = = = =
# #
The ## LDAP plug-in can perform various queries against your server
## LDAP server determines authorization issues.
# #
## Related documentation guide: https:// rabbitmq.com/ldap.html#authorisation.
## The following configuration should be defined in the advanced.config file
## Do not uncomment these lines!
## Set the query to use when determining virtual host access permissions
# #
## {vhost_access_query,{in_group,
# # "ou = ${vhost} - users, ou = vhosts, d = example, dc = com"}},
## Set the query to use when determining access to resources (such as queues)
# #
## {resource_access_query,{constant,true}},
Set up the query to determine which tags the user owns
# #
## {tag_queries,[]}# #]}, -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --Copy the code
advanced.config
[% % -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - % % advanced Erlang network/cluster option. %% %% For more information, See https://www.rabbitmq.com/clustering.html % % -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ---------------------------- %% sets the ticking time of net_kernel. Please refer to http://erlang.org/doc/man/kernel_app.html % % % % and https://www.rabbitmq.com/nettick.html for more details. %% %% {kernel, [{net_ticktime, 60}]}, % % -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - % % the RabbitMQ Shovel plug-in % % % % of detailed information, See https://www.rabbitmq.com/shovel.html % % -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- - {rabbitmq_shovel, [{shovels, [%% A named shovel worker. %% {my_first_shovel, %% [%% list the source agents to consume. %% %% {sources, %% [%% URI(s) and pre-declarationsfor all source broker(s).
%% {brokers, ["amqp://user:[email protected]/my_vhost"]}, %% {declarations, []} %%]}, %% lists target agents to publish to. %% {destinations, %% [%% A singular version of the'brokers' element.
%% {broker, "amqp://"}, {declarations, []} % % % %]}, shovel in the name of the message queue % % % % % % {queue, < <"your-queue-name-goes-here">>}, %% Optional prefetch count. %% %% {preFETch_count, 10}, %% When the message is confirmed: %% -no_ACK: never (automatically) %%-on_publish: after each message is republished %%-on_confirm: %% %% {ACK_mode, on_confirm}, %% overwrites the outbound basic.publish field when the target broker confirms receipt. %% %% {publish_fields, [{exchange, <<"my_exchange">>},
%% {routing_key, <<"from_shovel">>}]}, %% static list of basic.properties to be set at republish time. %% %% {publish_properties, [{delivery_mode, 2}]}, %% Number of seconds to wait before attempting to reconnect if the connection fails. %% %% {reconnect_delay, 2.5} %%]} %% my_first_shovel end]} %% Rather than specifying some values per-shovel, you can specify %% themforIn addition to specifying some values for each shovel, you can also specify %% as all shovels here. %% %% {defaults, [{prefetch_count, 0}, %% {ack_mode, on_confirm}, %% {publish_fields, []}, %% {publish_properties, [{delivery_mode, 2}]}, %% {reconnect_delay, 2.5}]}]}, {rabbitmq_auth_backend_ldap, [authorized % % % % % % = = = = = = = = = = = = = % % % % LDAP plug-in can carry out various query for your server % % the LDAP server to determine authorization. See % % https://www.rabbitmq.com/ldap.html# Authorisation to learn more.%% setting determines the query to be used when accessing a virtual host %% %% {vhost_access_query, {in_group, %%"ou=${vhost}-users,ou=vhosts,dc=example,dc=com"}}, %% sets the query to be used when determining resource (such as queue) access %% %% {resource_access_query, {constant,true}} % % set query to determine which users have tag % % % %} {tag_queries, []}]].Copy the code
uninstall
uninstallRabbitMQ
Stop the RabbitMQ service before uninstallation
service rabbitmq-server stop
Copy the code
See the list of rabbitMQ installations
yum list | grep rabbitmq
Copy the code
Uninstall installed rabbitMQ contents
yum -y remove rabbitmq-server.noarch
Copy the code
Uninstall the Erlang
See a list of Erlang installations
yum list | grep erlang
Copy the code
Uninstall Erlang’s installed content
yum -y remove erlang-*
yum remove erlang.x86_64
Copy the code