Deployment

IoTDB provides you two installation methods, you can refer to the following suggestions, choose one of them:

  • Installation from binary files. Download the binary files from the official website. This is the recommended method, in which you will get a binary released package which is out-of-the-box.
  • Installation from source code. If you need to modify the code yourself, you can use this method.

Prerequisites

To install and use IoTDB, you need to have:

  1. Java >= 1.8 (1.8, 11, and 13 are verified. Please make sure the environment path has been set.)

    • To use IoTDB, JRE should be installed. To compile IoTDB, JDK should be installed.
  2. Maven >= 3.1 (If you want to compile and install IoTDB from source code)

    • While Maven is not mandatory to be installed standalone, you can use the provided Maven wrapper, ./mvnw.sh on Linux/OS X or .\mvnw.cmd on Windows, to facilitate development.
  3. Set the max open files num as 65535 to avoid “too many open files” problem.

Installation from binary files

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/downloadDeployment - 图1.

  1. NOTE:
  2. iotdb-<version>.tar.gz # For Linux or MacOS
  3. iotdb-<version>.zip # For Windows

After downloading, you can extract the IoTDB tarball using the following operations:

  1. Shell > uzip iotdb-<version>.zip # For Windows
  2. 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:

  1. iotdb/ <-- root path
  2. |
  3. +- sbin/ <-- script files
  4. |
  5. +- conf/ <-- configuration files
  6. |
  7. +- lib/ <-- project dependencies
  8. |
  9. +- LICENSE <-- LICENSE

Installation from source code

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:

  1. > pwd
  2. /workspace/incubator-iotdb
  3. > ls -l
  4. incubator-iotdb/ <-- root path
  5. |
  6. +- server/
  7. |
  8. +- jdbc/
  9. |
  10. +- client/
  11. |
  12. ...
  13. |
  14. +- 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:

  1. > rm -rf $IOTDB_HOME/data/
  2. > rm -rf $IOTDB_HOME/lib/

Then under the root path of incubator-iotdb, you can build IoTDB using Maven:

  1. > pwd
  2. /workspace/incubator-iotdb
  3. > mvn clean package -pl server -am -Dmaven.test.skip=true

If successful, you will see the the following text in the terminal:

  1. [INFO] ------------------------------------------------------------------------
  2. [INFO] Reactor Summary:
  3. [INFO]
  4. [INFO] Apache IoTDB (incubating) Project Parent POM ....... SUCCESS [ 6.405 s]
  5. [INFO] TsFile ............................................. SUCCESS [ 10.435 s]
  6. [INFO] Service-rpc ........................................ SUCCESS [ 4.170 s]
  7. [INFO] IoTDB Jdbc ......................................... SUCCESS [ 3.252 s]
  8. [INFO] IoTDB Server ....................................... SUCCESS [ 8.072 s]
  9. [INFO] ------------------------------------------------------------------------
  10. [INFO] BUILD SUCCESS
  11. [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:

  1. $IOTDB_HOME/
  2. |
  3. +- sbin/ <-- script files
  4. |
  5. +- conf/ <-- configuration files
  6. |
  7. +- lib/ <-- project dependencies

Installation by Docker (Dockerfile)

You can build and run a IoTDB docker image by following the guide of Deployment by Docker