首页 > 数据库 > > 卸载集群-一键式环境清理
在集群卸载完成后,如果不需要在环境上重新部署集群,可以运行脚本gs_postuninstall对集群服务器上环境信息做清理。集群环境清理是对环境准备脚本gs_preinstall所做设置的清理。

如果root用户关闭了远程登录权限,可以参考开启root用户远程登录权限开启权限。
cd /opt/software/gaussdb/script

./gs_postuninstall -U omm -X /opt/software/gaussdb/clusterconfig.xml --delete-user --delete-group或者在集群中每个节点执行本地后置清理。
./gs_postuninstall -U omm -X /opt/software/gaussdb/clusterconfig.xml --delete-user -Lomm为运行集群的操作系统用户名,/opt/software/gaussdb/clusterconfig.xml为集群配置文件路径。
清理主机的环境
[root@plat1 script]# ./gs_postuninstall -U omm -X /opt/software/gaussdb/clusterconfig.xml
The environment will be cleaned up and cannot be recovered.Are you sure you want to clean up the environment after uninstall (yes/no)?yes
Parsing the configuration file.
Successfully parsed the configuration file.
Checking unpreinstallation.
Success checking unpreinstallation.
Deleting the instance paths.
Deleting the instance paths successfully.
Clean log and dependency.
Clean up the user environment variables
Clean up the user environment variable successfully
Clean up the local system tool environment variables
Clean log and dependency successfully.
Postuninstall successfully.
Please close the terminal and login again, ensure that the environment variable takes effect.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69959250/viewspace-3136343/ ,如需转载,请注明出处,否则将追究法律责任。