Ambari卸载脚本

原创
2017/07/08 21:30
阅读数 424

新建sh文件,将下面的命令拷贝至一个脚本文件中,然后在root权限下执行

ambari-server stop
ambari-agent stop

yum remove hadoop_2* hdp-select* ranger_2* zookeeper* bigtop* atlas-metadata* ambari* postgresql spark*

yum list | grep @HDP

rm -rf /var/lib/pgsql  

userdel oozie
userdel hive
userdel ambari-qa
userdel flume  
userdel hdfs  
userdel knox  
userdel storm  
userdel mapred
userdel hbase  
userdel tez  
userdel zookeeper
userdel kafka  
userdel falcon
userdel sqoop  
userdel yarn  
userdel hcat
userdel atlas
userdel spark
userdel ams
userdel slider
userdel infra-solr
userdel logsearch
userdel activity_analyzer

rm -rf /home/atlas
rm -rf /home/accumulo
rm -rf /home/hbase
rm -rf /home/hive
rm -rf /home/oozie
rm -rf /home/storm
rm -rf /home/yarn
rm -rf /home/ambari-qa
rm -rf /home/falcon
rm -rf /home/hcat
rm -rf /home/kafka
rm -rf /home/mahout
rm -rf /home/spark
rm -rf /home/tez
rm -rf /home/zookeeper
rm -rf /home/flume
rm -rf /home/hdfs
rm -rf /home/knox
rm -rf /home/mapred
rm -rf /home/sqoop
rm -rf /home/ams
rm -rf /home/slider
rm -rf /home/infra-solr
rm -rf /home/logsearch
rm -rf /home/activity_analyzer

rm -rf /var/lib/ambari* 
rm -rf /usr/lib/python2.6/site-packages/ambari_*
rm -rf /usr/lib/python2.6/site-packages/resource_management
rm -rf /usr/lib/ambari-*
rm -rf /etc/ambari-* 

rm -rf /etc/hadoop
rm -rf /etc/hbase
rm -rf /etc/hive 
rm -rf /etc/oozie
rm -rf /etc/sqoop 
rm -rf /etc/zookeeper
rm -rf /etc/flume 
rm -rf /etc/storm 
rm -rf /etc/hive*
rm -rf /etc/tez 
rm -rf /etc/falcon 
rm -rf /etc/knox 
rm -rf /etc/hive-webhcat
rm -rf /etc/kafka 
rm -rf /etc/slider 
rm -rf /etc/storm-slider-client
rm -rf /etc/spark 
rm -rf /var/run/ambari-*
rm -rf /var/run/hive*
rm -rf /var/run/spark
rm -rf /var/run/hadoop*
rm -rf /var/run/hbase
rm -rf /var/run/zookeeper
rm -rf /var/run/flume
rm -rf /var/run/storm
rm -rf /var/run/webhcat
rm -rf /var/run/hadoop-yarn
rm -rf /var/run/hadoop-mapreduce
rm -rf /var/run/kafka
rm -rf /var/log/ambari-*
rm -rf /var/log/hadoop*
rm -rf /var/log/hbase
rm -rf /var/log/flume
rm -rf /var/log/storm
rm -rf /var/log/hadoop-yarn
rm -rf /var/log/hadoop-mapreduce
rm -rf /var/log/knox 
rm -rf /var/log/hst
rm -rf /var/log/smartsense-activity
rm -rf /var/lib/hive*
rm -rf /usr/lib/flume
rm -rf /usr/lib/storm
rm -rf /var/lib/hive 
rm -rf /var/lib/oozie
rm -rf /var/lib/flume
rm -rf /var/lib/hadoop-hdfs
rm -rf /var/lib/knox 
rm -rf /var/log/hive 
rm -rf /var/log/oozie
rm -rf /var/log/zookeeper
rm -rf /var/log/falcon
rm -rf /var/log/webhcat
rm -rf /var/log/spark
rm -rf /var/log/hive*
rm -rf /var/tmp/oozie
rm -rf /tmp/ambari-qa
rm -rf /var/hadoop
rm -rf /hadoop/falcon
rm -rf /tmp/hadoop 
rm -rf /tmp/hadoop-hdfs
rm -rf /usr/hdp
rm -rf /usr/hadoop
rm -rf /opt/hadoop
rm -rf /tmp/hadoop
rm -rf /var/hadoop
rm -rf /hadoop
rm -rf /etc/phoenix
rm -rf /etc/hst
rm -rf /etc/smartsense-activity
rm -rf /var/lib/zookeeper
rm -rf /var/lib/hadoop-yarn
rm -rf /var/lib/hadoop-mapreduce
rm -rf /var/lib/slider
rm -rf /var/lib/hsqldb

yum remove smartsense-hst
rm -rf /var/log/smartsense

yum remove ambari-metrics-monitor-2.5.1.0-159.x86_64 ambari-infra-solr-client-2.5.1.0-159.noarch ambari-metrics-grafana-2.5.1.0-159.x86_64 ambari-agent-2.5.1.0-159.x86_64 ambari-metrics-hadoop-sink-2.5.1.0-159.x86_64

yum clean all

 

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部