{"id":1607,"date":"2022-01-24T18:11:14","date_gmt":"2022-01-24T10:11:14","guid":{"rendered":"https:\/\/www.siediyer.cn\/?p=1607"},"modified":"2022-01-25T11:21:42","modified_gmt":"2022-01-25T03:21:42","slug":"centos7-2%e5%ae%89%e8%a3%85rabbitmq%e5%92%8c%e5%ae%9d%e5%a1%94","status":"publish","type":"post","link":"https:\/\/www.siediyer.cn\/?p=1607","title":{"rendered":"centos7.2\u5b89\u88c5rabbitmq\u548c\u5b9d\u5854"},"content":{"rendered":"<ul>\n<li>\u73af\u5883\uff1a centos7.2<\/li>\n<li>rabbitmq\u4f9d\u8d56erlang\uff0c\u9700\u8981\u5148\u5b89\u88c5erlang<\/li>\n<\/ul>\n<h1>1 \u5b89\u88c5<a class=\"hl hl-1\" href=\"https:\/\/so.csdn.net\/so\/search?q=erlang&amp;spm=1001.2101.3001.7020\" target=\"_blank\" rel=\"noopener\" data-report-click=\"{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https:\/\/so.csdn.net\/so\/search?q=erlang&amp;spm=1001.2101.3001.7020&quot;}\">erlang<\/a><\/h1>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">rpm -Uvh https:\/\/download.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm\r\n \r\nyum -y install erlang<\/pre>\n<h1>2 \u5b89\u88c5<a class=\"hl hl-1\" href=\"https:\/\/so.csdn.net\/so\/search?q=RabbitMq&amp;spm=1001.2101.3001.7020\" target=\"_blank\" rel=\"noopener\" data-report-click=\"{&quot;spm&quot;:&quot;1001.2101.3001.7020&quot;,&quot;dest&quot;:&quot;https:\/\/so.csdn.net\/so\/search?q=RabbitMq&amp;spm=1001.2101.3001.7020&quot;}\">RabbitMq<\/a><\/h1>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">wget https:\/\/github.91chi.fun\/\/https:\/\/github.com\/\/rabbitmq\/rabbitmq-server\/releases\/download\/v3.9.13\/rabbitmq-server-3.9.13-1.el7.noarch.rpm\r\n \r\nyum -y install rabbitmq-server-3.9.13-1.el7.noarch.rpm\r\n\r\nyum\u00a0-y\u00a0install\u00a0rabbitmq-server\r\n<\/pre>\n<h1>3 \u542f\u52a8RabbitMq(\u5982\u679c\u4e0d\u80fd\u5168\u5c40\u6267\u884c\u542f\u52a8\u547d\u4ee4\uff0c\ud83c\ude51\ufe0f\u5207\u6362\u5230\u5b89\u88c5\u76ee\u5f55\u6267\u884c\uff0c \u7b14\u8005\u662f \/usr\/lib\/rabbitmq\/bin)<\/h1>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">systemctl start rabbitmq-server<\/pre>\n<h1>4 \u67e5\u770bRabbitMq\u72b6\u6001<\/h1>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">systemctl status rabbitmq-server<\/pre>\n<h1>5 \u505c\u6b62RabbitMq\u670d\u52a1<\/h1>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">systemctl stop rabbitmq-server<\/pre>\n<h1>6 RabbitMq\u9ed8\u8ba4\u81ea\u5e26\u4e00\u4e2a\u8d26\u53f7\u4e3a guest\uff0c \u5bc6\u7801\u4e5f\u4e3aguest\u7684\u7528\u6237\uff0c\u4f46\u662f\u53ea\u80fd\u672c\u673a\u8bbf\u95ee\uff0c\u5982\u679c\u9700\u8981\u5728\u5176\u4ed6\u670d\u52a1\u5668\u8bbf\u95ee\uff0c\u9700\u8981\u6dfb\u52a0\u914d\u7f6e\u6587\u4ef6\uff0c\u9ed8\u8ba4\u6ca1\u6709\uff0c\u6309\u7167\u5b98\u65b9\u63a8\u8350\u65b9\u5f0f\u76f4\u63a5\u590d\u5236\u4e00\u4efd<\/h1>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">cd \/etc\/rabbitmq\r\n \r\ncp \/usr\/share\/doc\/rabbitmq-server-3.6.6\/rabbitmq.config.example rabbitmq.config<\/pre>\n<p>7 \u4fee\u6539\u914d\u7f6e\u6587\u4ef6\uff0crabbitmq.config\u914d\u7f6e\u6587\u4ef6\u6253\u5f00\u4ee5\u4e0b\u6ce8\u91ca\uff0c\u5e76\u53bb\u6389\u6700\u540e\u7684\u9017\u53f7<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{loopback_users, []},<\/pre>\n<p>\u6539\u6210<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">{loopback_users, []}<\/pre>\n<p>\u5426\u8005\u4f1a\u51fa\u73b0\u4ee5\u4e0bbug<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1613\" src=\"https:\/\/qiniu.shijitianchen.com\/2022\/01\/20220125032143212.png\" width=\"550\" height=\"388\" alt=\"\u5728\u8fd9\u91cc\u63d2\u5165\u56fe\u7247\u63cf\u8ff0\" \/><\/p>\n<h1>8 \u5f00\u542f\u6d4f\u89c8\u5668\u8bbf\u95ee\u529f\u80fd<\/h1>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">rabbitmq-plugins enable rabbitmq_management<\/pre>\n<h1>9 \u5f00\u542f\u9632\u706b\u5899\u589e\u52a0\u53ef\u8bbf\u95ee\u7aef\u53e3<\/h1>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">firewall-cmd --add-port=15672\/tcp --permanent\r\n \r\nfirewall-cmd --reload<\/pre>\n<h1>10 \u5e38\u7528\u547d\u4ee4<\/h1>\n<p>1.\u6dfb\u52a0\u7528\u6237\u6839\u5bc6\u7801root123<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">rabbitmqctl add_user root root123<\/pre>\n<p>2.\u8bbe\u7f6e\u7528\u6237\u6839\u4e3a\u7ba1\u7406\u5458\u89d2\u8272<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">rabbitmqctl set_user_tags root administrator<\/pre>\n<p>3.\u8bbe\u7f6e\u8bbf\u95ee\u6743\u9650<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">rabbitmqctl set_permissions -p \/ root\u201c.*\u201d\u201c.*\u201d\u201c.*\u201d<\/pre>\n<p>4.\u5176\u4ed6<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\u5217\u51fa\u7528\u6237 \uff1a rabbitmqctl list_users\r\n\u65b0\u5efa\u7528\u6237\uff1arabbitmqctl add_user xxx pwd\r\n\u5220\u9664\u7528\u6237:   rabbitmqctl delete_user xxx\r\n\u6539\u5bc6\u7801: rabbimqctlchange_password {username} {newpassword}\r\n\u8bbe\u7f6e\u7528\u6237\u89d2\u8272\uff1arabbitmqctl set_user_tags {username} {tag ...}\r\nTag\u53ef\u4ee5\u4e3a administrator,monitoring, management\r\n<\/pre>\n<h1>10 \u901a\u8fc7 ip:15672\u8bbf\u95eerabbitmq\u4e3b\u9875\uff0c\u9ed8\u8ba4\u6709\u4e00\u4e2aguest\u3001 guest\u8d26\u6237<\/h1>\n<h1>\u5b89\u88c5\u5b9d\u5854<\/h1>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">yum install -y wget &amp;&amp; wget -O install.sh http:\/\/download.bt.cn\/install\/install.sh &amp;&amp; sh install.sh<\/pre>\n<p>\u5347\u7ea7\u5b9d\u5854<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">curl http:\/\/download.bt.cn\/install\/update_to_6.sh|bash<\/pre>\n<p>\u5b9d\u5854\u4fee\u6539redis\u5916\u90e8\u8bbf\u95ee<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">1&gt;\u6ce8\u91ca\u6389bind\r\n#bind 127.0.0.1\r\n2&gt;\u9ed8\u8ba4\u4e0d\u662f\u5b88\u62a4\u8fdb\u7a0b\u65b9\u5f0f\u8fd0\u884c\uff0c\u8fd9\u91cc\u53ef\u4ee5\u4fee\u6539\r\ndaemonize no\r\n3&gt;\u7981\u7528\u4fdd\u62a4\u6a21\u5f0f\r\nprotected-mode no<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u73af\u5883\uff1a centos7.2 rabbitmq\u4f9d\u8d56erlang\uff0c\u9700\u8981\u5148\u5b89\u88c5erlang 1 \u5b89\u88c5erlang r [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1608,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[102],"class_list":["post-1607","post","type-post","status-publish","format-standard","hentry","category-linux","tag-rabbitmq"],"_links":{"self":[{"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/posts\/1607","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1607"}],"version-history":[{"count":4,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/posts\/1607\/revisions"}],"predecessor-version":[{"id":1614,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/posts\/1607\/revisions\/1614"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=\/wp\/v2\/media\/1608"}],"wp:attachment":[{"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.siediyer.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}