怎么使用基于CM安装的CDH卸载
本篇内容主要讲解“怎么使用基于CM安装的CDH卸载”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“怎么使用基于CM安装的CDH卸载”吧!
创新互联建站是专业的将乐网站建设公司,将乐接单;提供成都网站设计、网站建设,网页设计,网站设计,建网站,PHP网站建设等专业做网站服务;采用PHP框架,可快速的进行将乐网站开发网页制作和功能扩展;专业做搜索引擎喜爱的网站,专业的做网站团队,希望更多企业前来合作!
一、卸载CM:(CM主机执行)1、移除所有服务
先在Cloudera Manager管理端停止集群所有组件服务,然后删除所有服务。
2、删除Manager Server(一直选yes. 卸载不成功执行步骤3)
到CM所安装的主机上执行如下命令,需要root权限:
sudo/usr/share/cmf/uninstall-cloudera-manager.sh
3、如果没有该脚本,则可以手动删除,先停止服务:
命令如下:
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:(所有主机执行)1、删除所有CDH节点上的CDH服务
sudo service cloudera-scm-agent hard_stop
2、卸载cloudera的rpm包
查看:
rpm -qa | grep cloudera
逐个将其删除:
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*
**如报文件占用错误,重启机器,立即执行该命令
数据库配置:
rm -rf /etc/cloudera*
4、清理Cloudera 相关文件
命令如下:
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、清除上一个版本的数据(旧版本是4.*需要删除该目录)
命令如下:
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、删除日志及缓存数据目录
命令如下:
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、杀死相关的进程
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 包分发文件和解压文件
rm -rf /opt/cloudera/parcel-cache /opt/cloudera/parcels
到此,相信大家对“怎么使用基于CM安装的CDH卸载”有了更深的了解,不妨来实际操作一番吧!这里是创新互联网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!
当前题目:怎么使用基于CM安装的CDH卸载
当前URL:http://pwwzsj.com/article/jpeigc.html