{"id":4391,"date":"2024-09-22T22:08:04","date_gmt":"2024-09-22T14:08:04","guid":{"rendered":"https:\/\/www.zeroheart.xyz\/wordpress\/?p=4391"},"modified":"2024-09-22T22:08:04","modified_gmt":"2024-09-22T14:08:04","slug":"%e9%83%a8%e7%bd%b2openim","status":"publish","type":"post","link":"https:\/\/www.zeroheart.xyz\/wordpress\/?p=4391","title":{"rendered":"\u90e8\u7f72openIM"},"content":{"rendered":"\n<p>\u6765\u6e90\uff1a<a href=\"https:\/\/zhuanlan.zhihu.com\/p\/677268748\">\ud83d\udee0 \u5373\u65f6\u901a\u8baf\uff08IM\uff09\u5f00\u6e90\u9879\u76eeOpenIM docker comose\u90e8\u7f72\u6307\u5357 &#8211; \u77e5\u4e4e (zhihu.com)<\/a><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udee0 \u5373\u65f6\u901a\u8baf\uff08IM\uff09\u5f00\u6e90\u9879\u76eeOpenIM docker comose\u90e8\u7f72\u6307\u5357<\/h1>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.zhihu.com\/people\/liu-liu-24-41-47\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"100\" height=\"100\" src=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image.png\" alt=\"OpenIM\" class=\"wp-image-4392\"\/><\/a><\/figure>\n\n\n\n<p><a href=\"https:\/\/www.zhihu.com\/people\/liu-liu-24-41-47\" target=\"_blank\" rel=\"noreferrer noopener\">OpenIM<\/a><\/p>\n\n\n\n<p>\u5f00\u6e90OpenIM\u4f5c\u8005 IM\u9ad8\u7ea7\u67b6\u6784\u5e08 IM\/WebRTC\u4e13\u5bb6\u200b\u5173\u6ce8\u4ed6<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u5373\u65f6\u901a\u8baf\uff08IM\uff09<a href=\"https:\/\/zhida.zhihu.com\/search?q=%E5%BC%80%E6%BA%90%E9%A1%B9%E7%9B%AE&amp;zhida_source=entity&amp;is_preview=1\" target=\"_blank\" rel=\"noreferrer noopener\">\u5f00\u6e90\u9879\u76ee<\/a>OpenIM docker comose\u90e8\u7f72\u6307\u5357<\/strong><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. \u73af\u5883\u53ca\u7ec4\u4ef6\u8981\u6c42<\/strong><\/h2>\n\n\n\n<p>OpenIM\u7684\u90e8\u7f72\u5305\u62ec\u591a\u4e2a\u7ec4\u4ef6\uff0c\u5e76\u4e14\u652f\u6301\u5305\u62ec\u6e90\u7801\u3001Docker\u548cKubernetes\u5728\u5185\u7684\u591a\u79cd\u65b9\u5f0f\u3002\u8fd9\u5c31\u8981\u6c42\u6211\u4eec\u65e2\u8981\u786e\u4fdd\u4e0d\u540c\u90e8\u7f72\u65b9\u6cd5\u4e4b\u95f4\u7684\u76f8\u4e92\u517c\u5bb9\uff0c\u53c8\u8981\u6709\u6548\u7ba1\u7406\u4e0d\u540c\u7248\u672c\u4e4b\u95f4\u7684\u5dee\u5f02\u3002\u8fd9\u65e0\u7591\u662f\u4e00\u4e2a\u6d89\u53ca\u6280\u672f\u6df1\u5ea6\u548c\u7cbe\u786e\u7cfb\u7edf\u914d\u7f6e\u7684\u590d\u6742\u4efb\u52a1\u3002\u6211\u4eec\u81f4\u529b\u4e8e\u4f7f\u90e8\u7f72\u8fc7\u7a0b\u66f4\u52a0\u7b80\u5316\uff0c\u540c\u65f6\u4fdd\u8bc1\u7cfb\u7edf\u7684\u7075\u6d3b\u6027\u548c\u7a33\u5b9a\u6027\uff0c\u4ee5\u6ee1\u8db3\u5404\u79cd\u7528\u6237\u9700\u6c42\u3002\u76ee\u524d\uff0c\u6211\u4eec\u5df2\u7ecf\u57283.5\u7248\u672c\u4e2d\u5b9e\u73b0\u4e86\u90e8\u7f72\u6d41\u7a0b\u7684\u7b80\u5316\uff0c\u5e76\u4e14\u5c06\u5bf9\u8fd9\u4e2a\u7248\u672c\u8fdb\u884c\u957f\u671f\u7ef4\u62a4\uff0c\u671f\u5f85\u5927\u5bb6\u7684\u4f7f\u7528\u4f53\u9a8c\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>1. \u73af\u5883\u53ca\u7ec4\u4ef6\u8981\u6c42<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u73af\u5883\u8981\u6c42<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>\u6ce8\u610f\u4e8b\u9879<\/th><th>\u8be6\u7ec6\u8bf4\u660e<\/th><\/tr><tr><td>\u64cd\u4f5c\u7cfb\u7edf<\/td><td>Linux \u7cfb\u7edf<\/td><\/tr><tr><td>\u786c\u4ef6\u8d44\u6e90<\/td><td>\u81f3\u5c11 4G \u53ef\u7528\u5185\u5b58<\/td><\/tr><tr><td>Golang<\/td><td>v1.19 \u6216\u66f4\u9ad8<\/td><\/tr><tr><td>Docker<\/td><td>v24.0.5 \u6216\u66f4\u9ad8<\/td><\/tr><tr><td>Git<\/td><td>v2.17.1 \u6216\u66f4\u9ad8<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u5b58\u50a8\u7ec4\u4ef6\u8981\u6c42<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>\u5b58\u50a8\u7ec4\u4ef6<\/th><th>\u5efa\u8bae\u7248\u672c<\/th><\/tr><tr><td>MongoDB<\/td><td>v6.0.2 \u6216\u66f4\u9ad8<\/td><\/tr><tr><td>Redis<\/td><td>v7.0.0 \u6216\u66f4\u9ad8<\/td><\/tr><tr><td>Zookeeper<\/td><td>v3.8<\/td><\/tr><tr><td>Kafka<\/td><td>v3.5.1<\/td><\/tr><tr><td>MySQL<\/td><td>v5.7 \u6216\u66f4\u9ad8<\/td><\/tr><tr><td>MinIO<\/td><td>\u6700\u65b0\u7248\u672c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2. docker\u90e8\u7f72<\/strong><\/h2>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2.1 \u514b\u9686\u4ed3\u5e93\u5e76\u521d\u59cb\u5316<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>git clone https:\/\/github.com\/openimsdk\/openim-docker openim-docker &amp;&amp; cd openim-docker &amp;&amp; make init\n\u200b<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2.2 \u8bbe\u7f6eOPENIM_IP<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5982\u679c\u670d\u52a1\u5668\u6709\u5916\u7f51IP \nexport OPENIM_IP=\"\u5916\u7f51IP\"\n# \u5982\u679c\u4ec5\u63d0\u4f9b\u5185\u7f51\u670d\u52a1\nexport OPENIM_IP=\"\u5185\u7f51IP\"<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>2.3 \u542f\u52a8\u670d\u52a1\u53ca\u67e5\u770b\u65e5\u5fd7<\/strong><\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose up -d\ndocker ps\ndocker compose logs -f openim-chat\ndocker compose logs -f openim-server<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>3. \u5feb\u901f\u9a8c\u8bc1<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u5f00\u653e\u7aef\u53e3<\/strong><\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>IM \u7aef\u53e3<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>TCP \u7aef\u53e3<\/th><th>\u8bf4\u660e<\/th><th>\u64cd\u4f5c<\/th><\/tr><tr><td>TCP:10001<\/td><td>ws \u534f\u8bae\uff0c\u6d88\u606f\u7aef\u53e3\uff0c\u7528\u4e8e<a href=\"https:\/\/zhida.zhihu.com\/search?q=%E5%AE%A2%E6%88%B7%E7%AB%AF&amp;zhida_source=entity&amp;is_preview=1\" target=\"_blank\" rel=\"noreferrer noopener\">\u5ba2\u6237\u7aef<\/a>&nbsp;SDK<\/td><td>\u7aef\u53e3\u653e\u884c<\/td><\/tr><tr><td>TCP:10002<\/td><td>api \u7aef\u53e3\uff0c\u5982\u7528\u6237\u3001\u597d\u53cb\u3001\u7fa4\u7ec4\u3001\u6d88\u606f\u7b49\u63a5\u53e3<\/td><td>\u7aef\u53e3\u653e\u884c<\/td><\/tr><tr><td>TCP:10005<\/td><td>\u9009\u62e9 MinIO \u5b58\u50a8\u65f6\u9700\u8981\uff08OpenIM \u9ed8\u8ba4\u4f7f\u7528 MinIO \u5b58\u50a8\uff09<\/td><td>\u7aef\u53e3\u653e\u884c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Chat \u7aef\u53e3<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>TCP \u7aef\u53e3<\/th><th>\u8bf4\u660e<\/th><th>\u64cd\u4f5c<\/th><\/tr><tr><td>TCP:10008<\/td><td>\u4e1a\u52a1\u7cfb\u7edf\uff0c\u5982\u6ce8\u518c\u3001\u767b\u5f55\u7b49<\/td><td>\u7aef\u53e3\u653e\u884c<\/td><\/tr><tr><td>TCP:10009<\/td><td>\u7ba1\u7406\u540e\u53f0\uff0c\u5982\u7edf\u8ba1\u3001\u5c01\u53f7\u7b49<\/td><td>\u7aef\u53e3\u653e\u884c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>PC Web \u53ca\u7ba1\u7406\u540e\u53f0\u524d\u7aef\u8d44\u6e90\u7aef\u53e3<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>TCP \u7aef\u53e3<\/th><th>\u8bf4\u660e<\/th><th>\u64cd\u4f5c<\/th><\/tr><tr><td>TCP:11001<\/td><td>PC Web \u524d\u7aef\u8d44\u6e90<\/td><td>\u7aef\u53e3\u653e\u884c<\/td><\/tr><tr><td>TCP:11002<\/td><td>\u7ba1\u7406\u540e\u53f0\u524d\u7aef\u8d44\u6e90<\/td><td>\u7aef\u53e3\u653e\u884c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Grafana \u7aef\u53e3<\/strong><\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><th>TCP \u7aef\u53e3<\/th><th>\u8bf4\u660e<\/th><th>\u64cd\u4f5c<\/th><\/tr><tr><td>TCP:13000<\/td><td>grafana\u7aef\u53e3<\/td><td>\u7aef\u53e3\u653e\u884c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>4. \u9a8c\u8bc1<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>PC Web \u9a8c\u8bc1<\/strong><\/h3>\n\n\n\n<p><strong>\u63d0\u793a<\/strong>: \u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165&nbsp;<code>http:\/\/ip:11001<\/code>&nbsp;\u6765\u8bbf\u95ee PC Web\u3002\u6b64 IP \u5e94\u4e3a\u670d\u52a1\u7aef&nbsp;<code>OPENIM_IP<\/code>\uff0c\u786e\u4fdd\u6d4f\u89c8\u5668\u80fd\u8bbf\u95ee\u3002\u9996\u6b21\u4f7f\u7528\u8bf7\u901a\u8fc7\u624b\u673a\u53f7\u6ce8\u518c\uff0c\u9a8c\u8bc1\u7801\u9ed8\u8ba4\u4e3a&nbsp;<code>666666<\/code>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"437\" src=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-3.webp\" alt=\"\" class=\"wp-image-4396\" srcset=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-3.webp 720w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-3-300x182.webp 300w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/figure>\n\n\n\n<p><em>\u56fe\uff1aPC Web \u63a5\u53e3\u793a\u4f8b<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>App \u9a8c\u8bc1<\/strong><\/h3>\n\n\n\n<p>\u626b\u63cf\u4ee5\u4e0b\u4e8c\u7ef4\u7801\u6216\u70b9\u51fb&nbsp;<a href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/www.pgyer.com\/OpenIM-Flutter\" target=\"_blank\" rel=\"noreferrer noopener\">\u8fd9\u91cc<\/a>&nbsp;\u8fdb\u884c\u4e0b\u8f7d\u3002<\/p>\n\n\n\n<p><em>\u56fe\uff1aApp \u4e0b\u8f7d\u4e8c\u7ef4\u7801<\/em><\/p>\n\n\n\n<p><strong>\u63d0\u793a<\/strong>: \u53cc\u51fb OpenIM \u540e\u4fee\u6539 IP \u4e3a\u670d\u52a1\u7aef&nbsp;<code>OPENIM_IP<\/code>&nbsp;\u518d\u91cd\u542f App\u3002\u8bf7\u786e\u4fdd\u5f00\u653e\u76f8\u5173\u7aef\u53e3\uff0c\u5e76\u5728\u4fee\u6539\u540e\u91cd\u542f App\u3002\u9996\u6b21\u4f7f\u7528\u8bf7\u5148\u901a\u8fc7\u624b\u673a\u53f7\u6ce8\u518c\uff0c\u9a8c\u8bc1\u7801\u9ed8\u8ba4\u4e3a&nbsp;<code>666666<\/code>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"1488\" src=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-2.webp\" alt=\"\" class=\"wp-image-4395\" srcset=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-2.webp 720w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-2-145x300.webp 145w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-2-495x1024.webp 495w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/figure>\n\n\n\n<p><em>\u56fe\uff1a\u670d\u52a1\u5668\u5730\u5740\u4fee\u6539 &#8211; \u6b65\u9aa4 1<\/em><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"1600\" src=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image.webp\" alt=\"\" class=\"wp-image-4393\" srcset=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image.webp 720w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-135x300.webp 135w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-461x1024.webp 461w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-691x1536.webp 691w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/figure>\n\n\n\n<p><em>\u56fe\uff1a\u670d\u52a1\u5668\u5730\u5740\u4fee\u6539 &#8211; \u6b65\u9aa4 2<\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>\u7ba1\u7406\u540e\u53f0\u9a8c\u8bc1<\/strong><\/h3>\n\n\n\n<p>\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165&nbsp;<code>http:\/\/ip:11002<\/code>&nbsp;\u6765\u8bbf\u95ee\u7ba1\u7406\u540e\u53f0\u3002\u6b64 IP \u5e94\u4e3a\u670d\u52a1\u7aef&nbsp;<code>OPENIM_IP<\/code>\uff0c\u786e\u4fdd\u60a8\u7684\u6d4f\u89c8\u5668\u80fd\u8bbf\u95ee\u3002\u9ed8\u8ba4\u8d26\u53f7\u548c\u5bc6\u7801\u5747\u4e3a&nbsp;<code>chatAdmin<\/code>\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"374\" src=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-1.webp\" alt=\"\" class=\"wp-image-4394\" srcset=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-1.webp 720w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-1-300x156.webp 300w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/figure>\n\n\n\n<p><em>\u56fe\uff1a\u7ba1\u7406\u540e\u53f0\u754c\u9762<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>5. \u5173\u4e8e\u914d\u7f6e\u9879\u7684\u4fee\u6539<\/strong><\/h2>\n\n\n\n<p>\u6b64\u9879\u76ee\u914d\u7f6e\u9879\u8f83\u4e3a\u590d\u6742\uff0c\u4e3b\u8981\u662f\u67d0\u4e9b\u914d\u7f6e\u9879\u6d89\u53ca\u5230<strong><code>.env<\/code><\/strong>\u3001<strong><code>openim-chat\/config\/config.yaml<\/code><\/strong>&nbsp;\u548c&nbsp;<strong><code>openim-server\/config\/config.yaml<\/code><\/strong>\u591a\u4e2a\u6587\u4ef6\uff0c\u914d\u7f6e\u9879\u7684\u4fee\u6539\u8bf4\u660e\u5206\u4e3a\u4e24\u4e2a\u90e8\u5206\uff0c\u5206\u522b\u662f\u5171\u7528\u914d\u7f6e\u9879\u7684\u4fee\u6539\u548c\u5176\u4ed6\u914d\u7f6e\u9879\u7684\u4fee\u6539\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.1 \u5171\u7528\u914d\u7f6e\u9879<\/strong><\/h3>\n\n\n\n<p><strong><code>.env<\/code><\/strong>\u3001<strong><code>openim-chat\/config\/config.yaml<\/code><\/strong>&nbsp;\u548c&nbsp;<strong><code>openim-server\/config\/config.yaml<\/code><\/strong>&nbsp;\u5171\u7528\u7684\u914d\u7f6e\u9879\uff1a<\/p>\n\n\n\n<ol>\n<li>mysql\/mongo\/redis\/kafka\/zookeeper\/minio \u7aef\u53e3\u53ca\u5bc6\u7801\uff1b<\/li>\n\n\n\n<li>SECRET\uff1b<\/li>\n\n\n\n<li>API_OPENIM_PORT\uff1b<\/li>\n\n\n\n<li>OPENIM_IP\uff1b<\/li>\n\n\n\n<li>MINIO_PORT;<\/li>\n\n\n\n<li>GRAFANA_PORT<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.2 \u4fee\u6539\u65b9\u6cd5<\/strong><\/h3>\n\n\n\n<p>\u5bf9\u4e8e5.1\u5171\u7528\u914d\u7f6e\u9879\u7684\u4fee\u6539\uff0c\u4ee5\u4e0b\u4e24\u79cd\u65b9\u5f0f\u4e8c\u9009\u4e00\u3002<\/p>\n\n\n\n<p>\u65b9\u5f0f\u4e00\uff1a\u6240\u6709\u914d\u7f6e\u91cd\u65b0\u751f\u6210<\/p>\n\n\n\n<p>\u5982\u679c\u9700\u8981\u5168\u9762\u66f4\u65b0\u914d\u7f6e\uff0c\u53ef\u4ee5\u91c7\u7528\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n\n\n\n<ol>\n<li>\u5220\u9664\u73b0\u6709\u914d\u7f6e\u6587\u4ef6\uff1a\u5220\u9664&nbsp;<strong><code>openim-server\/config\/config.yaml<\/code><\/strong>&nbsp;\u548c&nbsp;<strong><code>openim-chat\/config\/config.yaml<\/code><\/strong>&nbsp;\u6587\u4ef6\u3002<\/li>\n\n\n\n<li>\u4fee\u6539&nbsp;<code>.env<\/code>&nbsp;\u6587\u4ef6\uff1a\u66f4\u65b0&nbsp;<code><strong>.env<\/strong><\/code>&nbsp;\u6587\u4ef6\u4e2d\u7684\u76f8\u5173\u914d\u7f6e\u9879\u3002<\/li>\n\n\n\n<li>\u91cd\u65b0\u751f\u6210\u914d\u7f6e\u5e76\u91cd\u542f\u670d\u52a1\uff1a\u6267\u884c&nbsp;<strong><code>docker compose down ; docker compose up -d<\/code><\/strong>\uff0c\u8fd9\u5c06\u57fa\u4e8e&nbsp;<strong><code>.env<\/code><\/strong>&nbsp;\u6587\u4ef6\u4e2d\u7684\u65b0\u8bbe\u7f6e\u91cd\u65b0\u751f\u6210\u914d\u7f6e\u6587\u4ef6\uff0c\u5e76\u91cd\u542f\u670d\u52a1\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u65b9\u5f0f\u4e8c\uff1a\u5206\u522b\u4fee\u6539\u591a\u4e2a\u914d\u7f6e\u6587\u4ef6<\/p>\n\n\n\n<p>\u5982\u679c\u53ea\u9700\u90e8\u5206\u66f4\u65b0\u914d\u7f6e\uff0c\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<ol>\n<li>\u4fee\u6539&nbsp;<code>.env<\/code>&nbsp;\u6587\u4ef6\uff1a\u66f4\u65b0&nbsp;<code><strong>.env<\/strong><\/code>&nbsp;\u6587\u4ef6\u4e2d\u7684\u76f8\u5173\u914d\u7f6e\u9879\u3002<\/li>\n\n\n\n<li><a href=\"https:\/\/zhida.zhihu.com\/search?q=%E6%89%8B%E5%8A%A8%E6%9B%B4%E6%96%B0&amp;zhida_source=entity&amp;is_preview=1\" target=\"_blank\" rel=\"noreferrer noopener\">\u624b\u52a8\u66f4\u65b0<\/a>\u914d\u7f6e\u6587\u4ef6\uff1a\u6839\u636e&nbsp;<strong><code>.env<\/code><\/strong>&nbsp;\u6587\u4ef6\u7684\u4fee\u6539\uff0c\u76f8\u5e94\u5730\u66f4\u65b0&nbsp;<strong><code>openim-server\/config\/config.yaml<\/code><\/strong>&nbsp;\u548c&nbsp;<strong><code>openim-chat\/config\/config.yaml<\/code><\/strong>&nbsp;\u6587\u4ef6\u4e2d\u7684\u914d\u7f6e\u9879\u3002<\/li>\n\n\n\n<li>\u7279\u6b8a\u53d8\u91cf\u7684\u989d\u5916\u5904\u7406\uff1a\u5982\u679c\u4fee\u6539\u4e86&nbsp;<strong><code>OPENIM_IP<\/code><\/strong>\u3001<strong><code>API_OPENIM_PORT<\/code><\/strong>\u3001<strong><code>MINIO_PORT<\/code><\/strong>\u3001<strong><code>GRAFANA_PORT<\/code><\/strong>\uff0c\u5219\u9700\u8981\u5728&nbsp;<strong><code>openim-server\/config\/config.yaml<\/code><\/strong>&nbsp;\u4e2d\u66f4\u65b0\u4ee5\u4e0b\u914d\u7f6e\u9879\uff1a<br>object:<br>apiURL: &#8220;http:\/\/$OPENIM_IP:$API_OPENIM_PORT&#8221;<br>minio:<br>endpoint: &#8220;http:\/\/$DOCKER_BRIDGE_GATEWAY:$MINIO_PORT&#8221;<br>signEndpoint: &#8220;http:\/\/$OPENIM_IP:$MINIO_PORT&#8221;<br>\u200b<br>grafanaUrl: http:\/\/$OPENIM_IP:$GRAFANA_PORT<\/li>\n\n\n\n<li>\u91cd\u542f\u670d\u52a1\uff1a\u6267\u884c&nbsp;<strong><code>docker compose down ; docker compose up -d<\/code><\/strong>&nbsp;\u4ee5\u5e94\u7528\u66f4\u6539\u5e76\u91cd\u542f\u670d\u52a1\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5.3 \u5176\u4ed6\u914d\u7f6e\u9879\u7684\u4fee\u6539<\/strong><\/h3>\n\n\n\n<p>\u5bf9\u4e8e&nbsp;<strong><code>.env<\/code><\/strong>\u3001<strong><code>openim-chat\/config\/config.yaml<\/code><\/strong>&nbsp;\u548c&nbsp;<strong><code>openim-server\/config\/config.yaml<\/code><\/strong>&nbsp;\u4e2d\u7684\u975e\u5171\u7528\u53d8\u91cf\uff0c\u53ef\u4ee5\u5355\u72ec\u4fee\u6539\u76f8\u5e94\u6587\u4ef6\u4e2d\u7684\u8fd9\u4e9b\u914d\u7f6e\u9879\u3002\u6267\u884c&nbsp;<strong><code>docker compose down ; docker compose up -d<\/code><\/strong>&nbsp;\u4ee5\u5e94\u7528\u66f4\u6539\u5e76\u91cd\u542f\u670d\u52a1\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>\u2753 6. \u5e38\u89c1\u95ee\u9898<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. \u5173\u4e8e Docker \u7248\u672c<\/strong><\/h3>\n\n\n\n<p>\u65b0\u7248 Docker \u5df2\u7ecf\u6574\u5408\u4e86&nbsp;<a href=\"https:\/\/zhida.zhihu.com\/search?q=docker-compose&amp;zhida_source=entity&amp;is_preview=1\" target=\"_blank\" rel=\"noreferrer noopener\">docker-compose<\/a>. \u8001\u7248\u672c\u7684 Docker \u53ef\u80fd\u4e0d\u652f\u6301 gateway \u529f\u80fd\u274c\u3002\u6211\u4eec\u5efa\u8bae\u60a8\u5347\u7ea7\u5230\u8f83\u65b0\u7684\u7248\u672c\uff0c\u4f8b\u5982&nbsp;<code>23.0.1<\/code><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>7. \u5173\u4e8eOpenIM<\/strong><\/h2>\n\n\n\n<p>\u5f97\u76ca\u4e8e\u5e7f\u6cdb\u7684<a href=\"https:\/\/zhida.zhihu.com\/search?q=%E5%BC%80%E5%8F%91%E8%80%85&amp;zhida_source=entity&amp;is_preview=1\" target=\"_blank\" rel=\"noreferrer noopener\">\u5f00\u53d1\u8005<\/a>\u652f\u6301\uff0cOpenIM\u5728\u5f00\u6e90\u5373\u65f6\u901a\u8baf\uff08IM\uff09\u9886\u57df\u4fdd\u6301\u7740\u9886\u5148\u5730\u4f4d\uff0c\u5728Github\u4e0a\u7684\u661f\u6807\u6570\u91cf\u5df2\u7ecf\u8d85\u8fc712,000\u3002\u5728\u5f53\u524d\u5bf9\u6570\u636e\u548c\u9690\u79c1\u5b89\u5168\u65e5\u76ca\u91cd\u89c6\u7684\u80cc\u666f\u4e0b\uff0cIM\u79c1\u6709\u90e8\u7f72\u7684\u9700\u6c42\u4e0d\u65ad\u589e\u957f\uff0c\u8fd9\u4e0e\u4e2d\u56fd\u8f6f\u4ef6\u4ea7\u4e1a\u7684\u5feb\u901f\u53d1\u5c55\u8d8b\u52bf\u76f8\u5951\u5408\u3002\u7279\u522b\u662f\u5728\u653f\u5e9c\u548c\u4f01\u4e1a\u9886\u57df\uff0c\u968f\u7740\u4fe1\u606f\u6280\u672f\u7684\u98de\u901f\u53d1\u5c55\u548c\u521b\u65b0\u4ea7\u4e1a\u7684\u5e7f\u6cdb\u5e94\u7528\uff0c\u5bf9IM\u89e3\u51b3\u65b9\u6848\u7684\u9700\u6c42\u6025\u5267\u4e0a\u5347\u3002\u8fdb\u4e00\u6b65\u6765\u770b\uff0c\u534f\u540c\u529e\u516c\u8f6f\u4ef6\u5e02\u573a\u7684\u6301\u7eed\u6269\u5f20\u4f7f\u5f97\u201c\u5b89\u5168\u53ef\u63a7\u201d\u6210\u4e3a\u4e86\u4e00\u4e2a\u5173\u952e\u5c5e\u6027\u3002<\/p>\n\n\n\n<p>\u4ed3\u5e93\u5730\u5740\uff1a<a href=\"https:\/\/link.zhihu.com\/?target=https%3A\/\/github.com\/openimsdk\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/openimsdk<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"720\" height=\"712\" src=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-4.webp\" alt=\"\" class=\"wp-image-4397\" srcset=\"https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-4.webp 720w, https:\/\/www.zeroheart.xyz\/wordpress\/wp-content\/uploads\/2024\/09\/image-4-300x297.webp 300w\" sizes=\"(max-width: 720px) 100vw, 720px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6765\u6e90\uff1a\ud83d\udee0 \u5373\u65f6\u901a\u8baf\uff08IM\uff09\u5f00\u6e90\u9879\u76eeOpenIM docker comose\u90e8\u7f72\u6307\u5357 &#8211; \u77e5\u4e4e (z [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[285],"tags":[],"_links":{"self":[{"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/4391"}],"collection":[{"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4391"}],"version-history":[{"count":1,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/4391\/revisions"}],"predecessor-version":[{"id":4398,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/4391\/revisions\/4398"}],"wp:attachment":[{"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4391"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4391"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zeroheart.xyz\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4391"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}