美文网首页
Thingsboard改包名为IoT

Thingsboard改包名为IoT

作者: xhh199090 | 来源:发表于2019-07-08 17:03 被阅读0次

    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
    否则安装会报错

    图-1

    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

    图-3

    相关文章

      网友评论

          本文标题:Thingsboard改包名为IoT

          本文链接:https://www.haomeiwen.com/subject/rljahctx.html