Step 1. Install Java 11 (OpenJDK)
ThingsBoard service is running on Java 11. Follow this instructions to install OpenJDK 11.
- Visit Open JDK Download Page to download latest OpenJDK 11 (LTS) MSI package.
- Run the downloaded MSI package and follow the instructions. Make sure you have selected “Add to PATH” and “Set JAVA_HOME variable” options to “Will be installed on local hard drive” state.
- Visit PostgreSQL JDBC Download Page to download PostgreSQL JDBC Driver
- Copy downloaded file to C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot\jre\lib\ext and add a global variable named CLASSPATH with value .;”C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot\jre\lib\ext\postgresql-42.2.18.jar” to your system (right click on “My Computer”, scroll down, “Advanced System Settings”, “Advanced”, “Environmental variables…”, under “System variables” click “Create…”).
- If the jre folder does not exists under “C:\Program Files\AdoptOpenJDK\jdk-11.0.10.9-hotspot” path, create this folder and all required sub-folders
Step 2.安装maven
https://maven.apache.org/download.cgi下载,安装后配置环境变量并重启cmd验证命令是否生效。
配置 maven > conf > setting.xml
alimaven
aliyun maven
http://maven.aliyun.com/nexus/content/repositories/central/
central
Setp 3.安装node 12.16.1
到https://nodejs.org/en/blog/release/v12.16.1/下载,安装后重启cmd验证命令是否生效。
Setp 4.
安装yarn
使用npm命令安装yarn,并验证命令是否生效。
Setp 5.安装git
拉取源码
Setp 6.mvn clean package -DskipTests
一台主机W7,一台虚拟机7都过了,记录一下。