平台存储库配置
附件文件(二进制文件)存放在storage服务器上,
在默认情况下服务器在启动时自动启动了一个ftp服务作为storage服务器.
在生产环境中推荐使用商用服务器来存储附件文件(二进制文件).
支持以下协议作为附件存储服务器:
ftp,ftps,webdav,cifs(samba)

配置外部存储服务配置文件

配置文件样例configSample/externalStorageSources.json
如果在o2server/config目录下没有externalStorageSources.json配置文件.可以将externalStorageSources.json配置文件从o2server/configSample目录下拷贝至o2server/config目录.
1
{
2
"file": [
3
{
4
"protocol": "webdav",
5
"username": "admin",
6
"password": "admin",
7
"host": "127.0.0.1",
8
"port": 8080.0,
9
"prefix": "",
10
"enable": true,
11
"weight": 100.0,
12
"name": "251",
13
"###protocol": "协议,可选值ftp,webdav###",
14
"###username": "登录用户名.###",
15
"###password": "登录密码.###",
16
"###host": "主机地址.###",
17
"###port": "端口.###",
18
"###prefix": "前缀路径.###",
19
"###enable": "是否启用###",
20
"###weight": "设置权重.###",
21
"###name": "存储节点名,对应存储名称,谨慎修改.###"
22
}
23
],
24
"processPlatform": [
25
{
26
"protocol": "webdav",
27
"username": "admin",
28
"password": "admin",
29
"host": "127.0.0.1",
30
"port": 8080.0,
31
"prefix": "",
32
"enable": true,
33
"weight": 100.0,
34
"name": "251",
35
"###protocol": "协议,可选值ftp,webdav###",
36
"###username": "登录用户名.###",
37
"###password": "登录密码.###",
38
"###host": "主机地址.###",
39
"###port": "端口.###",
40
"###prefix": "前缀路径.###",
41
"###enable": "是否启用###",
42
"###weight": "设置权重.###",
43
"###name": "存储节点名,对应存储名称,谨慎修改.###"
44
}
45
],
46
"mind": [
47
{
48
"protocol": "webdav",
49
"username": "admin",
50
"password": "admin",
51
"host": "127.0.0.1",
52
"port": 8080.0,
53
"prefix": "",
54
"enable": true,
55
"weight": 100.0,
56
"name": "251",
57
"###protocol": "协议,可选值ftp,webdav###",
58
"###username": "登录用户名.###",
59
"###password": "登录密码.###",
60
"###host": "主机地址.###",
61
"###port": "端口.###",
62
"###prefix": "前缀路径.###",
63
"###enable": "是否启用###",
64
"###weight": "设置权重.###",
65
"###name": "存储节点名,对应存储名称,谨慎修改.###"
66
}
67
],
68
"meeting": [
69
{
70
"protocol": "webdav",
71
"username": "admin",
72
"password": "admin",
73
"host": "127.0.0.1",
74
"port": 8080.0,
75
"prefix": "",
76
"enable": true,
77
"weight": 100.0,
78
"name": "251",
79
"###protocol": "协议,可选值ftp,webdav###",
80
"###username": "登录用户名.###",
81
"###password": "登录密码.###",
82
"###host": "主机地址.###",
83
"###port": "端口.###",
84
"###prefix": "前缀路径.###",
85
"###enable": "是否启用###",
86
"###weight": "设置权重.###",
87
"###name": "存储节点名,对应存储名称,谨慎修改.###"
88
}
89
],
90
"calendar": [
91
{
92
"protocol": "webdav",
93
"username": "admin",
94
"password": "admin",
95
"host": "127.0.0.1",
96
"port": 8080.0,
97
"prefix": "",
98
"enable": true,
99
"weight": 100.0,
100
"name": "251",
101
"###protocol": "协议,可选值ftp,webdav###",
102
"###username": "登录用户名.###",
103
"###password": "登录密码.###",
104
"###host": "主机地址.###",
105
"###port": "端口.###",
106
"###prefix": "前缀路径.###",
107
"###enable": "是否启用###",
108
"###weight": "设置权重.###",
109
"###name": "存储节点名,对应存储名称,谨慎修改.###"
110
}
111
],
112
"okr": [
113
{
114
"protocol": "webdav",
115
"username": "admin",
116
"password": "admin",
117
"host": "127.0.0.1",
118
"port": 8080.0,
119
"prefix": "",
120
"enable": true,
121
"weight": 100.0,
122
"name": "251",
123
"###protocol": "协议,可选值ftp,webdav###",
124
"###username": "登录用户名.###",
125
"###password": "登录密码.###",
126
"###host": "主机地址.###",
127
"###port": "端口.###",
128
"###prefix": "前缀路径.###",
129
"###enable": "是否启用###",
130
"###weight": "设置权重.###",
131
"###name": "存储节点名,对应存储名称,谨慎修改.###"
132
}
133
],
134
"cms": [
135
{
136
"protocol": "webdav",
137
"username": "admin",
138
"password": "admin",
139
"host": "127.0.0.1",
140
"port": 8080.0,
141
"prefix": "",
142
"enable": true,
143
"weight": 100.0,
144
"name": "251",
145
"###protocol": "协议,可选值ftp,webdav###",
146
"###username": "登录用户名.###",
147
"###password": "登录密码.###",
148
"###host": "主机地址.###",
149
"###port": "端口.###",
150
"###prefix": "前缀路径.###",
151
"###enable": "是否启用###",
152
"###weight": "设置权重.###",
153
"###name": "存储节点名,对应存储名称,谨慎修改.###"
154
}
155
],
156
"bbs": [
157
{
158
"protocol": "webdav",
159
"username": "admin",
160
"password": "admin",
161
"host": "127.0.0.1",
162
"port": 8080.0,
163
"prefix": "",
164
"enable": true,
165
"weight": 100.0,
166
"name": "251",
167
"###protocol": "协议,可选值ftp,webdav###",
168
"###username": "登录用户名.###",
169
"###password": "登录密码.###",
170
"###host": "主机地址.###",
171
"###port": "端口.###",
172
"###prefix": "前缀路径.###",
173
"###enable": "是否启用###",
174
"###weight": "设置权重.###",
175
"###name": "存储节点名,对应存储名称,谨慎修改.###"
176
}
177
],
178
"report": [
179
{
180
"protocol": "webdav",
181
"username": "admin",
182
"password": "admin",
183
"host": "127.0.0.1",
184
"port": 8080.0,
185
"prefix": "",
186
"enable": true,
187
"weight": 100.0,
188
"name": "251",
189
"###protocol": "协议,可选值ftp,webdav###",
190
"###username": "登录用户名.###",
191
"###password": "登录密码.###",
192
"###host": "主机地址.###",
193
"###port": "端口.###",
194
"###prefix": "前缀路径.###",
195
"###enable": "是否启用###",
196
"###weight": "设置权重.###",
197
"###name": "存储节点名,对应存储名称,谨慎修改.###"
198
}
199
],
200
"strategyDeploy": [
201
{
202
"protocol": "webdav",
203
"username": "admin",
204
"password": "admin",
205
"host": "127.0.0.1",
206
"port": 8080.0,
207
"prefix": "",
208
"enable": true,
209
"weight": 100.0,
210
"name": "251",
211
"###protocol": "协议,可选值ftp,webdav###",
212
"###username": "登录用户名.###",
213
"###password": "登录密码.###",
214
"###host": "主机地址.###",
215
"###port": "端口.###",
216
"###prefix": "前缀路径.###",
217
"###enable": "是否启用###",
218
"###weight": "设置权重.###",
219
"###name": "存储节点名,对应存储名称,谨慎修改.###"
220
}
221
],
222
"teamwork": [
223
{
224
"protocol": "webdav",
225
"username": "admin",
226
"password": "admin",
227
"host": "127.0.0.1",
228
"port": 8080.0,
229
"prefix": "",
230
"enable": true,
231
"weight": 100.0,
232
"name": "251",
233
"###protocol": "协议,可选值ftp,webdav###",
234
"###username": "登录用户名.###",
235
"###password": "登录密码.###",
236
"###host": "主机地址.###",
237
"###port": "端口.###",
238
"###prefix": "前缀路径.###",
239
"###enable": "是否启用###",
240
"###weight": "设置权重.###",
241
"###name": "存储节点名,对应存储名称,谨慎修改.###"
242
}
243
]
244
}
Copied!
针对每一类文件可以设置一个或者多个存储点进行文件存储,在同一类文件的存储点中的name必须唯一,且不能进行修改(会导致无法找到附件文件),
name必须唯一

FTP协议

File Transfer Protocol

FTPS协议

TLS File Transfer Protocol

WEBDAV协议

Web-based Distributed Authoring and Versioning

CIFS协议

Common Internet File System