使用 cloudera 挂载HDFS ,关于部署HDFS 可以参考
前一段时间做HDFS 测试,mount HDFS 过程 ,整理一下分享!
1 获取cdh3 yum 源
- wget -c http://archive.cloudera.com/redhat/cdh/cdh3-repository-1.0-1.noarch.rpm
2 安装下载的rpm 包
- yum --nogpgcheck localinstall cdh3-repository-1.0-1.noarch.rpm
//安装后将得到
cloudera-cdh3.repo 文件
- [root@namenode ~]# ll /etc/yum.repos.d/
- total 40
- -rw-r--r-- 1 root root 1926 Aug 29 2011 CentOS-Base.repo
- -rw-r--r-- 1 root root 631 Aug 29 2011 CentOS-Debuginfo.repo
- -rw-r--r-- 1 root root 626 Aug 29 2011 CentOS-Media.repo
- -rw-r--r-- 1 root root 5390 Aug 29 2011 CentOS-Vault.repo
- -rw-r--r-- 1 root root 201 Jul 14 2011 cloudera-cdh3.repo
3 导入 rpm key
- rpm --import http://archive.cloudera.com/redhat/cdh/RPM-GPG-KEY-cloudera
4 安装 hadoop-0.20-fuse
- yum install hadoop-0.20-fuse
5 安装配置java 环境
- //下载安装jdk
- chmod +x jdk-6u26-linux-x64-rpm.bin
- ./jdk-6u26-linux-x64-rpm.bin
-
- //编辑 profile
- vim /etc/profile
- export JAVA_HOME=/usr/java/jdk1.6.0_26
- export PATH=$JAVA_HOME/bin:$PATH
-
- //载入环境变量
- souce /etc/profile
6 配置 /etc/hosts文件添加namenode
- vim /etc/hosts
-
- 10.0.100.75 namenode
7 创建挂载点并挂载hdfs
- mkdir -p /data/hdfs/
- chown -R hdfs:hdfs /data/hdfs/
- hadoop-fuse-dfs dfs://namenode:8020 /data/hdfs
8 卸载hdfs
- umount /data/hdfs
结束
https://ccp.cloudera.com/display/CDHDOC/Mountable+HDFS
本文转自 dongnan 51CTO博客,原文链接:http://blog.51cto.com/dngood/798894