1:环境准备
1台linux服务器, hadoop安装包(apache官方网下载) jdk1.6+
2:安装jdk ,配置好环境变量(etc/profile),java -version 测试正确进行下一步。
3:配置ssh免密码登录
cd ~
ssh-keygen -t rsa 产生密钥,位于~/.ssh目录下

cp
~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
把id_rsa.pub公钥文件cp到 authorized_
keys
~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
把id_rsa.pub公钥文件cp到 authorized_
keys
ssh localhost
登录测试

注意:这里的ssh仅仅是单机模式(伪分布)
4: 安装hadoop tar -zxvf
hadoop-1.1.2
hadoop-1.1.2
5:配置hadoop几个重要的配置文件(解压完成的conf目录下)
a):hadoop-env.sh
指定当前环境jdk安装目录
指定当前环境jdk安装目录
export
JAVA_HOME=/opt/java/jdk1.7
JAVA_HOME=/opt/java/jdk1.7
b): core-site.xml

c):hdfs-site.xml

d):mapred-site.xml

所有文件保存生效
5:格式化hdfs
bin/hadoop namenode
-format
-format

6: 启动hadoop
bin/start-all.sh

7:jps 查看进程
8:web模式访问 50070和50030端口
http://192.168.0.111:50070
http://192.168.0.111:50030
