IoTDB provides you two installation methods, you can refer to the following suggestions, choose one of them:
To install and use IoTDB, you need to have:
Java >= 1.8 (1.8, 11, and 13 are verified. Please make sure the environment path has been set.)
Maven >= 3.1 (If you want to compile and install IoTDB from source code)
./mvnw.sh on Linux/OS X or .\mvnw.cmd on Windows, to facilitate development.Set the max open files num as 65535 to avoid “too many open files” problem.
IoTDB provides you binary files which contains all the necessary components for the IoTDB system to run. You can get them on our website http://tsfile.org/download.
NOTE: iotdb-<version>.tar.gz # For Linux or MacOS iotdb-<version>.zip # For Windows
After downloading, you can extract the IoTDB tarball using the following operations:
Shell > uzip iotdb-<version>.zip # For Windows Shell > tar -zxf iotdb-<version>.tar.gz # For Linux or MacOS
The IoTDB project will be at the subfolder named iotdb. The folder will include the following contents:
iotdb/ <-- root path | +- sbin/ <-- script files | +- conf/ <-- configuration files | +- lib/ <-- project dependencies | +- LICENSE <-- LICENSE
You can get the released source code from https://iotdb.apache.org/#/Download, or from the git repository https://github.com/apache/incubator-iotdb/tree/master
Now suppose your directory is like this:
> pwd /workspace/incubator-iotdb > ls -l incubator-iotdb/ <-- root path | +- server/ | +- jdbc/ | +- client/ | ... | +- pom.xml
Let $IOTDB_HOME = /workspace/incubator-iotdb/server/target/iotdb-server-{project.version}
Let $IOTDB_CLI_HOME = /workspace/incubator-iotdb/client/target/iotdb-client-{project.version}
Note:
if IOTDB_HOME is not explicitly assigned, then by default IOTDB_HOME is the direct parent directory of sbin/start-server.sh on Unix/OS X (or that of sbin\start-server.bat on Windows).
if IOTDB_CLI_HOME is not explicitly assigned, then by default IOTDB_CLI_HOME is the direct parent directory of sbin/start-client.sh on Unix/OS X (or that of sbin\start-client.bat on Windows).
If you are not the first time that building IoTDB, remember deleting the following files:
> rm -rf $IOTDB_HOME/data/ > rm -rf $IOTDB_HOME/lib/
Then under the root path of incubator-iotdb, you can build IoTDB using Maven:
> pwd /workspace/incubator-iotdb > mvn clean package -pl server -am -Dmaven.test.skip=true
If successful, you will see the the following text in the terminal:
[INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] Apache IoTDB (incubating) Project Parent POM ....... SUCCESS [ 6.405 s] [INFO] TsFile ............................................. SUCCESS [ 10.435 s] [INFO] Service-rpc ........................................ SUCCESS [ 4.170 s] [INFO] IoTDB Jdbc ......................................... SUCCESS [ 3.252 s] [INFO] IoTDB Server ....................................... SUCCESS [ 8.072 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------
Otherwise, you may need to check the error statements and fix the problems.
After building, the IoTDB project will be at the subfolder named iotdb. The folder will include the following contents:
$IOTDB_HOME/ | +- sbin/ <-- script files | +- conf/ <-- configuration files | +- lib/ <-- project dependencies
You can build and run a IoTDB docker image by following the guide of Deployment by Docker