首页 > 代码库 > Ambari2.5.3卸载smartsense

Ambari2.5.3卸载smartsense

第一步,确定SmartSence服务均已关闭

1 curl -u admin:$PASSWORD -i -H ‘X-Requested-By: ambari‘ -X PUT -d ‘{"RequestInfo": {"context" :"Stop SmartSense via REST"}, "Body": {"ServiceInfo": {"state": "INSTALLED"}}}‘ http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/services/SMARTSENSE


第二步,卸载SmartSense组件

1  curl -u admin:$PASSWORD -i -H ‘X-Requested-By: ambari‘ -X POST -d ‘{"RequestInfo": {"context" :"Uninstall SmartSense via REST", "command":"Uninstall"}, "Requests/resource_filters":[{"hosts":"comma separated host names", "service_name":"SMARTSENSE", "component_name":"HST_AGENT"}]}‘ http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/requests

 

第三步,从Ambari中卸载掉SmartSense服务

1 curl -u admin:$PASSWORD -H ‘X-Requested-By: ambari‘ -X DELETE http://AMBARI_SERVER_HOST:8080/api/v1/clusters/CLUSTER_NAME/services/SMARTSENSE


第四步,重起Ambari使更改生效

1 ambari-server restart

  注释:admin为用户名,不用更改;¥PASSWORD为admin的密码,修改成自己admin的密码;AMBARI_SERVER_HOST是ambari-server所在主机的IP或者域名,要修改成自己ambari-server的;CLUSTER_NAME是ambari上安装的集群的名字,即要卸载哪个集群上的SmartSense就写哪个集群的名字。

  官方文档:https://docs.hortonworks.com/HDPDocuments/SS1/SmartSense-1.1.0/bk_smartsense_admin/content/ch01s02s05s05.html

Ambari2.5.3卸载smartsense