1. CDH6.0.1 卸载装了CDH各种问题导致稳定性问题,希望卸载重装,又担心卸载不干净会影响再次安装。这里记录下完整删除过程,都是实际验证过并重新安装成功而没有任何影响,可以不用担心卸载问题。
1. 停止服务
systemctl stop cloudera-scm-server
systemctl stop cloudera-scm-agent
2. 通过yum -y remove删除
rpm -qa | grep cloudera
yum -y remove "cloudera-manager-*"
rpm -qa | grep cloudera
yum clean all
3. 取消挂载
umount cm_processes
umount /var/run/cloudera-scm-agent/process
4. 删除残余文件
cd /opt/
rm -rf cloudera/
rm -Rf /usr/share/cmf /var/lib/cloudera* /var/cache/yum/cloudera* /var/log/cloudera* \
/var/run/cloudera*
rm -rf /tmp/.scmpreparenode.lock
# 如果有安装hadoop等组件
rm -Rf /var/lib/hadoop* /var/lib/zookeeper /var/lib/flume-ng /var/lib/hue /var/lib/yarn-ce \
/var/lib/spark /var/lib/oozie /var/lib/hbase /var/lib/hive* /var/lib/impala /var/lib/sqoop* \
/var/lib/kafka /var/lib/sentry /var/lib/solr /var/lib/kudu /var/lib/navigator \
/var/local/kafka
# 删除日志
rm -Rf /var/log/hadoop* /var/log/hbase /var/log/hive /var/log/hue* /var/log/impala* \
/var/log/flume-ng /var/log/kafka /var/log/oozie /var/log/spark* /var/log/zookeeper \
/var/log/livy /var/log/statestore /var/log/catalogd
# 删除配置
rm -Rf /etc/flume* /etc/hadoop* /etc/zookeeper* /etc/hive* /etc/hue /etc/impala \
/etc/sqoop* /etc/oozie /etc/hbase* /etc/kafka /etc/kudu /etc/mahout /etc/spark* \
/etc/llama /etc/solr /etc/sentry /etc/livy
# 删除hdfs,yarn,impala数据
rm -rf /data1/dfs /data2/dfs /data3/dfs /data4/dfs \
/data1/yarn /data2/yarn /data3/yarn /data4/yarn \
/data1/impala /data2/impala /data3/impala /data4/impala \
/usr/bin/mapred
# 安装不同版本可能需要清理软连接
cd /usr/bin/
rm -rf avro-tools beeline bigtop-detect-javahome catalogd cli_mt cli_st flume* hadoop* hbase* \
hcat hdfs hive* hue* impala* kafka* kite-dataset kudu* load_gen mapred oozie parquet-tools \
pig* pyspark sentry* solr* spark* sqoop* statestored yarn zookeeper*
cd /etc/alternatives
rm -rf avro-tools beeline bigtop-detect-javahome catalogd cli_mt cli_st flume* hadoop* hbase* \
hcat hdfs hive* hue* impala* kafka* kite-dataset kudu* load_gen mapred oozie parquet-tools \
pig* pyspark sentry* solr* spark* sqoop* statestored yarn zookeeper*
cd /var/lib/alternatives
rm -rf avro-tools beeline bigtop-detect-javahome catalogd cli_mt cli_st flume* hadoop* hbase* \
hcat hdfs hive* hue* impala* kafka* kite-dataset kudu* load_gen mapred oozie parquet-tools \
pig* pyspark sentry* solr* spark* sqoop* statestored yarn zookeeper*
卸载完成!
2. MySQL5.7.27卸载
如果担心MySQL问题,可以通过rpm删除,并清除残余文件。
1. 停止服务
systemctl stop mysqld
2. 通过 rpm -e --nodeps 卸载所有mysql服务
rpm -qa | grep mysql
rpm -e --nodeps mysql-community-libs-compat-5.7.27-1.el7.x86_64
rpm -e --nodeps mysql-community-server-5.7.27-1.el7.x86_64
rpm -e --nodeps mysql-community-libs-5.7.27-1.el7.x86_64
rpm -e --nodeps mysql-community-client-5.7.27-1.el7.x86_64
rpm -e --nodeps mysql-community-common-5.7.27-1.el7.x86_64
rpm -e --nodeps mysql-python-1.2.5-1.el7.x86_64
3. 删除残余文件
rm -rf /etc/my.cnf
rm -rf /usr/lib/mysql
rm -rf /usr/lib64/mysql
rm -rf /usr/include/mysql
rm -rf /usr/share/mysql
rm -rf /var/log/mysqld.log
rm -rf /var/lib/mysql