本篇內(nèi)容主要講解“怎么使用基于CM安裝的CDH卸載”,感興趣的朋友不妨來看看。本文介紹的方法操作簡單快捷,實(shí)用性強(qiáng)。下面就讓小編來帶大家學(xué)習(xí)“怎么使用基于CM安裝的CDH卸載”吧!
創(chuàng)新互聯(lián)建站是專業(yè)的將樂網(wǎng)站建設(shè)公司,將樂接單;提供成都網(wǎng)站設(shè)計(jì)、網(wǎng)站建設(shè),網(wǎng)頁設(shè)計(jì),網(wǎng)站設(shè)計(jì),建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行將樂網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊(duì),希望更多企業(yè)前來合作!
一、卸載CM:(CM主機(jī)執(zhí)行)1、移除所有服務(wù)?
先在Cloudera Manager管理端停止集群所有組件服務(wù),然后刪除所有服務(wù)。
2、刪除Manager Server(一直選yes. 卸載不成功執(zhí)行步驟3)
到CM所安裝的主機(jī)上執(zhí)行如下命令,需要root權(quán)限:
sudo/usr/share/cmf/uninstall-cloudera-manager.sh
3、如果沒有該腳本,則可以手動(dòng)刪除,先停止服務(wù):
命令如下:
sudo service cloudera-scm-server stop
sudo service cloudera-scm-server-db stop
sudo yum remove cloudera-manager-server
sudo yum remove cloudera-manager-server-db
二、卸載CDH:(所有主機(jī)執(zhí)行)1、刪除所有CDH節(jié)點(diǎn)上的CDH服務(wù)
sudo service cloudera-scm-agent hard_stop
2、卸載cloudera的rpm包
查看:
rpm -qa | grep cloudera
逐個(gè)將其刪除:
for f in `rpm -qa | grep cloudera ` ; do rpm -e ${f} ; done
sudo yum remove 'cloudera-manager-*' hadoop hue-common 'bigtop-*'
3、刪除cloudera的安裝目錄
sudo rm -rf /usr/share/cmf /var/lib/cloudera* /var/cache/yum/x86_64/6/cloudera* /var/log/cloudera* /var/run/cloudera*
**如報(bào)文件占用錯(cuò)誤,重啟機(jī)器,立即執(zhí)行該命令
數(shù)據(jù)庫配置:
rm -rf /etc/cloudera*
4、清理Cloudera 相關(guān)文件
命令如下:
sudo rm -rf /var/lib/flume-ng /var/lib/hadoop* /var/lib/hue /var/lib/oozie /var/lib/solr /var/lib/sqoop*
sudo rm -rf /dfs /mapred /yarn
rm -rf /var/run/hadoop* /var/run/flume-ng* /var/run/cloudera* /var/run/oozie* /var/run/sqoop* /var/run/zookeeper* /var/run/hbase* /var/run/impala* /var/run/hive* /var/run/hdfs-sockets
rm -rf /usr/lib/hadoop /usr/lib/hadoop* /usr/lib/hive /usr/lib/hbase /usr/lib/oozie /usr/lib/sqoop* /usr/lib/zookeeper /usr/lib/bigtop* /usr/lib/flume-ng /usr/lib/hcatalog
rm -rf /usr/bin/hadoop* /usr/bin/zookeeper* /usr/bin/hbase* /usr/bin/hive* /usr/bin/hdfs /usr/bin/mapred /usr/bin/yarn /usr/bin/sqoop* /usr/bin/oozie
rm -rf /etc/hadoop* /etc/zookeeper* /etc/hive* /etc/hue /etc/impala /etc/sqoop* /etc/oozie /etc/hbase* /etc/hcatalog
5、清除alternatives目錄下配置
命令如下:
rm -rf /etc/alternatives/flume*
rm -rf /etc/alternatives/hadoop*
rm -rf /etc/alternatives/hbase*
rm -rf /etc/alternatives/hive*
rm -rf /etc/alternatives/hue*
rm -rf /etc/alternatives/impala*
rm -rf /etc/alternatives/llama*
rm -rf /etc/alternatives/oozie*
rm -rf /etc/alternatives/pig*
rm -rf /etc/alternatives/solr*
rm -rf /etc/alternatives/spark*
rm -rf /etc/alternatives/sqoop*
rm -rf /etc/alternatives/zookeeper*
6、清除上一個(gè)版本的數(shù)據(jù)(舊版本是4.*需要?jiǎng)h除該目錄)
命令如下:
rm -rf /var/lib/alternatives/{cdh.app}
rm -rf /var/lib/alternatives/flume*
rm -rf /var/lib/alternatives/hadoop*
rm -rf /var/lib/alternatives/hbase*
rm -rf /var/lib/alternatives/hive*
rm -rf /var/lib/alternatives/hue*
rm -rf /var/lib/alternatives/impala*
rm -rf /var/lib/alternatives/llama*
rm -rf /var/lib/alternatives/oozie*
rm -rf /var/lib/alternatives/pig*
rm -rf /var/lib/alternatives/solr*
rm -rf /var/lib/alternatives/spark*
rm -rf /var/lib/alternatives/sqoop*
rm -rf /var/lib/alternatives/zookeeper*
7、刪除日志及緩存數(shù)據(jù)目錄
命令如下:
tmpwatch -afv 1 /tmp
rm -rf /opt/cloudera/*
rm -rf /var/log/hadoop-*
rm -rf /var/log/hue*
rm -rf /var/log/oozie*
rm -rf /var/log/sqoop*
rm -rf /var/log/pig*
rm -rf /var/log/hive*
rm -rf /var/log/hbase*
rm -rf /var/log/zookeeper*
rm -rf /var/log/mahout*
rm -rf /var/log/impala*
rm -rf /var/log/hdfs*
rm -rf /var/lib/hdfs*
rm -rf /var/lib/alternatives/hdfs*
rm -rf /var/run/hdfs*
rm -rf /etc/hdfs*
rm -rf /etc/alternatives/hdfs*
rm -rf /usr/bin/hdfs*
rm -rf /var/run/hdfs*
rm -rf /var/log/yarn*
rm -rf /var/log/whirr*
rm -rf /var/log/mapred*
rm -rf /var/lib/mapred*
rm -rf /var/lib/alternatives/mapred*
rm -rf /var/run/mapred*
rm -rf /etc/mapred*
rm -rf /etc/alternatives/mapred*
rm -rf /usr/bin/mapred*
rm -rf /var/run/mapred*
8、殺死相關(guān)的進(jìn)程
for u in hdfs mapred cloudera-scm hbase hue zookeeper oozie hive impala flume spark; do sudo kill $(ps -u $u -o pid=); done
9、刪除 Cloudera Manager的lock file
sudo rm /tmp/.scm_prepare_node.lock
10、刪除parcel 包分發(fā)文件和解壓文件
rm -rf /opt/cloudera/parcel-cache /opt/cloudera/parcels
到此,相信大家對(duì)“怎么使用基于CM安裝的CDH卸載”有了更深的了解,不妨來實(shí)際操作一番吧!這里是創(chuàng)新互聯(lián)網(wǎng)站,更多相關(guān)內(nèi)容可以進(jìn)入相關(guān)頻道進(jìn)行查詢,關(guān)注我們,繼續(xù)學(xué)習(xí)!