1、修改pom
thingsboard源码:thingsboard\application\pom.xml
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.dir>${basedir}/..</main.dir>
<pkg.name>thingsboard</pkg.name>
<pkg.unixLogFolder>/var/log/${pkg.name}</pkg.unixLogFolder>
<pkg.installFolder>/usr/share/${pkg.name}</pkg.installFolder>
<pkg.win.dist>${project.build.directory}/windows</pkg.win.dist>
</properties>
pkg.name改为iot
2、修改源码文件:
thingsboard\application\src\main\conf\thingsboard.conf
thingsboard\application\src\main\resources\thingsboard.yml
将thingsboard.conf和thingsboard.yml改为iot.conf、iot.yml
否则安装会报错
3、Linux系统中创建和修改systemd单元文件
修改linux系统unit单元服务
一个postfix服务的例子:
单元文件位于/usr/lib/systemd/system/postifix.service
列出正在运行的服务:
systemctl list-units --type=service
thingsboard的build.gradle打包文件,会生成unit单元服务
图-2
修改文件:thingsboard\application\src\main\scripts\control\thingsboard.service
将thingsboard.service改为iot.service
4、修改源码文件
目录:
thingsboard\application\src\main\java\org\thingsboard\server\ThingsboardInstallApplication.java
thingsboard\application\src\main\java\org\thingsboard\server\ThingsboardServerApplication.java
thingsboard改为iot
网友评论