跳转至

修改主服务的配置

1. 停止主服务器相关的文件服务

​ 编辑path/config/service.ini,把jgfile、jgp2p、jgnetdisk、jgupgrade的state值改为stop 。例如:

 [jgfiled]
 cmd = /bin/jgfiled.exe
 state = stop

2. 修改文件服务地址

​ 编辑path/config/svrlist.ini ,把jgfile、jgp2p、jgnetdisk、jgupgrade的info.host值改为文件服务器IP,并添加参数:info.virtual = true。例如:

[jgfiled]
info.host    = file_ip
info.virtual = true

3. 修改客户端获取文件服务器的地址

提示:

以下只做示例,请根据实际情况修改语句,不可以直接拷贝执行,如有疑问可以提交工单或联系我们。

  • 登录数据库,切换至emoa_dns库
use emoa_dns;
  • 修改内网文件服务地址(即default组)
update t_service_addr set hostaddr='192.168.1.101' where groupname='default' and server in ('jgfile','jgp2p','ydnetdisk','jgupgrade');
  • 插入分组outer
insert  into emoa_dns.`t_service_group`(`name`,`description`) values ('outer','');
  • 插入分组匹配的目标地址(即客户端的登录地址)
insert  into emoa_dns.`t_service_entgroup`(`buin`,`groupName`,`domain`,`remote`) values (0,'outer','1.2.3.4','');
  • 插入属于分组outer的服务记录
INSERT ignore INTO `t_service_addr` VALUES (null,'outer','jgmfront', '',7006,'tcp');
INSERT ignore INTO `t_service_addr` VALUES (null,'outer','jgrtxagent','', 7014,'tcp');
INSERT ignore INTO `t_service_addr` VALUES (null,'outer','jgqrcode','', 7443,'wss');
INSERT ignore INTO `t_service_addr` VALUES (null,'outer','jgfile','', 7443,'https');
INSERT ignore INTO `t_service_addr` VALUES (null,'outer','jgmsg','', 7443,'https');
INSERT ignore INTO `t_service_addr` VALUES (null,'outer','jgorg','', 7443,'https');
INSERT ignore INTO `t_service_addr` VALUES (null,'outer','jgpush','', 7443,'https');
INSERT ignore INTO `t_service_addr` VALUES (null,'outer','jginfo','', 7443,'https');
INSERT ignore INTO `t_service_addr` VALUES (null,'outer','jgupgrade','', 7080,'http');
INSERT ignore INTO `t_service_addr` VALUES (null,'outer','jguserportal','', 7080,'http');
INSERT ignore INTO `t_service_addr` VALUES (null,'outer','jgapp','', 7443,'https');
INSERT ignore INTO `t_service_addr` VALUES (null,'outer','jgp2p','', 7443,'wss');
INSERT ignore INTO `t_service_addr` VALUES (null,'outer','ydnetdisk','', 7443,'https');
  • 如果网络属于场景2,需要修改文件服务对外端口
update t_service_addr set port=7081 where server='jgupgrade';
update t_service_addr set port=7444 where server in ('jgfile','jgp2p','ydnetdisk');

4. 重启服务生效

  • Windows系统:

​ 打开系统服务,找到youdu_service服务,右键重启即可。

  • Linux系统:
systemctl restart youdu_service