工具支持以下安装脚本命令:
[(--apadminpasswd | -a) <password>] [--skip-disk-check] [--skip-memory-check] [--verbose]
[--remoteuserpasswd=<password>] [--dm-package-file=<Database_Manager.tar.gz> | ] [--with-ha]
[(--cert-path <certificate path> --certpasswd | -r <password>)]
[(--agent-cert-path <agent certificate directory path> --agent-certpasswd <password>)] [--revers-algo <AES>] [--irevers-algo <PBKDF2|SHA256>] [--kafka-plugin-path <plugin-path-including-the-plugin-name>]
CLI输入如下:
<统计数据库密码> |
用于主数据库和指标数据库 |
<证书密码> |
SSH证书密码 |
<管理员密码> |
Database Manager管理员密码 |
描述:该命令用于安装Database Manager的所有组件,命令执行过程中需要输入密码。
用户也可以将该命令作为一个可选参数(根据安全准则不建议这样做)。
[dminstalluser@blrlabvm_171_29 ~]$ python install.py install
Enter password for Primary & Metric Database:
Retype password:
Note:Remember the Primary & Metric Database password, it helps to
1. Resetting Admin Password.
2. Unlocking Admin User.
Do you want create Database Manager Admin password (Yes/No)? Yes
Enter Database Manager Admin password:
Retype password:
[27/27] Pre Check for installation - COMPLETED
[27/27] Preparing installation - COMPLETED
[27/27] Deploying - COMPLETED
[27/27] Configuring - COMPLETED
[27/27] Starting - COMPLETED
[27/27] Verify Start - COMPLETED
[27/27] Cleaning up temporary files - COMPLETED
Registering services...
. . . . . . . . .
Database Manager has been installed successfully.
Access the below URL to start...
https://10.X.X.X:7070/APW
说明:在命令中,使用方括号[]表示内容可选,使用圆括号()表示可选择其中任意一项。
安装成功后,系统启动。
下表描述了命令中参数相关的操作。
参数 |
操作 |
结果 |
禁用条件 |
|---|---|---|---|
--default-config |
Database Manager安装程序使用默认配置文件,提示用户输入正确的密码。 |
使用了和Database Manager一起发布的默认配置文件。 之后,会为所有Database Manager组件使用演示目的的默认证书文件。 |
可选 --config参数已提供 |
--config | -c <default-install.conf> |
Database Manager安装程序使用用户指定的配置文件,提示用户输入正确的密码。 |
用户需要为每个Database Manager组件提供必要的参数。 |
可选 --default-config参数已提供 |
--dry-run |
安装程序不会在目标系统上安装软件,但是依然会执行实际安装过程所需的所有生效、验证和权限检查,并上报错误。 |
软件没有安装在系统中,但会识别所有可能的故障并上报给用户。 |
可选 即使用户未设定此参数,Database Manager在安装开始之前,还是会运行此参数。 |
--install-log <install-log-path> |
支持安装日志路径可编辑。 |
安装过程中可以将日志写入用户配置的路径。 |
可选 如果用户未设定此参数,则不应将安装日志写入文件。 |
--statdbpasswd | -s <password> |
设置统计数据库(主数据库和指标数据库)的密码。 |
统计数据库的初始密码不会向用户显示。 |
可选 |
(--certpasswd | -r) <password> |
设置用户提供证书文件的密码。 |
证书密码不会向用户显示。 |
可选 |
--agent--certpasswd <password> |
设置用户提供证书文件的密码。 |
- |
可选 |
(--apadminpasswd | -a) <password> |
设置Database Manager管理员密码。 |
Database Manager管理员密码不会向用户显示。 |
可选 |
--remoteuserpasswd=<password> |
设置远程宿主机用户密码。 |
宿主机管理员密码不会向用户显示。 |
可选 |
--dm-package-file=<Database_Manager.tar.gz> | |
指定用于在远程宿主机上进行安装的Database Manager安装包。 |
若未指定安装包,将会使用当前目录下的 Database_Manager安装包。 |
- |
--with-ha |
在“1+1”配置下安装Database Manager。 |
此选项还是check命令中的参数,为HA安装进行系统预检查。 |
- |
--with-haproxy |
检查HAProxy和HA安装的系统准备情况。 |
- |
- |
--skip-disk-check |
跳过磁盘检查(仅适用调试场景)。 |
- |
可选 |
--skip-memory-check |
跳过内存检查(仅适用调试场景)。 |
- |
可选 |
CLI输入:<密码>
描述:该命令用于修改Database Manager任意组件的密码,要求至少指定一个参数。
说明:定期修改数据库密码,如,每90天或180天修改一次。
参数 |
操作 |
结果 |
禁用条件 |
|---|---|---|---|
--statdbpasswd |
提示并修改统计数据库的密码(包括主数据库和所有指标数据库)。 |
--primdbpasswd & --metricdbpasswd被忽略。 |
可选 |
--certpasswd |
提示并修改已安装证书文件的密码。 |
不涉及 |
可选 |
--apadminpasswd |
提示并修改Database Manager管理员的默认密码。 |
不涉及 |
可选 |
--primdbpasswd |
提示并修改主数据库的密码。 |
不涉及 |
可选 |
--metricdbpasswd |
提示并修改指标数据库的密码。 |
不涉及 |
可选 |
CLI输入:<证书密码>
描述:该命令用于为所有或任一服务安装新的证书文件。
参数 |
操作 |
结果 |
禁用条件 |
|---|---|---|---|
--all | -a <cert-file-path> |
为所有服务安装证书文件。 |
(--service | -s)被忽略。 |
默认禁用 |
--service | -s <service-name> <cert-file-path> |
为指定服务安装证书文件。 |
不涉及 |
可选 |
描述:该命令用于打印软件的版本信息(显示为字符串)。
[dminstalluser@blrlabvm_171_29 ~]$ python install.py version
Database Manager 8.0.
[dminstalluser@blrlabvm_171_29 ~]$
描述:该命令用于打印软件的帮助信息,为DMServer日常运行提供支持。
[dminstalluser@blrlabvm_171_29 ~]$ python install.py help
Database Manager(DM) Server installation help:
Utility to support installation of DM server.
This script should not be run with root permission.
Usage:
install.py install [--default-config | (--config | -c) <install-default.conf>] [--dry-run] [--install-log <install-log-path>]
[(--statdbpasswd | -s) <password>] [(--certpasswd | -r) <password>]
[(--apadminpasswd | -a) <password>] [--skip-disk-check] [--skip-memory-check] [--verbose]
[--remoteuserpasswd=<password>] [--dm-package-file=<Database_Manager.tar.gz> | ] [--with-ha]
[(--cert-path <certificate path> --certpasswd | -r <password>)]
[(--agent-cert-path <agent certificate directory path> --agent-certpasswd <password>)]
[--revers-algo <AES>] [--irevers-algo <PBKDF2|SHA256>]
[--kafka-plugin-path <plugin-path-including-the-plugin-name>
install.py check [--default-config | (--config | -c) <install-default.conf>] [--skip-disk-check] [--skip-memory-check]
[--with-ha] [--with-haproxy]
install.py (version | --version | -v)
install.py [help | --help | -h]
Commands:
install Installs Database Manager in configured location.
check Perform Pre-Check before installation.
help Prints this help text.
version Prints version string.
Options:
--default-config Use default configuration file for installation.
--config | -c Use provided configuration file for installation.
--dry-run Run through each step of installation but without installing the application.
--install-log Writes installation log in given path. Not given then would be written to current directory.
--statdbpasswd | -s Password for Statistics DBs [Primary DB & Metrics DB] connectivity accepted via command line argument.
Recommended not to use this, instead type the password when prompted.
--certpasswd | -r Password for user given certificate files accepted via command line argument.
Recommended not to use this, instead type the password when prompted.
--agent-certpasswd Password for user given certificate files accepted via command line argument.
--apadminpasswd | -a Password for DM admin user accepted via command line argument.
Recommended not to use this, instead type the password when prompted.
--remoteuserpasswd Password for Remote host machine user accepted via command line argument.
Recommended not to use this, instead type the password when prompted.
--with-ha Installs DM in 1+1 configuration.
This option is also used as an argument for the command "check". It will pre-check the system for HA installation.
--with-haproxy This option will check the system's readiness for HaProxy and HA installation.
--skip-disk-check Skip the default disk pre check. This option to be used only during application debug.
Recommended not to use this for production environment.
--skip-memory-check Skip the default memory pre check. This option to be used only during application debug.
Recommended not to use this for production environment.
--dm-package-file Specify the DM package to be used for installing on Remote host machine.
If this option is not used, it will use the Database_Manager package file in current directory.
--verbose Prints detail during each stage of installation.
--cert-path Cert path is user define certificate path.
--agent-cert-path Agent cert directory path is user define certificate path.
--revers-algo Reversible algorithm to password encryption.Default algorithm is AES
options: 1. AES
--irevers-algo Irreversible algorithm to password decryption.Default algorithm is PBKDF2
options: 1. PBKDF2 2. SHA256
--kafka-plugin-path This option if provided would enable the user to install Kafka plugin as separate package.
[dminstalluser@blrlabvm_171_29 ~]$
描述:该命令用于打印各安装阶段的详细信息。
描述:该命令用于指定用户自定义的证书认证路径。
描述:该命令用于指定用户自定义的Agent证书认证路径。
描述:该命令用于指定不可逆的密码加密算法,默认为 AES。
描述:该命令用于指定不可逆的密码加密算法,默认为PBKDF2。
描述:该命令用于防止服务自动启动。
描述: 该命令可以使用户将Kafka插件软件包单独安装。插件包将在services / APS_Alert_Service目录下被解压。
描述:该命令用于显示DMServer日常运行所需的工具列表。
[dminstalluser@blrlabvm_171_29 ~]$ cd dmserver
[dminstalluser@blrlabvm_171_29 dmserver]$ cd bin
[dminstalluser@blrlabvm_171_29 bin]$ python dmserver_ha.py --help
Database Manager(DM) Server Operations help:
Utility to support day-to-day operational features of DM server.
This script should not be run with root permission.
Usage:
dmserver_ha.py mode
dmserver_ha.py mode-update
dmserver_ha.py health [--config | -c <config-file-name-with-path>] | (--output <file-name-with-path>) | [--summary]
dmserver_ha.py health-update [--config | -c <config-file-name-with-path>] | (--output <file-name-with-path>)
dmserver_ha.py status-update --status-file=<status-file-name-with-path>
dmserver_ha.py role-switch-notify --component_name=<component name> --instance_id=<instance id>
dmserver_ha.py start-haproxy
dmserver_ha.py stop-haproxy
dmserver_ha.py (help | --help | -h)
dmserver_ha.py (version | --version | -v)
Commands:
mode displays the mode (active or standby) of the cluster.
mode-update check and update mode of each db component.
health checks the health of all the services registered with DM.
The output will be printed on the console or stored in file if requested by user
health-update checks the health of all the services registered with DM.
This status is sent to HA service for switchover/fail-over decision
status-update updates the status of each service to HA micro service
role-switch-notify changes the haproxy instance to provided configuration.
start-haproxy Start Haproxy component.
stop-haproxy Stop Haproxy component.
help Prints this help text.
version Prints version string.
Options:
-c | --config the absolute path(with the file name) of the config file used to read the
services which the user wants to be checked.
If the file is present in the same location as the script, only file name is sufficient.
--output the absolute path (with file name) to the file where the user wants
the output of the health check to be written.
If the file is present in the same location as the script, only file name is sufficient.
If the file is already present , it will be overwritten else new file will be created and updated.
--summary collective decision taken based on the health status of all services.
--status-file the absolute path(with the file name) of the services-status-file containing json status response
of self and peer.
If the file is present in the same location as the script, only file name is sufficient.
--component_name One of the supported component name.
--instance_id DM Instance Id.
-h | --help Print this help text.
-v | --version Print version string.
[dminstalluser@blrlabvm_171_29 bin]$
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69959250/viewspace-3122175/ ,如需转载,请注明出处,否则将追究法律责任。