{"id":290693,"date":"2024-04-02T21:31:53","date_gmt":"2024-04-02T13:31:53","guid":{"rendered":"https:\/\/lrxjmw.cn\/lfwqwhdrjmxx.html"},"modified":"2024-04-02T21:31:53","modified_gmt":"2024-04-02T13:31:53","slug":"lfwqwhdrjmxx","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lfwqwhdrjmxx.html","title":{"rendered":"Linux\u670d\u52a1\u5668\u7ef4\u62a4\u8fbe\u4eba\u63ed\u79d8\uff1a\u6d88\u606f\u961f\u5217MQ\u914d\u7f6e\u5168\u653b\u7565"},"content":{"rendered":"
\u8eab\u4e3a\u6770\u51fa\u7684Linux<\/a>\u670d\u52a1\u5668\u7ef4\u62a4\u4e13\u5bb6\uff0c\u6df1\u8c19\u6d88\u606f\u961f\u5217\uff08MQ\uff09\u914d\u5236\u4e4b\u9053\u5b9e\u4e3a\u91cd\u4e2d\u4e4b\u91cd\u3002\u672c\u7bc7\u6587\u7ae0\u5bf9Linux\u73af\u5883\u4e0b MQ \u90e8\u7f72\u52a0\u4ee5\u7ec6\u81f4\u9610\u8ff0\uff0c\u5305\u62ec\u524d\u671f\u51c6\u5907\u63aa\u65bd\u3001\u5404\u7c7bMQ\u8f6f\u4ef6\u89e3\u6790\u3001\u8be6\u5c3d\u5b89\u88c5\u6b65\u9aa4\u53ca\u6280\u672f\u8c03\u6574\u91cd\u70b9\u548c\u5e38\u89c1\u95ee\u9898\u89e3\u51b3\u5bf9\u7b56\u7b49\u5173\u952e\u5185\u5bb9\u3002<\/p>\n 1.\u51c6\u5907\u5de5\u4f5c<\/b><\/p>\n \u5728\u5b89\u88c5Linux\u6d88\u606f\u961f\u5217\u524d\uff0c\u9700\u7cbe\u5fc3\u505a\u8db3\u5145\u5206\u51c6\u5907\u5de5\u4f5c\u3002\u6b64\u8fc7\u7a0b\u5e94\u5305\u62ec\u8bc4\u4f30\u64cd\u4f5c\u7cfb\u7edf<\/a>\u548c\u786c\u4ef6\u662f\u5426\u6ee1\u8db3\u9700\u6c42linux mq \u5b89\u88c5<\/strong>\uff0c\u786e\u8ba4\u7f51\u7edc\u73af\u5883\u53ca\u9632\u706b\u5899\u8bbe\u5b9a\u65e0\u8bef\u3002\u540c\u65f6\uff0c\u5bf9\u9009\u53d6\u7684\u6d88\u606f\u961f\u5217\u8f6f\u4ef6\u6709\u6df1\u5165\u7406\u89e3\uff0c\u8fd9\u6837\u6709\u52a9\u4e8e\u672a\u6765\u7cfb\u7edf\u6784\u5efa\u4e0e\u914d\u7f6e\u7684\u6d41\u7545\u5b8c\u6210\u3002<\/p>\n \u786e\u4fdd\u6d88\u606f\u6392\u961f\u8f6f\u4ef6\u7a33\u5065\u8fd0\u884c\uff0c\u9996\u8981\u6b65\u9aa4\u662f\u786e\u8ba4\u6240\u7528\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u5904\u4e8e\u5176\u652f\u6301\u8303\u56f4\u5185\uff1b\u540c\u6837\u91cd\u8981\u7684\u662f\u4fdd\u8bc1\u8ba1\u7b97\u673a\u6709\u8db3\u591f\u7684\u5185\u5b58\u53ca\u786c\u76d8\u5b58\u50a8\u7a7a\u95f4\u3002\u6b64\u5916\uff0c\u9632\u8303\u5899\u5728\u4fdd\u969c\u961f\u5217\u901a\u8baf\u7545\u901a\u65b9\u9762\u53d1\u6325\u5173\u952e\u4f5c\u7528\uff0c\u9700\u914c\u60c5\u8bbe\u5b9a\u6216\u5f00\u901a\u9002\u5f53\u7684\u901a\u9053\u3002<\/p>\n <\/p>\n 2. MQ\u8f6f\u4ef6\u4ecb\u7ecd<\/b><\/p>\n Linux\u73af\u5883\u4e0b\u6709\u591a\u79cd\u6d88\u606f\u961f\u5217\u6280\u672f\u53ef\u9009\uff0c\u5982RabbitMQ\uff08AMQP\u5b98\u65b9\u5f00\u6e90<\/a>\u5b9e\u8df5\uff09\u3001ActiveMQ\uff08Apache\u57fa\u91d1\u4f1a\u81f4\u529b\u4e8e\u5f00\u53d1\u7684\u5f00\u6e90\u9879\u76ee\uff09\u4ee5\u53caKafka\u7b49\u7b49\u3002RabbitMQ\u63d0\u4f9b\u4e30\u5bcc\u7684\u7f16\u7a0b\u8bed\u8a00\u652f\u6301\uff0c\u800cActiveMQ\u5219\u4e13\u6ce8\u4e8e\u6ee1\u8db3JMS\u89c4\u8303\u9700\u6c42\u3002\u6700\u540e\uff0cKafka\u4f5c\u4e3a\u4e00\u4e2a\u62e5\u6709\u6781\u9ad8\u541e\u5410\u91cf\u7684\u5206\u5e03\u5f0f\u53d1\u5e03\/\u8ba2\u9605\u6d88\u606f\u7cfb\u7edf\uff0c\u65e0\u7591\u662f\u60a8\u503c\u5f97\u4fe1\u8d56\u7684\u9996\u9009\u3002<\/p>\n \u8003\u8651\u9009\u7528\u4f55\u79cd\u6d88\u606f\u961f\u5217\u8f6f\u4ef6\u65f6\uff0c\u9700\u4ee5\u5b9e\u9645\u4e1a\u52a1\u9700\u6c42\u4e0e\u6280\u672f\u5806\u6808\u4e3a\u6807\u51c6\uff0c\u8fdb\u884c\u6df1\u5165\u6743\u8861\uff1b\u4e14\u5bf9\u5404\u7c7b\u8f6f\u4ef6\u6709\u5145\u5206\u7684\u8ba4\u8bc6\u4f3c\u5c24\u4e3a\u5173\u952e\uff0c\u5176\u4e2d\u6d89\u53ca\u5230\u67b6\u6784\u3001\u529f\u80fd\u7279\u6027\u53ca\u6027\u80fd\u8868\u73b0\u7b49\u5404\u4e2a\u65b9\u9762\u3002<\/p>\n <\/p>\n 3.\u5b89\u88c5\u6b65\u9aa4<\/b><\/p>\n \u8fd0\u7528Linux\u5185\u6838\u8f6f\u4ef6LMQ\u8fdb\u884c\u5b89\u88c5\uff0c\u7701\u53bb\u7e41\u7410\u6b65\u9aa4\uff0c\u64cd\u4f5c\u7b80\u4fbf\u5feb\u6377\u3002\u4e00\u822c\u800c\u8a00\uff0c\u6211\u4eec\u4ec5\u9700\u501f\u52a9\u73b0\u6210\u7684\u5305\u7ba1\u7406\u5de5\u5177\u6216\u8005\u662f\u5b98\u65b9\u53d1\u5e03\u7684\u5b89\u88c5\u5305\u5c31\u80fd\u8f7b\u6613\u5b8c\u6210\u6b64\u8fc7\u7a0b\u3002\u4ee5Ubuntu\u7cfb\u7edf\u4e3a\u4f8b\uff0c\u8fdb\u884cRabbitMQ\u670d\u52a1\u5668\u7684\u5b89\u88c5\u53ea\u9700\u8f93\u5165\"sudo apt-get install rabbitmq-server\"\u6307\u4ee4\uff1b\u800c\u5bf9\u4e8eCentOS\u7cfb\u7edf\uff0c\u540c\u6837\u7b80\u5355\u5730\u6267\u884c\"sudo yum install rabbitmq-server\"\u5c31\u53ef\u5b8c\u6210\u914d\u7f6e\u4e86\u3002<\/p>\n \u5728\u5168\u90e8\u5b8c\u6210\u5b89\u88c5\u540e\uff0c\u52a1\u5fc5\u8981\u542f\u52a8\u76f8\u5173\u7684\u670d\u52a1\uff0c\u5e76\u786e\u4fdd\u5b83\u4eec\u80fd\u5b9e\u73b0\u81ea\u52a8\u542f\u52a8\u7684\u80fd\u529b\u3002\u4e3a\u8fbe\u6b64\u76ee\u7684\uff0c\u63a8\u8350\u4f9d\u7167\u4e0b\u5217\u6307\u793a\u8fdb\u884c\u64cd\u4f5c\uff1a\u901a\u8fc7\u6267\u884c`sudo systemctl start rabbitmq-server`\u53ca`sudo systemctl enable rabbitmq-server`\u547d\u4ee4<\/a>\uff0c\u5373\u53ef\u542f\u52a8\u4e0e\u914d\u7f6eRabbitMQ-Server\u7684\u9ed8\u8ba4\u5f00\u673a\u542f\u52a8\u529f\u80fd\u3002<\/p>\n 4.\u914d\u7f6e\u65b9\u6cd5<\/b><\/p>\n