机器环境适用于——CentOS/redhat
注:生产环境谨慎尝试
停止Ambari服务
1 | ambari-server stop |
删除hdp.repo和hdp-util.repo
1 | cd /etc/yum.repos.d/ |
2 | rm -rf hdp* |
3 | rm -rf HDP* |
4 | rm -rf ambari* |
删除安装包
1 | 用yum list installed | grep HDP来检查安装的ambari的包 |
2 | |
3 | yum remove -y ambari-* |
4 | yum remove -y postgresql |
5 | |
6 | yum remove -y sqoop.noarch |
7 | yum remove -y lzo-devel.x86_64 |
8 | yum remove -y hadoop-libhdfs.x86_64 |
9 | yum remove -y rrdtool.x86_64 |
10 | yum remove -y hbase.noarch |
11 | yum remove -y pig.noarch |
12 | yum remove -y lzo.x86_64 |
13 | yum remove -y ambari-log4j.noarch |
14 | yum remove -y oozie.noarch |
15 | yum remove -y oozie-client.noarch |
16 | yum remove -y gweb.noarch |
17 | yum remove -y snappy-devel.x86_64 |
18 | yum remove -y hcatalog.noarch |
19 | yum remove -y python-rrdtool.x86_64 |
20 | yum remove -y nagios.x86_64 |
21 | yum remove -y webhcat-tar-pig.noarch |
22 | yum remove -y snappy.x86_64 |
23 | yum remove -y libconfuse.x86_64 |
24 | yum remove -y webhcat-tar-hive.noarch |
25 | yum remove -y ganglia-gmetad.x86_64 |
26 | yum remove -y extjs.noarch |
27 | yum remove -y hive.noarch |
28 | yum remove -y hadoop-lzo.x86_64 |
29 | yum remove -y hadoop-lzo-native.x86_64 |
30 | yum remove -y hadoop-native.x86_64 |
31 | yum remove -y hadoop-pipes.x86_64 |
32 | yum remove -y nagios-plugins.x86_64 |
33 | yum remove -y hadoop.x86_64 |
34 | yum remove -y zookeeper.noarch |
35 | yum remove -y hadoop-sbin.x86_64 |
36 | yum remove -y ganglia-gmond.x86_64 |
37 | yum remove -y libganglia.x86_64 |
38 | yum remove -y perl-rrdtool.x86_64 |
39 | yum remove -y epel-release.noarch |
40 | yum remove -y compat-readline5* |
41 | yum remove -y fping.x86_64 |
42 | yum remove -y perl-Crypt-DES.x86_64 |
43 | yum remove -y exim.x86_64 |
44 | yum remove -y ganglia-web.noarch |
45 | yum remove -y perl-Digest-HMAC.noarch |
46 | yum remove -y perl-Digest-SHA1.x86_64 |
删除快捷方式
1 | cd /etc/alternatives |
2 | rm -rf hadoop-etc |
3 | rm -rf zookeeper-conf |
4 | rm -rf hbase-conf |
5 | rm -rf hadoop-log |
6 | rm -rf hadoop-lib |
7 | rm -rf hadoop-default |
8 | rm -rf oozie-conf |
9 | rm -rf hcatalog-conf |
10 | rm -rf hive-conf |
11 | rm -rf hadoop-man |
12 | rm -rf sqoop-conf |
13 | rm -rf hadoop-conf |
删除用户
1 | userdel nagios |
2 | userdel hive |
3 | userdel ambari-qa |
4 | userdel hbase |
5 | userdel oozie |
6 | userdel hcat |
7 | userdel mapred |
8 | userdel hdfs |
9 | userdel rrdcached |
10 | userdel zookeeper |
11 | userdel mysql |
12 | userdel sqoop |
13 | userdel puppet |
删除文件夹
1 | rm -rf /hadoop |
2 | rm -rf /etc/hadoop |
3 | rm -rf /etc/hbase |
4 | rm -rf /etc/hcatalog |
5 | rm -rf /etc/hive |
6 | rm -rf /etc/ganglia |
7 | rm -rf /etc/nagios |
8 | rm -rf /etc/oozie |
9 | rm -rf /etc/sqoop |
10 | rm -rf /etc/zookeeper |
11 | rm -rf /etc/flume |
12 | rm -rf /etc/storm |
13 | rm -rf /etc/hive-hcatalog |
14 | rm -rf /etc/tez |
15 | rm -rf /etc/falcon |
16 | rm -rf /etc/knox |
17 | rm -rf /etc/hive-webhcat |
18 | rm -rf /etc/kafka |
19 | rm -rf /etc/slider |
20 | rm -rf /etc/storm-slider-client |
21 | rm -rf /etc/spark |
22 | rm -rf /var/lib/ambari* |
23 | rm -rf /usr/lib/hadoop |
24 | rm -rf /usr/lib/hbase |
25 | rm -rf /usr/lib/hcatalog |
26 | rm -rf /usr/lib/hive |
27 | rm -rf /usr/lib/oozie |
28 | rm -rf /usr/lib/sqoop |
29 | rm -rf /usr/lib/zookeeper |
30 | rm -rf /var/lib/hive |
31 | rm -rf /var/lib/ganglia |
32 | rm -rf /var/lib/oozie |
33 | rm -rf /var/lib/zookeeper |
34 | rm -rf /var/tmp/oozie |
35 | rm -rf /var/nagios |
36 | |
37 | rm -rf /tmp/hive |
38 | rm -rf /tmp/nagios |
39 | rm -rf /tmp/ambari-qa |
40 | rm -rf /tmp/sqoop-ambari-qa |
41 | rm -rf /hadoop/oozie |
42 | rm -rf /hadoop/zookeeper |
43 | rm -rf /hadoop/mapred |
44 | rm -rf /hadoop/hdfs |
45 | |
46 | rm -rf /tmp/hadoop-hive |
47 | rm -rf /tmp/hadoop-nagios |
48 | rm -rf /tmp/hadoop-hcat |
49 | rm -rf /tmp/hadoop-ambari-qa |
50 | rm -rf /tmp/hsperfdata_hbase |
51 | rm -rf /tmp/hsperfdata_hive |
52 | rm -rf /tmp/hsperfdata_nagios |
53 | rm -rf /tmp/hsperfdata_oozie |
54 | rm -rf /tmp/hsperfdata_zookeeper |
55 | rm -rf /tmp/hsperfdata_mapred |
56 | rm -rf /tmp/hsperfdata_hdfs |
57 | rm -rf /tmp/hsperfdata_hcat |
58 | rm -rf /tmp/hsperfdata_ambari-qa |
59 | |
60 | rm -rf /var/run/hadoop |
61 | rm -rf /var/run/hbase |
62 | rm -rf /var/run/hive |
63 | rm -rf /var/run/ganglia |
64 | rm -rf /var/run/nagios |
65 | rm -rf /var/run/oozie |
66 | rm -rf /var/run/zookeeper |
67 | rm -rf /var/run/spark |
68 | rm -rf /var/run/hadoop |
69 | rm -rf /var/run/hbase |
70 | rm -rf /var/run/zookeeper |
71 | rm -rf /var/run/flume |
72 | rm -rf /var/run/storm |
73 | rm -rf /var/run/webhcat |
74 | rm -rf /var/run/hadoop-yarn |
75 | rm -rf /var/run/hadoop-mapreduce |
76 | rm -rf /var/run/kafka |
77 | rm -rf /var/log/ambari* |
78 | rm -rf /var/log/hadoop |
79 | rm -rf /var/log/hbase |
80 | rm -rf /var/log/flume |
81 | rm -rf /var/log/storm |
82 | rm -rf /var/log/hadoop-yarn |
83 | rm -rf /var/log/hadoop-mapreduce |
84 | rm -rf /var/log/knox |
85 | rm -rf /var/log/hadoop |
86 | rm -rf /var/log/hbase |
87 | rm -rf /var/log/hive |
88 | rm -rf /var/log/nagios |
89 | rm -rf /var/log/oozie |
90 | rm -rf /var/log/zookeeper |
至此大部分的删除完毕,还有些没有删除干净的。再次安装会检测出来,再根据提示删除