南大通用GBase 8a安装时自动选择Yes的参数实现真正静默

GBase 8a在安装时,会在不同的阶段提示用户先择是否继续,比如遵守许可,确认安装等。通过追加-a参数,可以自动选择Yes继续,而不需要交互,实现了真正静默安装。

参数

-a 无需用户确认

[gbase@localhost gcinstall_9.5.2.44.10]$ ./gcinstall.py  --help
Usage: gcinstall.py [options]

Options:
  -h, --help            show this help message and exit
  -a                    do not prompt the user for confirmation
  -U, --upgrade         upgrade cluster
  --silent=SILENTCONFIG
                        use the supplied properties file for a 'silent'
                        install
  --generalDBUser=GENDBUSER
                        general database user
  --generalDBPwd=GENDBPWD
                        general database user password
  --timeout=TIMEOUT     expansion: sync coordinators' metadata timeout,default
                        15mins
  --license_file=LICENSE_FILE
                        expansion: import license file
  --backup_dir=BACKUP_DIR
                        upgrade: backup package path,default /home/$dbaUser
  -s, --skip_audit      upgrade: do not backup audit log,default False
  -c, --exec_chmod      upgrade: support file minimum permissions,default
                        False
  -p, --addr_protocol   domain map address,default False(IPv4)
  --theads_queue=THEADS_QUEUE
                        set the maximun number of threads,default 64
  --passwordInputMode=PASSWORDINPUTMODE
                        get password method[file,pwdsame,pwddiff],
                        file:  get from config file,default
                        pwdsame: nodes have the same user passwd
                        pwddiff: nodes have different user passwds

样例

需交互的样例

一般是2-3次交互选择是否继续,如下样例展示的是第一个交互的位置。

[gbase@localhost gcinstall_9.5.2.44.10]$ ./gcinstall.py --silent=demo.options
*********************************************************************************
Thank you for choosing GBase product!


Please read carefully the following licencing agreement before installing GBase product:
TIANJIN GENERAL DATA TECHNOLOGY CO., LTD. LICENSE AGREEMENT

READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSETERMS (COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE OPENING THE SOFTWAREMEDIA PACKAGE.  BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS AGREEMENT.  IF YOU ARE ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS.  IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND.


1.  CHINESE GOVERNMENT RESTRICTED.  If Software is being acquired by or on behalf of the Chinese Government , then the Government's rights in Software and accompanying documentation will be only as set forth in this Agreement.

2.  GOVERNING LAW.  Any action related to this Agreement will be governed by Chinese law: "COPYRIGHT LAW OF THE PEOPLE'S REPUBLIC OF CHINA","PATENT LAW OF THE PEOPLE'S REPUBLIC OF CHINA","TRADEMARK LAW OF THE PEOPLE'S REPUBLIC OF CHINA","COMPUTER SOFTWARE PROTECTION REGULATIONS OF THE PEOPLE'S REPUBLIC OF CHINA".  No choice of law rules of any jurisdiction will apply."


*********************************************************************************
Do you accept the above licence agreement ([Y,y]/[N,n])? N
[gbase@localhost gcinstall_9.5.2.44.10]$

无需交互自动选择Yes的样例

同样只展示自动选择Yes的第一步

[gbase@localhost gcinstall_9.5.2.44.10]$ ./gcinstall.py --silent=demo.options -a
*********************************************************************************
Thank you for choosing GBase product!


Please read carefully the following licencing agreement before installing GBase product:
TIANJIN GENERAL DATA TECHNOLOGY CO., LTD. LICENSE AGREEMENT

READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSETERMS (COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE OPENING THE SOFTWAREMEDIA PACKAGE.  BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS AGREEMENT.  IF YOU ARE ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS.  IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND.


1.  CHINESE GOVERNMENT RESTRICTED.  If Software is being acquired by or on behalf of the Chinese Government , then the Government's rights in Software and accompanying documentation will be only as set forth in this Agreement.

2.  GOVERNING LAW.  Any action related to this Agreement will be governed by Chinese law: "COPYRIGHT LAW OF THE PEOPLE'S REPUBLIC OF CHINA","PATENT LAW OF THE PEOPLE'S REPUBLIC OF CHINA","TRADEMARK LAW OF THE PEOPLE'S REPUBLIC OF CHINA","COMPUTER SOFTWARE PROTECTION REGULATIONS OF THE PEOPLE'S REPUBLIC OF CHINA".  No choice of law rules of any jurisdiction will apply."


*********************************************************************************
*********************************************************************************
                     Welcome to install GBase products
*********************************************************************************
Environmental Checking on gcluster nodes.