hadoop集群的搭建
Hadoop集群的搭建
支持的软件:Linux系统和java语言
· GNU/Linux is supported as a development and production platform. Hadoop has been demonstrated on GNU/Linux clusters with 2000 nodes.
· Windows is also a supported platform but the followings steps are for Linux only. To set up Hadoop on Windows, see wiki page.
Required software for Linux include:
1. Java™ must be installed. Recommended Java versions are described at HadoopJavaVersions.
2. ssh must be installed and sshd must be running to use the Hadoop scripts that manage remote Hadoop daemons.
Now check that you can ssh to the localhost without a passphrase:
$ ssh localhost
If you cannot ssh to localhost without a passphrase, execute the following commands:
$ ssh-****** -t dsa -P '' -f ~/.ssh/id_dsa
$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
三种模式:
Now you are ready to start your Hadoop cluster in one of the three supported modes:
· Pseudo-Distributed Mode 伪分布式
· Fully-Distributed Mode 完全分布式
生产环境是完全分布式,测试环境也是完全分布式。单机测试是伪分布式。
前后依赖关系
步骤
一,操作系统环境
依赖软件ssh,jdk
环境的配置
java_home
免**
时间同步
hosts,hostname
二,hadoop部署
/opt/sxt/
配置文件修改
java_home
角色在哪里启动
深层创建文件:mkdir -p a/b/c/d
解压:rpm -i /software/file/linux-basic/jdk-7u67-linux-x64.rpm
在操作系统中配置javahome
配置环境变量:Vi /etc/profile
export JAVA_HOME=/usr/java/jdk1.7.0_67
export PATH=$PATH:$JAVA_HOME/bin
显示所有文件
Ll -a
自己登陆自己:ssh localhost
免密操作:
ssh-****** -t dsa -P '' -f ~/.ssh/id_dsa
类型,密码为空,在ssh类型下。
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys