安装Frontline 连接器
本指南介绍如何在Linux 上安装Frontline 连接器。
先决条件
- 从我们预编译的带有 XLSX 和 CSV 输入功能的连接器应用程序 中下载Frontline Connector 的
.jar
文件。 - 此.jar 文件需要上传到服务器的以下位置
/var/opt/frontline/connector.jar
封装 JAR
- 将
.jar
文件作为服务提供。 - 需要手动创建 Connector 服务。路径应为
/etc/systemd/system/connector.service
[Unit]
Description=frontline-connector
After=mysql.service
[Service]
Environment="UBIMAX_HOME=/var/data/frontline/"
ExecStart=java -jar /var/opt/frontline/connector.jar
SuccessExitStatus=143
[Install]
WantedBy=multi-user.target
配置连接器
1.使用命令注册服务:
systemctl enable connector.service
2.使用命令启动服务:
systemctl start connector.service
3.使用命令显示服务状态:
systemctl status connector.service
首次启动服务时,会在FRONTLINE_HOME
目录中创建配置文件。
4.打开%FRONTLINE_HOME%/config/configuration/xservice.properties
文件。
5.配置"xserver.url"和"xserver.port"参数。
server.port=${FC_PORT}
fcc.remote-address=${fcc.url}:${fcc.port}
fcc.api.key=${FCC_API_KEY}
fc.url=${FC_URL}:${FC_PORT}
server.servlet.context-path=/connector/
示例
service.port=8081
fcc.remote-address=http://123.456.789.10:8080
fcc.api-key=687ae1dc4e40423c9d88b37b220a4328
fc.url=http://123.456.789.10:8081/connector
server.servlet.context-path=/connector/
配置应用程序接口密钥
要连接到Frontline Command Center,需要一个 API 密钥,以便对连接器进行授权。
fcc.api-key=${api.key}
获取 API 密钥、
- 以系统管理员身份登录Frontline Command Center。
- 导航至 "配置 ",然后导航至 "用户"。
- 在用户 列表中,双击名为"Frontline Connector"的用户。
- 通过"用户信息"部分的按键打开详细视图。
5.重新启动服务。
如果配置成功,日志会显示如下行:
25 Sep 2018 15:31:27,660 INFO ServiceController - Registering EVENT-Service with xServer
[...]
25 Sep 2018 15:31:27,933 INFO ServiceController - Registering TROUBLESHOOTER-Service with xServer
[...]
25 Sep 2018 15:31:27,957 INFO ServiceController - Registering inspection-Service with xServer
[...]
25 Sep 2018 15:31:28,201 INFO ServiceController - Registering PICKING-Service with xServer
[...]
25 Sep 2018 15:31:30,519 INFO IntegrationService - Started IntegrationService in 8.665 seconds (JVM running for 10.55)
如果Frontline 连接器已启用网络用户界面,则可使用属性中配置的 URL(如http://123.456.789.10:8081)访问。