卸载HAF

HAF服务的卸载,需要经过客户的同意才能进行操作。
HAF的卸载,通过对外提供haf_uninstaller脚本的方式实现。由haf_uninstaller调用haf-tool命令行接口。
- 主机节点
主机节点由于作为库与业务一起部署,所以未提供单独的卸载脚本。如果需要单独卸载主机节点的HAF,操作如下。
- 通过脚本的方式对密钥、密码等文件进行覆写,防止信息泄露。
#安全删除密钥,密码等文件 file_list=("/home/omm/haf-install/haf-host/omnidata/service.prvk" "/home/omm/haf-install/haf-host/omnidata/service.ksfa" "/home/omm/haf-install/haf-host/omnidata/service.ksfb" "/home/omm/haf-install/haf-host/omnidata/service.pw") for file in ${file_list[*]}; do if [ -f "$file" ]; then file_length=$(stat -c %s ${file}) file_k_length=$(expr ${file_length} / 1024 + 1) if [ ${file_k_length} -gt 5000 ];then echo "${file} content size too big to handle" ${file_k_length}=-1 fi dd if=/dev/zero of="${file}" bs=1k count="${file_k_length}" &> /dev/null tr '\0' '\377' < /dev/zero | dd of="${file}" bs=1k count="${file_k_length}" &> /dev/null dd if=/dev/random of="${file}" bs=1k count="${file_k_length}" &> /dev/null fi done
- 卸载HAF。
chmod u+w -R /home/omm/haf-install/haf-host/
rm -rf /home/omm/haf-install/haf-host/
- 通过脚本的方式对密钥、密码等文件进行覆写,防止信息泄露。
- 卸载节点
cd /home/omm/haf-install/haf-target/tools/
./haf_uninstaller
haf-tool对外提供的卸载接口
- 选择“命令执行”,单击“添加”。
- 编辑任务内容,单击“保存”。
卸载节点执行流程。
参数
内容
任务名称
卸载HAF
运行目录
/home/omm/haf-install/haf-target/tools
执行命令
./haf_uninstaller
父主题: 运行和维护HAF