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:
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.
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.
- While Maven is not mandatory to be installed standalone, you can use the provided Maven wrapper,
- 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/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
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:
> 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 defaultIOTDB_HOME
is the direct parent directory ofsbin/start-server.sh
on Unix/OS X (or that ofsbin\start-server.bat
on Windows).if
IOTDB_CLI_HOME
is not explicitly assigned, then by defaultIOTDB_CLI_HOME
is the direct parent directory ofsbin/start-client.sh
on Unix/OS X (or that ofsbin\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
Installation by Docker (Dockerfile)
You can build and run a IoTDB docker image by following the guide of Deployment by Docker