在华为云上安装CDH6.3教程
时间: 2024-06-09 20:08:14 浏览: 186
CDH6.3安装指南.pdf
3星 · 编辑精心推荐
安装CDH6.3需要几个步骤:
1. 创建华为云ECS实例:在华为云控制台创建ECS实例,选择操作系统为CentOS 7.6 64位。
2. 安装CDH依赖包:在ECS实例中运行以下命令安装CDH依赖包。
```
sudo yum install -y wget curl openssh-server ntp ntpdate unzip lsof net-tools bind-utils
```
3. 安装JDK:CDH需要Java环境,可以通过以下命令安装Oracle JDK 8。
```
sudo wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" \
http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm
sudo yum localinstall -y jdk-8u131-linux-x64.rpm
```
4. 安装CDH:通过以下步骤安装CDH。
- 添加CDH6仓库
```
sudo wget https://archive.cloudera.com/cdh6/6.3.0/redhat7/yum/cloudera-cdh6.repo -P /etc/yum.repos.d/
```
- 安装CDH
```
sudo yum install -y hadoop hadoop-hdfs-namenode hadoop-hdfs-datanode hadoop-mapreduce \
hadoop-yarn-nodemanager hadoop-yarn-resourcemanager hadoop-hdfs-journalnode hadoop-hdfs-zkfc \
hive hive-metastore hive-server2 impala impala-server impala-shell impala-catalog \
impala-state-store impala-shell solr-server solr-doc zookeeper-server \
zookeeper-devel hue hue-plugins flume-ng-agent oozie oozie-client sqoop \
sqoop2-server sqoop2-client spark-core spark-python spark-worker spark-history-server \
spark-thrift-server spark-yarn-shuffle spark-master spark-driver spark-examples \
spark-r spark-sql spark-streaming spark-ganglia-monitoring spark-ganglia-shuffle-monitoring \
spark-javadoc spark-doc python-devel python-pip
```
5. 配置Hadoop:进行以下配置。
- 配置Hadoop
```
sudo /usr/bin/hadoop namenode -format
```
- 启动Hadoop
```
sudo systemctl start hadoop-hdfs-namenode
sudo systemctl start hadoop-hdfs-datanode
sudo systemctl start hadoop-yarn-resourcemanager
sudo systemctl start hadoop-yarn-nodemanager
sudo systemctl start hadoop-hdfs-journalnode
sudo systemctl start hadoop-hdfs-zkfc
```
6. 配置Hue:通过以下步骤配置Hue。
- 修改hue配置文件
```
sudo cp /usr/lib/hue/desktop/conf.dist/hue.ini /usr/lib/hue/desktop/conf/hue.ini
sudo sed -i 's/localhost/0.0.0.0/g' /usr/lib/hue/desktop/conf/hue.ini
```
- 启动Hue
```
sudo systemctl start hue
```
7. 配置Impala:通过以下步骤配置Impala。
- 启动Impala
```
sudo systemctl start impala-server
sudo systemctl start impala-catalog
sudo systemctl start impala-state-store
```
- 配置Impala daemon
```
sudo cp /etc/impala/conf.dist/impalad_flags /etc/impala/conf/
sudo sed -i 's/--num_scan_ranges_per_disk=0/--num_scan_ranges_per_disk=1/g' /etc/impala/conf/impalad_flags
sudo sed -i 's/--use_local_catalog/--use_local_catalog --enable_rm=false/g' /etc/impala/conf/impalad_flags
```
8. 配置Oozie:通过以下步骤配置Oozie。
- 修改oozie配置文件
```
sudo cp /usr/lib/oozie/conf.dist/oozie-site.xml /usr/lib/oozie/conf/
sudo sed -i 's/localhost/your_hostname/g' /usr/lib/oozie/conf/oozie-site.xml
```
- 启动Oozie
```
sudo systemctl start oozie
```
9. 完成安装:至此,CDH6.3已经安装完成。
注意:以上步骤仅供参考,具体操作可能与实际情况略有不同。在实际操作中,请根据实际情况进行相应的修改。
阅读全文