完全卸载hadoop安装的组件(hdp版本)

2018/03/06 15:09
阅读数 52

yum remove -y hadoop_* zookeeper* ranger* hbase_* ranger* hbase_* ambari-* hadoop_* zookeeper_* hbase* range* pig* hive* tez* mysql-* bigtop-* tuned-* ambari-* apache-maven* postgresql* hdp-select*

cd /usr/lib/
rm -rf hadoop hbase zookeeper hcatalog hive ambari-* storm ams-hbase flume hadoop-* falcon* slider* pgsql* hdp-select*

cd /var/lib/
rm -rf ambari-* hadoop-* pgsql oozie* hive* falcon* slider* knox* hdp-select*

cd /var/log/
rm -rf hadoop hbase spark tuned ambari-* zookeeper hadoop-* hive* oozie* storm* kafka* falcon* slider* sqoop* flume* atlas* hdp-select*
find ./ -type f | grep -E "[a-z]+-[0-9]+" | xargs rm

cd /etc/
rm -rf hadoop hbase hive* ambari-* spark tez tuned zookeeper maven* oozie* storm* ams-* hadoop-* falcon* slider* hdp-select*

rm -rf /hadoop/*

cd /usr/share
rm -rf apache-maven HDP-oozie maven-* falcon* hdp-select*

rm -rf /usr/hdp
cd /usr/bin
rm -rf mvnyjp
ls -la | grep hdp | awk '{ print $9 }' | xargs rm

cd /home
rm -rf oozie mapred zookeeper storm yarn hive spark tez kafka hcat hdfs hbase ams ambari-* knox

cd /var/spool/mail
rm -rf ambari-* ams hadoop hbase hcat hdfs hive kafka knox mapred oozie slider spark storm tez yarn zookeeper

cd /
rm -rf kafka-logs hadoop
cd /tmp
rm -rf hadoop* hsperfdata* Jetty* hbase* ambari* jetty* MIME* ehcache* oozie* hive

cd /usr/lib/python2.6/site-packages
rm -rf ambari* resource_*
ps aux | grep ambari | awk '{ print NR=$2 }' | xargs kill -9

rm -rf /var/run/hdfs-sockets

rm -rf /tmp/hive* /tmp/ambari* /tmp/hcat* /tmp/haoop* /tmp/spark* /tmp/hadoop*
rm -rf /tmp/*_mapred /tmp/*_yarn /tmp/*_ambari-qa /tmp/*_ams /tmp/*_hcat /tmp/*_hdfs /tmp/*_hive /tmp/*_livy /tmp/*_spark /tmp/*_zookeeper

yum clean metadata
yum repolist


yum remove openssh-clients
yum remove openssl-devel
yum remove openssl
yum remove openssl-devel
yum remove nc
yum remove redhat-lsb
yum remove ntpdate
yum remove ntp
yum remove httpd
yum remove gcc
yum remove python-devel
yum remove python-libs
yum remove postgresql-server
yum remove unzip
yum remove -y mysql-connector-java
yum remove rpcbind

#接下来删除里面对应的用户和组.
vi /etc/passwd
vi /etc/group

userdel -rf hive
userdel -rf mapred
userdel -rf hbase
userdel -rf ambari-qa
userdel -rf zookeeper
userdel -rf tez
userdel -rf hdfs
userdel -rf sqoop
userdel -rf yarn
userdel -rf hcat
userdel -rf ams
userdel -rf spark
userdel -rf slider
userdel -rf livy
userdel -rf oozie
userdel -rf flume
userdel -rf infra-solr
userdel -rf mahout
userdel -rf activity_analyzer
userdel -rf kms
userdel -rf ranger


rm -rf /usr/hdp
rm -rf /etc/hadoop
rm -rf /etc/hbase
rm -rf /etc/hive
rm -rf /etc/oozie
rm -rf /etc/sqoop
rm -rf /etc/hue
rm -rf /etc/zookeeper
rm -rf /etc/hive-hcatalog
rm -rf /etc/hive-webhcat
rm -rf /etc/mahout
rm -rf /etc/spark
rm -rf /etc/pig
rm -rf /etc/tez
rm -rf /etc/livy
rm -rf /var/run/hadoop
rm -rf /var/run/zookeeper
rm -rf /var/run/hbase
rm -rf /var/log/hadoop
rm -rf /var/log/zookeeper
rm -rf /var/log/hbase
rm -rf /var/lib/hadoop*

 

#卸载ambari
cd /usr/lib/
rm -rf ambari-*
cd /var/lib/
rm -rf ambari-*
cd /var/log/
rm -rf ambari-*
cd /etc/
rm -rf ambari-*
cd /usr/lib/python2.6/site-packages
rm -rf ambari* resource_*

ps aux | grep ambari | awk '{ print NR=$2 }' | xargs kill -9

 

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