centos7 部署编译 tb3.0.1 · 物联网平台-威尼斯人最新

cxl123 · 2020年07月05日 · 最后由 回复于 2022年08月19日 · 647 次阅读
本帖已被设为精华帖!

一、编译前提

1安装 openjdk1.8 
2安装 nodejs
3安装 maven 
4安装 git 
5安装 postgresql-12

二、拉取 thingsboard 源码

git clone https://github.com/thingsboard/thingsboard.git 

三、修改 thingsboard 目录下 pom 文件 注释:

1/root/thingsboard/pom.xml 
a)  690  com.mycila license-maven-plugin ··· ···
b)  752  
2注释 ./thingsboard/msa/js-executor/pom.xml ./thingsboard/msa/web-ui/pom.xml  maven-assembly-plugin 
a) vi ./thingsboard/msa/js-executor/pom.xml  100 
b) vi ./thingsboard/msa/web-ui/pom.xml  148 

四、修改 pom 文件中 node 版本和 npm 版本与本地版本相同

vi thingsboard/ui-ngx/pom.xml  60  
vi thingsboard/msa/js-executor/pom.xml  74  
vi thingsboard/msa/web-ui/pom.xml  83 

五、修改 thingsboard/ui-ngx/package.json 文件

"scripts": {
    "postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points",
    "ng": "ng",
    "start": "ng serve --host 0.0.0.0 --open",
    "build": "node --max-old-space-size=8000 ng build",     ========修改处
    "build:prod": "ng build --prod --vendor-chunk",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  }

六、在 thingsboard 目录执行编译即可。

mvn clean install -dskiptests

tips:

a) 编译对网络环境要求苛刻源码可从码云拉取 git clone https://gitee.com/mirrors/thingsboard.git
b) 编译时需要从外网拉依赖如果可以的话搭个梯子

本人小白一枚,如有错误之处,还请前辈们指教!

thingskit 将本帖设为了精华贴 07月05日 15:18
对 回复

我这边在编译的时候报错,请问是大概是啥原因导致的。

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
网站地图