停止集群服务
1.停止Cluster
在cloudera manager主页上选择Cluster1菜单的停止选项
在弹出的对话框中选择停止
集群服务停止完成
2.停止Cloudera Management Service
选择Coudera Management Server菜单的停止选项
Cloudera Management Server停止完成
解除并移除Parcel
在parcel页面,点击右方停用按钮
选择仅限停用状态,确定
点击“分配”下方菜单,选择“删除”
删除集群
点击Cluster1右方菜单,选择“删除“
卸载Cloudera Manager Server
1.停止cloudera-scm-server
在主节点使用命令:systemctl stop cloudera-scm-server
停止服务
2.移除cloudera-scm-server
使用 yum-y remove cloudera-manager-server
移除该服务
卸载Cloudera Manager Agent和Managed Software
1.停止cloudera-scm-agent
使用脚本批量停止所有节点的cloudera-scm-agent服务
./batch_cmd node.list "service cloudera-scm-agent stop"
2.卸载集群软件
使用脚本批量卸载所有节点上的软件
./batch_cmd node.list "yum remove 'cloudera-manager-*' avro-tools crunch flume-ng hadoop-hdfs-fuse hadoop-hdfs-nfs3 hadoop-httpfs hadoop-kms hbase-solr hive-hbase hive-webhcat hue-beeswax hue-hbase hue-impala hue-pig hue-plugins hue-rdbms hue-search hue-spark hue-sqoop hue-zookeeper impala impala-shell kite llama mahout oozie pig pig-udf-datafu search sentry solr-mapreduce spark-core spark-master spark-worker spark-history-server spark-python sqoop sqoop2 whirr hue-common oozie-client solr solr-doc sqoop2-client zookeeper"
3.执行清除
使用脚本执行命令 ./batch_cmd.sh node.list"yum clean all"
批量清除
移除Cloudera Manager和用户数据
1.杀死相关进程
在所有节点使用 ps-ef|grep supervisor
, kill-9
进程号,杀死相关进程
2.删除Cloudera Manager数据
使用脚本命令删除所有节点的Cloudera Manager数据
./batch_cmd.sh node.list "umount cm_processes"
./batch_cmd.sh node.list "rm -rf /usr/share/cmf/var/lib/cloudera*/var/cache/yum/x86_64/7Server/cloudera*/var/log/cloudera*/var/run/cloudera*/etc/cloudera*/usr/lib64/cmf"
3.移除Cloudera Manager Lock File
删除所有节点的.scmpreparenode.lock文件
./batch_cmd.sh node.list "rm -rf /tmp/.scm_prepare_node.lock"
4.移除用户数据
在所有节点删除用户数据目录
rm -rf /var/lib/flume-ng /var/lib/hadoop* /var/lib/hue /var/lib/navigator /var/lib/oozie /var/lib/solr /var/lib/sqoop* /var/lib/zookeeper /usr/lib/hadoop /usr/lib/hadoop* /usr/lib/hive /usr/lib/hbase /usr/lib/hue /usr/lib/oozie /usr/lib/sqoop* /usr/lib/zookeeper /usr/lib/bigtop* /usr/lib/flume-ng /usr/lib/hcatalog /var/run/hadoop* /var/run/flume-ng /var/run/cloudera* /var/run/oozie /var/run/sqoop2 /var/run/zookeeper /var/run/hbase /var/run/hbase /var/run/impala /var/run/hive /var/run/hdfs-sockets
删除服务命令
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/cloudera* /etc/hadoop* /etc/zookeeper* /etc/hive* /etc/hue /etc/impala /etc/sqoop* /etc/oozie /etc/hbase* /etc/hcatalog /etc/sentry /etc/solr /etc/spark*
rm -rf /etc/alternatives/avro-tools /etcalternatives/beeline /etc/alternatives/catalogd /etc/alternatives/cli_* /etc/alternatives/flume* /etc/alternatives/hadoop* /etc/alternatives/hbase* /etc/alternatives/impala* /etc/alternatives/llama* /etc/alternatives/hcat /etc/alternatives/hdfs /etc/alternatives/hive* /etc/alternatives/hue* /etc/alternatives/load_gen /etc/alternatives/mahout* /etc/alternatives/mapred /etc/alternatives/oozie* /etc/alternatives/pig* /etc/alternatives/pyspark /etc/alternatives/sentry* /etc/alternatives/solr* /etc/alternatives/spark* /etc/alternatives/sqoop* /etc/alternatives/statestored /etc/alternatives/whirr /etc/alternatives/yarn /etc/alternatives/zookeeper
rm -rf /var/lib/alternatives/avro-tools /var/lib/alternatives/beeline /var/lib/alternatives/catalogd /var/lib/alternatives/cli_* /var/lib/alternatives/flume* /var/lib/alternatives/hadoop* /var/lib/alternatives/hbase* /var/lib/alternatives/hcat /var/lib/alternatives/hdfs /var/lib/alternatives/hive* /var/lib/alternatives/load_gen /var/lib/alternatives/hue* /var/lib/alternatives/impala* /var/lib/alternatives/llama* /var/lib/alternatives/mahout* /var/lib/alternatives/mapred /var/lib/alternatives/oozie* /var/lib/pig* /var/lib/alternatives/pyspark /var/lib/alternatives/sentry* /var/lib/alternatives/solr* /var/lib/alternatives/spark* /var/lib/alternatives/sqoop* /var/lib/alternatives/statestored /var/lib/whirr /var/lib/alternatives/yarn /var/lib/alternatives/zookeeper
5.删除hdfs,yarn
所有节点执行:
data_drive_path
为自己设置的路径
rm -rf data_drive_path/dfs/*rm -rf data_drive_path/yarn/*
使用 rm-rf/opt/cloudera/
移除数据库
1.停止数据库服务
执行:systemctl stop mariadb
2.删除数据库和数据库数据