因爲版本更新升級軟件的時候,須要將舊的ambari和hdp刪除,從新安裝,下面介紹下卸載舊的ambari和hdp方法。ios
停掉ambari-server服務,重置ambari數據庫,操做以下所示:數據庫
進入/etc/yum.repos.d/目錄,刪除ambari和hdp相關的配置文件,操做命令以下:ide
cd /etc/yum.repos.d/oop
rm -rf hdp*spa
rm -rf HDP*server
rm -rf ambari*hadoop
操做演示以下:io
首先用yum list installed | grep -i ambari和yum list installed | grep -i hdp命令檢查已經安裝的ambari和hdp的包,將它們所有卸載,操做以下:zookeeper
刪除的時候能夠一個一個刪除,也能夠指定多個安裝包一塊兒卸載,操做以下所示:軟件
刪除ambari和hdp安裝過程當中建立的全部用戶,操做以下所示:
刪除ambari和hdp安裝過程當中建立的一些文件夾,下面的目錄是一些參考文件夾,若是有的話刪除,沒有跳過:
rm -rf /hadoop
rm -rf /etc/hadoop
rm -rf /etc/hbase
rm -rf /etc/hcatalog
rm -rf /etc/hive
rm -rf /etc/ganglia
rm -rf /etc/nagios
rm -rf /etc/oozie
rm -rf /etc/sqoop
rm -rf /etc/zookeeper
rm -rf /var/run/hadoop
rm -rf /var/run/hbase
rm -rf /var/run/hive
rm -rf /var/run/ganglia
rm -rf /var/run/nagios
rm -rf /var/run/oozie
rm -rf /var/run/zookeeper
rm -rf /var/log/hadoop
rm -rf /var/log/hbase
rm -rf /var/log/hive
rm -rf /var/log/nagios
rm -rf /var/log/oozie
rm -rf /var/log/zookeeper
rm -rf /usr/lib/hadoop
rm -rf /usr/lib/hbase
rm -rf /usr/lib/hcatalog
rm -rf /usr/lib/hive
rm -rf /usr/lib/oozie
rm -rf /usr/lib/sqoop
rm -rf /usr/lib/zookeeper
rm -rf /var/lib/hive
rm -rf /var/lib/ganglia
rm -rf /var/lib/oozie
rm -rf /var/lib/zookeeper
rm -rf /var/tmp/oozie
rm -rf /tmp/hive
rm -rf /tmp/nagios
rm -rf /tmp/ambari-qa
rm -rf /tmp/sqoop-ambari-qa
rm -rf /var/nagios
rm -rf /hadoop/oozie
rm -rf /hadoop/zookeeper
rm -rf /hadoop/mapred
rm -rf /hadoop/hdfs
rm -rf /tmp/hadoop-hive
rm -rf /tmp/hadoop-nagios
rm -rf /tmp/hadoop-hcat
rm -rf /tmp/hadoop-ambari-qa
rm -rf /tmp/hsperfdata_hbase
rm -rf /tmp/hsperfdata_hive
rm -rf /tmp/hsperfdata_nagios
rm -rf /tmp/hsperfdata_oozie
rm -rf /tmp/hsperfdata_zookeeper
rm -rf /tmp/hsperfdata_mapred
rm -rf /tmp/hsperfdata_hdfs
rm -rf /tmp/hsperfdata_hcat
rm -rf /tmp/hsperfdata_ambari-qa