@@ -5,48 +5,52 @@ sidebar_position: 1
55
66# 🛠 源码部署
77
8- ## 1. 环境及组件要求
8+ ## 1. 环境及组件要求
9+
910对于服务器环境、系统、以及所依赖组件的说明可以参考[ 此文档] ( ./env-comp )
1011
11- ## 2. 部署 OpenIM Server (IM)
12+ ## 2. 部署 OpenIM Server (IM)
13+
14+ ### 2.1 clone 仓库 建议切换到 release-v3.8 分支
1215
13- ### 2.1 clone仓库 建议切换到release-v3.8分支
1416```
1517git clone https://github.com/openimsdk/open-im-server && cd open-im-server
1618```
1719
18- ### 2.2 部署组件 (mongodb/redis/zookeeper/kafka/MinIO等)
20+ ### 2.2 部署组件 (mongodb/redis/zookeeper/kafka/MinIO 等)
21+
1922```
2023docker compose up -d
2124```
2225
26+ ### 2.3 设置外网 IP 或域名[ 参考 Nginx 配置] ( ./nginxDomainConfig.mdx )
2327
24- ### 2.3 设置外网IP 或域名[ 参考Nginx配置] ( ./nginxDomainConfig.mdx )
2528```
26- 修改config /minio.yml中的externalAddress为http ://外网IP:port 或 域名
27- 修改config /openim-api.yml中的grafanaURL : http://127.0.0.1:13000/为http ://外网IP:port 或 域名
29+ 修改 config /minio.yml 中的 externalAddress 为 http ://外网IP:port 或 域名
30+ 修改 config /openim-api.yml 中的 grafanaURL : http://127.0.0.1:13000/ 为 http ://外网IP:port 或 域名
2831```
2932
30-
3133### 2.4 🛠️ 初始化
32- 第一次编译前,linux/mac平台下执行:
34+
35+ 第一次编译前,linux/mac 平台下执行:
36+
3337```
3438bash bootstrap.sh
3539```
36- windows执行
40+
41+ windows 执行
42+
3743```
3844bootstrap.bat
3945```
4046
47+ ### 2.5 🛠️ 编译(linux/windows/mac 平台均可用)
4148
42-
43- ### 2.5 🛠️ 编译(linux/windows/mac平台均可用)
4449```
4550mage
4651```
4752
48-
49- ### 2.6 🚀 启动/停止/检测(linux/windows/mac平台均可用)
53+ ### 2.6 🚀 启动/停止/检测(linux/windows/mac 平台均可用)
5054
5155```
5256# 启动
@@ -59,34 +63,39 @@ mage stop
5963mage check
6064```
6165
62-
6366### 2.7 其他配置项修改
67+
6468[ 参考链接] ( https://github.com/openimsdk/open-im-server/blob/main/config/README.md )
6569
70+ ## 3. 部署 App Server (Chat)
6671
72+ ### 3.1 clone 仓库 建议切换到 release-v1.8 分支
6773
68- ## 3. 部署 App Server (Chat)
69- ### 3.1 clone仓库 建议切换到release-v1.8分支
7074```
7175git clone https://github.com/openimsdk/chat&& cd chat
7276```
77+
7378### 3.2 🛠️ 初始化
74- 第一次编译前,linux/mac平台下执行:
79+
80+ 第一次编译前,linux/mac 平台下执行:
81+
7582```
7683bash bootstrap.sh
7784```
78- windows执行
85+
86+ windows 执行
87+
7988```
8089bootstrap.bat
8190```
8291
83- ### 3.3 🛠️ 编译(linux/windows/mac平台均可用)
92+ ### 3.3 🛠️ 编译(linux/windows/mac 平台均可用)
93+
8494```
8595mage
8696```
8797
88-
89- ### 3.4 🚀 启动/停止/检测(linux/windows/mac平台均可用)
98+ ### 3.4 🚀 启动/停止/检测(linux/windows/mac 平台均可用)
9099
91100```
92101# 启动
@@ -101,21 +110,20 @@ mage check
101110```
102111
103112### 3.5 其他配置项修改
104- [ 参考链接] ( https://github.com/openimsdk/chat/blob/main/config/README.md )
105113
114+ [ 参考链接] ( https://github.com/openimsdk/chat/blob/main/config/README.md )
106115
107116---
117+
108118---
109119
110- ## 以下是release-v3.6及之前的版本部署流程
120+ ## 以下是 release-v3.6 及之前的版本部署流程
121+
111122## 2. 部署 OpenIM Server (IM)
112123
113124### 2.1 📡 设置 OPENIM_IP
114125
115-
116-
117-
118- 🔔 ** 必须要设置OPENIM_IP,且不能是127.0.0.1**
126+ 🔔 ** 必须要设置 OPENIM_IP,且不能是 127.0.0.1**
119127
120128```
121129# 如果服务器有外网IP
@@ -125,16 +133,10 @@ export OPENIM_IP="外网IP"
125133export OPENIM_IP="内网IP"
126134```
127135
128-
129-
130-
131-
132-
133-
134- ### 2.2 🏗️ 部署组件 (mongodb/redis/zookeeper/kafka/MinIO等)
136+ ### 2.2 🏗️ 部署组件 (mongodb/redis/zookeeper/kafka/MinIO 等)
135137
136138```
137- git clone https://github.com/OpenIMSDK /open-im-server && cd open-im-server
139+ git clone https://github.com/openimsdk /open-im-server && cd open-im-server
138140# 建议切换到release-v3.6及以后的release分支
139141make init && docker compose up -d
140142
@@ -163,12 +165,13 @@ make check
163165
164166## 3. 部署 App Server (Chat)
165167
166- ### 3.1 🏗️ clone chat仓库
168+ ### 3.1 🏗️ clone chat 仓库
169+
167170```
168171#返回上一级目录
169172cd ..
170173# clone仓库 建议切换到release-v1.6及以后的release分支
171- git clone https://github.com/OpenIMSDK /chat chat && cd chat
174+ git clone https://github.com/openimsdk /chat chat && cd chat
172175```
173176
174177### 3.2 🛠️ 编译
@@ -207,11 +210,11 @@ make check
207210
208211### 6.1 🛠️ 共用配置项的修改
209212
210- | 配置项 | 需要修改的文件 | 操作 |
211- | --- | --- | --- |
212- | mongo/kafka/minio 相关 | .env, openim-server/config/config.yaml | 需重启组件和 IM |
213- | redis/zookeeper 相关 | .env, openim-server/config/config.yaml, chat/config/config.yaml | 需重启组件、IM 和 Chat |
214- | SECRET | openim-server/config/config.yaml, chat/config/config.yaml | 需重启 IM 和 Chat |
213+ | 配置项 | 需要修改的文件 | 操作 |
214+ | ---------------------- | --------------------------------------------------------------- | ------------------- --- |
215+ | mongo/kafka/minio 相关 | .env, openim-server/config/config.yaml | 需重启组件和 IM |
216+ | redis/zookeeper 相关 | .env, openim-server/config/config.yaml, chat/config/config.yaml | 需重启组件、IM 和 Chat |
217+ | SECRET | openim-server/config/config.yaml, chat/config/config.yaml | 需重启 IM 和 Chat |
215218
216219### 6.2 🔄 共用配置项中特殊配置项的修改
217220
@@ -230,25 +233,22 @@ object:
230233grafanaUrl: http: // $OPENIM_IP:$GRAFANA_PORT
231234```
232235
233-
2342363 . 在 ** ` chat/config/config.yaml ` ** 中按照规则修改配置
235237
236238``` jsx
237239如果IM 在Chat不在同一台机器上,则需将127.0 .0 .1 替换成IM 所在机器的IP
238240openIMUrl: " http://127.0.0.1:$API_OPENIM_PORT"
239241```
240242
241-
242-
2432434 . 重启 IM 和 Chat
244244
245245### 6.3 🛠️ 其他配置项的修改
246246
247247对于 ** ` .env ` ** 、** ` chat/config/config.yaml ` ** 和 ** ` openim-server/config/config.yaml ` ** 中的其他配置项,可以单独修改相应文件中的这些配置项。
248248
249-
250249### 6.4 端口的修改
251- 特别注意的是,对于IM相关任何端口的修改,都需要同步修改open-im-server/scripts/install/environment.sh中的端口
250+
251+ 特别注意的是,对于 IM 相关任何端口的修改,都需要同步修改 open-im-server/scripts/install/environment.sh 中的端口
252252
253253---
254254
@@ -261,20 +261,14 @@ openIMUrl: "http://127.0.0.1:$API_OPENIM_PORT"
261261- 运行时日志,启动成功后定位问题时查看:` _output/logs/openim-all* `
262262- 启动时日志,启动有错误时查看:` _output/logs/openim-*.log `
263263
264-
265-
266264### 7.2 🚀 启动顺序
267265
268266启动顺序如下:
269267
270- - IM 依赖的组件:mongo/redis/kafka/zookeeper/minio等
268+ - IM 依赖的组件:mongo/redis/kafka/zookeeper/minio 等
271269- ** IM**
272270- ** Chat**
273271
274272### 7.3 🐳 Docker 版本
275273
276- 新版 Docker 已经整合了 docker-compose. 老版本的 Docker 可能不支持 gateway 功能❌。我们建议您升级到较新的版本,例如 ` 23.0.1 ` 🔝
277-
278-
279-
280-
274+ 新版 Docker 已经整合了 docker-compose. 老版本的 Docker 可能不支持 gateway 功能 ❌。我们建议您升级到较新的版本,例如 ` 23.0.1 ` 🔝
0 commit comments