CDH的安装和设置
采用伪分布模式安装和设置CDH,前提是已经安装了Java和SSH。
1. 下载hadoop-2.6.0-cdh5.9.0,复制到/opt/下,再解压;
2. 进入/opt/hadoop-2.6.0-cdh5.9.0/etc/hadoop/,在hadoop-env.sh中添加:
export JAVA_HOME=/opt/jdk1.8.0_121
export HADOOP_HOME=/opt/hadoop-2.6.0-cdh5.9.0
修改配置文件core-tite.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. See accompanying LICENSE file.
--> <!-- Put site-specific property overrides in this file. --> <configuration>
<property>
<name>hadoop.tmp.dir</name>
<value>/home/hadoop/tmp</value>
</property>
<property>
<name>fs.default.name</name>
<value>hdfs://192.168.1.104:9000</value>
</property>
</configuration>
其中hadoop.tmp.dir最好自己设置,不要采用默认的设置,因为默认的设置是在/tmp/下面,机器重启以后会被删除掉,造成Hadoop不能运行,要再次格式化NameNode才能运行。
hdfs-site.xml:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. See accompanying LICENSE file.
--> <!-- Put site-specific property overrides in this file. --> <configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.name.dir</name>
<value>/opt/hdfs/name</value>
</property>
<property>
<name>dfs.data.dir</name>
<value>/opt/hdfs/data</value>
</property>
<property>
<name>dfs.tmp.dir</name>
<value>/opt/hdfs/tmp</value>
</property>
</configuration>
mapred-site.xml:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<!--
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. See accompanying LICENSE file.
--> <!-- Put site-specific property overrides in this file. --> <configuration>
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<property>
<name>mapred.job.tracker</name>
<value>hdfs://192.168.1.104:9001</value>
</property>
</configuration>
3. 在/etc/profile后面加上:
export HADOOP_HOME=/opt/hadoop-2.6.0-cdh5.9.0
export PATH=$PATH:$HADOOP_HOME/bin
并且输入命令:
source /etc/profile
使设置生效。
4. 输入命令:
hadoop namenode -format
格式化NameNode,如果结果提示Successful表明格式化成功。
5. 进入/opt/hadoop-2.6.0-cdh5.9.0/etc/hadoop/sbin,输入命令:
./start-all.sh
启动Hadoop。为了检验是否启动成功,输入命令:
jps
如果结果包含了以下几个进程,则表明启动成功:

也可以在浏览器里面输入地址http://localhost:50070,检验是否启动成功:

CDH的安装和设置的更多相关文章
- CentOS7安装CDH 第五章:CDH的安装和部署-CDH5.7.0
相关文章链接 CentOS7安装CDH 第一章:CentOS7系统安装 CentOS7安装CDH 第二章:CentOS7各个软件安装和启动 CentOS7安装CDH 第三章:CDH中的问题和解决方法 ...
- Hadoop的安装与设置(1)
在Ubuntu下安装与设置Hadoop的主要过程. 1. 创建Hadoop用户 创建一个用户,用户名为hadoop,在home下创建该用户的主目录,就不详细介绍了. 2. 安装Java环境 下载Lin ...
- linux下MySQL安装及设置
转自:http://www.entage.net/1/viewspace-25420 1. 关于本文 本文将以MySQL 5.0.51为例,以CentOS 5为平台,讲述MySQL数据库的安装和 ...
- Coudera-Manager/CDH的安装和部署
由于之前部署的集群采用的是用apache hadoop的方式来实现,但是考虑到运维的成本问题,下面将apache hadoop转换成cloudera cdh.下面主要讲解一下cloudera cdh的 ...
- 在Ubuntu 12.04安装和设置Samba实现网上邻居共享
转载:http://www.startos.com/ubuntu/tips/2012031333097.html 有微小改动. Samba 是一款功能强大的共享工具,可以实现与win ...
- RESTheart安装与设置
作者:Maurizio Turatti, 最后在Feb 25, 2016时被 Andrea Di Cesare更新 安装与设置 1. 快速开始 Docker Vagrant Bare metal 2. ...
- cdh 上安装spark on yarn
在cdh 上安装spark on yarn 还是比较简单的,不需要独立安装什么模块或者组件. 安装服务 选择on yarn 模式:上面 Spark 在spark 服务中添加 在yarn 服务中添加 g ...
- 安装、设置与启动MySql绿色版的方法
原文:安装.设置与启动MySql绿色版的方法 1.解压 mysql-noinstall-5.1.30-win32.zip(下载地址http://dev.mysql.com/downloads/mysq ...
- ubuntu显卡驱动安装及设置
转自: Ubuntu 14.04 Nvidia显卡驱动安装及设置 更换主板修复grub 引导后,无法从Nvidia进入系统(光标闪烁), 可能是显卡驱动出了问题. 1. 进入BIOS设置, 从集成 ...
随机推荐
- POP缩放动画
POP缩放动画 效果 源码 https://github.com/YouXianMing/Animations // // SpringScaleViewController.m // Animati ...
- 无耻之徒(美版)第一季/全集Shameless US迅雷下载
第一季 Shameless Season 1 (2011)看点:本以为美版<无耻之徒>(Shameless)是小众剧(诸多儿童不宜),但是试播集98.2万的收视人次竟然创下了Showtim ...
- 疑犯追踪第五季/全集Person of Interest迅雷下载
英文全名Person of Interest,第5季(2015)CBS.本季看点:<疑犯追踪>本季剧组暗示Finch可能重建机器,这次他会给机器更多自由(如Root一直要求的那样).或许新 ...
- 阿里云linux图形界面(centos6)
阿里云linux图形界面的安装方法:安装gnome图形化桌面#yum groupinstall -y "X Window System"#yum groupinstall -y & ...
- ios成长之每日一遍(day 3)
今天要介绍一下更多的控键使用, 当然也会对上一篇说的控件做一个巩固, 所以这一篇涉及到的控键会包括 UIImage.UITextField.UIButton.UILabel.UISwitch.以及 U ...
- Java并发编程的艺术(十三)——锁优化
自旋锁 背景:互斥同步对性能最大的影响是阻塞,挂起和恢复线程都需要转入内核态中完成:并且通常情况下,共享数据的锁定状态只持续很短的一段时间,为了这很短的一段时间进行上下文切换并不值得. 原理:当一条线 ...
- REQUEST_TIMEOUT 解决方案
you need to pass an npmrc file when you install the business network onto the peers. For more info s ...
- 安装chrome
安装chrome 在suse12中安装chrome时,提示 lsb >= 4.0 is needed by google-chrome-stable 到http://rpm.pbone.net当 ...
- mongodb 按配置文件mongodb.conf启动
命令如下 mongod --config /etc/mongodb.conf
- 【Kafka】Kafka-副本-分区设置-性能调优
Kafka-副本-分区设置-性能调优 SparkKafkaDemo - Executors kafka replication 负载均衡_百度搜索 Kafka 高性能吞吐揭秘 - 友盟博客 - Seg ...