Stand-Alone Deployment

This guide introduces how to set up a standalone TimechoDB instance, which includes one ConfigNode and one DataNode (commonly referred to as 1C1D).

1. Prerequisites

  1. System configuration: Ensure the system has been configured according to the preparation guidelines.

  2. IP Configuration: It is recommended to use hostnames for IP configuration to prevent issues caused by IP address changes. Set the hostname by editing the /etc/hosts file. For example, if the local IP is 192.168.1.3 and the hostname is iotdb-1, run:

    echo "192.168.1.3  iotdb-1" >> /etc/hosts 
    

    Use the hostname for cn_internal_address and dn_internal_address in IoTDB configuration.

  3. Unmodifiable Parameters: Some parameters cannot be changed after the first startup. Refer to the Parameter Configuration section.

  4. Installation Path: Ensure the installation path contains no spaces or non-ASCII characters to prevent runtime issues.

    • User Permissions: Choose one of the following permissions during installation and deployment:
      • Root User (Recommended): This avoids permission-related issues.
      • Non-Root User:
        • Use the same user for all operations, including starting, activating, and stopping services.
        • Avoid using sudo, which can cause permission conflicts.
  5. Monitoring Panel: Deploy a monitoring panel to track key performance metrics. Contact the Timecho team for access and refer to the “Monitoring Board Install and Deploy” guide.

2. Installation Steps

2.1 Pre-installation Check

To ensure the IoTDB Enterprise Edition installation package you obtained is complete and authentic, we recommend performing an SHA512 verification before proceeding with the installation and deployment.

Preparation:

  • Obtain the officially released SHA512 checksum: Find the “SHA512 Checksum” corresponding to each version in the Release History document.

Verification Steps (Linux as an Example):

  1. Open the terminal and navigate to the directory where the installation package is stored (e.g., /data/iotdb):
       cd /data/iotdb
    
  2. Execute the following command to calculate the hash value:
       sha512sum timechodb-{version}-bin.zip
    
  3. The terminal will output a result (the left part is the SHA512 checksum, and the right part is the file name):

img

  1. Compare the output result with the official SHA512 checksum. Once confirmed that they match, you can proceed with the installation and deployment operations in accordance with the procedures below.

Notes:

  • If the verification results do not match, please contact Timecho Team to re-obtain the installation package.
  • If a “file not found” prompt appears during verification, check whether the file path is correct or if the installation package has been fully downloaded.

2.2 Extract Installation Package

Unzip the installation package and navigate to the directory:

unzip  timechodb-{version}-bin.zip
cd  timechodb-{version}-bin

2.3 Parameter Configuration

Memory Configuration

Edit the following files for memory allocation:

  • ConfigNode: conf/confignode-env.sh (or .bat for Windows)
  • DataNode: conf/datanode-env.sh (or .bat for Windows)
ParameterDescriptionDefaultRecommendedNotes
MEMORY_SIZETotal memory allocated for the nodeEmptyAs neededSave changes without immediate execution; modifications take effect after service restart.

General Configuration

Set the following parameters in conf/iotdb-system.properties. Refer to conf/iotdb-system.properties.template for a complete list.

Cluster-Level Parameters:

ParameterDescriptionDefaultRecommendedNotes
cluster_nameName of the clusterdefaultClusterCustomizableIf there is no specific requirement, keep the default value.
schema_replication_factorNumber of metadata replicas11In standalone mode, set this to 1. This value cannot be modified after the first startup.
data_replication_factorNumber of data replicas11In standalone mode, set this to 1. This value cannot be modified after the first startup.

ConfigNode Parameters:

ParameterDescriptionDefaultRecommendedNotes
cn_internal_addressAddress used for internal communication within the cluster127.0.0.1Server's IPv4 address or hostname. Use hostname to avoid issues when the IP changes.This parameter cannot be modified after the first startup.
cn_internal_portPort used for internal communication within the cluster1071010710This parameter cannot be modified after the first startup.
cn_consensus_portPort used for consensus protocol communication among ConfigNode replicas1072010720This parameter cannot be modified after the first startup.
cn_seed_config_nodeAddress of the ConfigNode for registering and joining the cluster. (e.g.,cn_internal_address:cn_internal_port)127.0.0.1:10710Use cn_internal_address:cn_internal_portThis parameter cannot be modified after the first startup.

DataNode Parameters:

ParameterDescriptionDefaultRecommendedNotes
dn_rpc_addressAddress for the client RPC service0.0.0.0The IPV4 address or host name of the server where it is located, and it is recommended to use the IPV4 addressEffective after restarting the service.
dn_rpc_portPort for the client RPC service66676667Effective after restarting the service.
dn_internal_addressAddress used for internal communication within the cluster127.0.0.1Server's IPv4 address or hostname. Use hostname to avoid issues when the IP changes.This parameter cannot be modified after the first startup.
dn_internal_portPort used for internal communication within the cluster1073010730This parameter cannot be modified after the first startup.
dn_mpp_data_exchange_portPort used for receiving data streams1074010740This parameter cannot be modified after the first startup.
dn_data_region_consensus_portPort used for data replica consensus protocol communication1075010750This parameter cannot be modified after the first startup.
dn_schema_region_consensus_portPort used for metadata replica consensus protocol communication1076010760This parameter cannot be modified after the first startup.
dn_seed_config_nodeAddress of the ConfigNode for registering and joining the cluster. (e.g.,cn_internal_address:cn_internal_port)127.0.0.1:10710Use cn_internal_address:cn_internal_portThis parameter cannot be modified after the first startup.

2.4 Start ConfigNode

Navigate to the sbin directory and start ConfigNode:

./sbin/start-confignode.sh -d   # The "-d" flag starts the process in the background.

If the startup fails, refer to the [Common Problem](#Common Problem) section below for troubleshooting.

2.5 Start DataNode

Navigate to the sbin directory of IoTDB and start the DataNode:

./sbin/start-datanode.sh -d    # The "-d" flag starts the process in the background.

2.6 Activate Database

Option 1: Command-Based Activation

  1. Enter the IoTDB CLI.
  • For Tree Model:
# For Linux or macOS
./start-cli.sh

# For Windows
./start-cli.bat
  1. Run the following command to retrieve the machine code required for activation:

    show system info
    
  2. Copy the returned machine code and send it to the Timecho team:

+--------------------------------------------------------------+
|                                                    SystemInfo|
+--------------------------------------------------------------+
|                                          01-TE5NLES4-UDDWCMYE|
+--------------------------------------------------------------+
Total line number = 1
It costs 0.030s

Option 2: File-Based Activation

  1. Start both the ConfigNode and DataNode.

  2. Navigate to the activation folder and copy the system_info file.

  3. Send the system_info file to the Timecho team.

  4. Place the license file provided by the Timecho team into the corresponding activation folder for each node.

  5. Enter the activation code provided by the Timecho team in the CLI using the following format. Wrap the activation code in single quotes ('):

IoTDB> activate '01-D4EYQGPZ-EAUJJODW-NUKRDR6F-TUQS3B75-EDZFLK3A-6BOKJFFZ-ALDHOMN7-NB2E4BHI-7ZKGFVK6-GCIFXA4T-UG3XJTTD-SHJV6F2P-Q27B4OMJ-R47ZDIM3-UUASUXG2-OQXGVZCO-MMYKICZU-TWFQYYAO-ZOAGOKJA-NYHQTA5U-EWAR4EP5-MRC6R2CI-PKUTKRCT-7UDGRH3F-7BYV4P5D-6KKIA==='

2.7 Verify Activation

In the CLI, you can check the activation status by running the show activation command. Check the ClusterActivationStatus field. If it shows ACTIVATED, the database has been successfully activated.

3. Common Problem

  1. Activation Fails Repeatedly
    1. Use the ls -al command to verify that the ownership of the installation directory matches the current user.
    2. Check the ownership of all files in the ./activation directory to ensure they belong to the current user.
  2. ConfigNode Fails to Start
    1. Review the startup logs to check if any parameters, which cannot be modified after the first startup, were changed.
    2. Check the logs for any other errors. If unresolved, contact technical support for assistance.
    3. If the deployment is fresh or data can be discarded, clean the environment and redeploy using the following steps:

Clean the Environment

  1. Stop all ConfigNode and DataNode processes:
sbin/stop-standalone.sh
  1. Check for any remaining processes:
jps 
# or 
ps -ef | grep iotdb
  1. If processes remain, terminate them manually:
kill -9 <pid>

#For systems with a single IoTDB instance, you can clean up residual processes with:
ps -ef | grep iotdb | grep -v grep | tr -s ' ' ' ' | cut -d ' ' -f2 | xargs kill -9
  1. Delete the data and logs directories:
cd /data/iotdb 
rm -rf data logs

4. Appendix

4.1 ConfigNode Parameters

ParameterDescriptionIs it required
-dStarts the process in daemon mode (runs in the background).No

4.2 DataNode Parameters

ParameterDescriptionRequired
-vDisplays version information.No
-fRuns the script in the foreground without backgrounding it.No
-dStarts the process in daemon mode (runs in the background).No
-pSpecifies a file to store the process ID for process management.No
-cSpecifies the path to the configuration folder; the script loads configuration files from this location.No
-gPrints detailed garbage collection (GC) information.No
-HSpecifies the path for the Java heap dump file, used during JVM memory overflow.No
-ESpecifies the file for JVM error logs.No
-DDefines system properties in the format key=value.No
-XPasses -XX options directly to the JVM.No
-hDisplays the help instructions.No