【解决办法】先建/etc/systemd/system/supermap-license.service,然后把内容替换为如下内容:
[Unit]
Description=SuperMap BS License Server
After=network.target
[Service]
Type=simple
WorkingDirectory=/home/xkf/supermap-bslicense-server/bin
ExecStart=/bin/bash /home/xkf/supermap-bslicense-server/bin/startup.sh
Restart=always
RestartSec=10
User=root
TimeoutStartSec=120
[Install]
WantedBy=multi-user.target
,替换的时候记得改路径,systemctl daemon-reload
systemctl daemon-reexec
systemctl enable supermap-license.service运行上面命令然后重启,就可以了