Initialization
There are two ways to set configuration parameters:
- Command line: Specify parameters in the format of “- configuration item“ when starting DolphinDB server in command line.
- Configuration file: Specify parameters in the configuration file. The default configuration file is dolphindb.cfg in standalone mode and cluster.cfg (typically located in the configdirectory) in cluster mode.
Note: Except for those required to be set in command line, all parametersshould be configured in the files specified by config or clusterConfig.
Download and Install Server
Download and extract the server installation package, in which the configuration files, license files, log files, and other relevant dependency files are located in the home directory for DolphinDB.
Parameter | Description |
---|---|
home=/home/DolphinDB/server | The DolphinDB home directory (<HomeDir>).
It can only be specified in command line.
|
The DolphinDB home directory contains the following folders: modules (dependency modules and user-defined modules), plugins, tzdb (time zone database), and web (dependencies of the web interface).
Parameter | Description |
---|---|
moduleDir=modules | The directory for the module files. It can be an absolute path or a relative directory, with modules as the default. The system searches the relative directory modules in the following order: home directory of the node, the working directory of the node, and the directory with the DolphinDB executable. |
pluginDir=plugins | The directory for the plugin files. It can be an absolute path or a relative directory, with plugins as the default. The system searches the relative directory plugins in the following order: home directory of the node, the working directoryof the node, and the directory with the DolphinDB executable. |
tzdb=<HomeDir>/server/tzdb | The directory of the time zone database. The default value is <HomeDir>/server/tzdb. |
webRoot=web | The directory of the web server. It can be an absolute path or a relative directory, with web as the default. The system searches the relative directory web in the following order: home directory of the node, the working directory of the node, and the directory with the DolphinDB executable. |
Start Server
In a single-machine setup, DolphinDB server can be started in standalone mode or cluster mode. After startup, most parameters cannot be modified online, so it is necessary to configure the parameters beforehand.
Parameter | Description |
---|---|
config=dolphindb.cfg | The configuration file. The default value is dolphindb.cfg. It can only be specified in command line. When starting a controller or agent in cluster mode, it is necessary to set this parameter to the path to the corresponding configuration file. By default, the file for the controller is located at config/controller.cfg and that for agents is at config/agent.cfg. |
clusterConfig=cluster.cfg | Configuration file for the cluster. The default value is cluster.cfg. It can only be specified in command line. |
nodesFile=cluster.nodes | The network information for agents, compute nodes, and data nodes in the cluster, including the IP address, port number, alias, and node mode. It is loaded when the controller is started. The default value is cluster.nodes. It can only be specified in command line. |
Note: In cluster mode, except for parameters that need to be set in the configuration file specified by config (primarily those related to high availability, node communication, node recovery, etc.), all other parameters are set in the file specified by clusterConfig.
Appendix