Introduction to tsdbtool
Overview
tsdbtool is a tool used for automatic deployment and optimization of databases. It supports automatic deployment and optimization of MySQL 8.0.17/8.0.18 and PostgreSQL 11.3 on a single node, and automatic deployment and optimization of MongoDB 4.0.12 and Greenplum 5.22.0 in clusters.
Supported servers: Kunpeng servers
Supported OS: CentOS 7.6 for Arm
Installation packages:
When using open source software, comply with the applicable licenses.
Basic Functions
The tool provides four basic functions and one help command:
- Check
Performs pre-installation checks. The tool checks whether the installation environment meets requirements, whether the configuration file is correct, and whether the specified file directory exists.
- Install
Installs the database. The tool supports database installation from the source code or by using the RPM package, and database initialization and performance tuning.
Script Parameters
This tool is compiled using the shell language. After the tool package is decompressed, several folders and shell scripts are obtained. The tsdbtool.sh script provides a unified entry to the tool. This script supports a maximum of four parameters. Each parameter has different meaning and function.
Script format: sh tsdbtool.sh parm1 < parm2 parm3 <parm4> >
Script parameter description:
- parm1
Specifies the function of the script to be executed. The options include check, install, uninstall, compile, and help. The help option can be used separately. The uninstall option must be used with parm2 and parm3. The check, install, and compile options must be used with parm2, parm3, and parm4.
- parm2
Specifies the database type. The options include dbtype=mysql, dbtype=postgresql, dbtype=mongodb, and dbtype=greenplum.
- parm3
Specifies the configuration file used during the installation. It is in conf=/path/to/conf-name format. conf= is a fixed string followed by the path of the configuration file.
- If the configuration file is in the same directory as tsdbtool.sh, enter the name of the configuration file. The configuration file format is provided by the software package.
- The configuration files of the four types of databases, namely mysqlconf.csv, postgresqlconf.csv, mongodbconf.csv, and greenplumconf.csv, are stored in the tool directory.
- The configuration files can be edited directly on Linux or opened and edited in Excel on Windows.
- parm4Specifies the source of the software to be installed. The parameter can be sourcedir=/path/to/sourcename-xx--x.tar.gz or rpmdir=/path/to/rpmname-xx-xxx.rpm.
- The sourcedir parameter indicates that the software is installed from the source. The value is the path of the source package.
- rpmdir indicates that the software is installed by using an RPM package. The value is the path of the RPM package. If you use sourcedir, you need to install dependencies and compilation tool and compile the source code, which takes time. The installation using an RPM package is recommended.