hadoop安装配置总结
2012-11-05 18:00
357 查看
操作系统:ubuntu 12.04
1.$ sudo apt-get install install ssh (备注:需要输入yes的,要安装openssh server 和另一个文件,忘了)
2.官方文档要求:$ sudo apt-get install rsync 这个系统已经装好了的
3 安装java(我的安装方法)
$chmod +x jdk-6u30-linux-i586.bin
$./jdk-6u30-linux-i586.bin
找到安装好的目录jdk1.6.0_30
$sudo mv jdk1.6.0_30 /usr/java (没有这个目录,可以提前建一个)
(这里java -version是不会出版本信息的,对hadoop是不影响的,如果需要设定,可以参考我的另一个文章/article/5758723.html)
4 解压hadoop安装包
$ tar -zxvf hadoop-1.0.3-bin.tar.gz
解压后,找到hadoop-1.0.3目录,修改conf/hadoop-env.sh
export JAVA_HOME=/usr/java/jdk1.6.0_30 (shell脚本中#号是注释)
6 在hadoop-1.0.3目录下 $ bin/hadoop 如果执行成功,就可以了。
Now you are ready to start your Hadoop cluster in one of the three supported modes:
Local (Standalone) Mode(单机模式)
Pseudo-Distributed Mode(伪分布式模式)
Fully-Distributed Mode(完全分布式模式)
7 单机模式下(以下英文是官方文档,可以简单调试下)
By default, Hadoop is configured to run in a non-distributed mode, as a single Java process. This is useful for debugging.
The following example copies the unpacked conf directory to use as input and then finds and displays every match of the given regular expression. Output is written to the given output directory.
$ mkdir input
$ cp conf/*.xml input
$ bin/hadoop jar hadoop-examples-*.jar grep input output 'dfs[a-z.]+'
$ cat output/*
8 Pseudo-Distributed Mode
Hadoop can also be run on a single-node in a pseudo-distributed mode where each Hadoop daemon runs in a separate Java process.Configuration
Use the following:
conf/core-site.xml:
conf/hdfs-site.xml:
conf/mapred-site.xml:
1.$ sudo apt-get install install ssh (备注:需要输入yes的,要安装openssh server 和另一个文件,忘了)
2.官方文档要求:$ sudo apt-get install rsync 这个系统已经装好了的
3 安装java(我的安装方法)
$chmod +x jdk-6u30-linux-i586.bin
$./jdk-6u30-linux-i586.bin
找到安装好的目录jdk1.6.0_30
$sudo mv jdk1.6.0_30 /usr/java (没有这个目录,可以提前建一个)
(这里java -version是不会出版本信息的,对hadoop是不影响的,如果需要设定,可以参考我的另一个文章/article/5758723.html)
4 解压hadoop安装包
$ tar -zxvf hadoop-1.0.3-bin.tar.gz
解压后,找到hadoop-1.0.3目录,修改conf/hadoop-env.sh
export JAVA_HOME=/usr/java/jdk1.6.0_30 (shell脚本中#号是注释)
6 在hadoop-1.0.3目录下 $ bin/hadoop 如果执行成功,就可以了。
Now you are ready to start your Hadoop cluster in one of the three supported modes:
Local (Standalone) Mode(单机模式)
Pseudo-Distributed Mode(伪分布式模式)
Fully-Distributed Mode(完全分布式模式)
7 单机模式下(以下英文是官方文档,可以简单调试下)
By default, Hadoop is configured to run in a non-distributed mode, as a single Java process. This is useful for debugging.
The following example copies the unpacked conf directory to use as input and then finds and displays every match of the given regular expression. Output is written to the given output directory.
$ mkdir input
$ cp conf/*.xml input
$ bin/hadoop jar hadoop-examples-*.jar grep input output 'dfs[a-z.]+'
$ cat output/*
8 Pseudo-Distributed Mode
Hadoop can also be run on a single-node in a pseudo-distributed mode where each Hadoop daemon runs in a separate Java process.Configuration
Use the following:
conf/core-site.xml:
<configuration> <property> <name>fs.default.name</name> <value>hdfs://localhost:9000</value> </property> </configuration>
conf/hdfs-site.xml:
<configuration> <property> <name>dfs.replication</name> <value>1</value> </property> </configuration>
conf/mapred-site.xml:
<configuration> <property> <name>mapred.job.tracker</name> <value>localhost:9001</value> </property> </configuration> 9 设置ssh免密码登陆 $ssh localhost 会让你输入密码,所以需要下进行配置 $ssh-keygen -t dsa 然后按回车就行。文件会自动产生.ssh目录,但是我们看不到,无所谓 $ cd .ssh ****/.ssh$ cp id_dsa.pub authorized_keys 然后执行$ ssh localhost就可以不需要密码登陆了
相关文章推荐
- Hadoop 安装配置过程中出现问题总结
- Hadoop-2.8.0集群搭建、hadoop源码编译和安装、host配置、ssh免密登录、hadoop配置文件中的参数配置参数总结、hadoop集群测试,安装过程中的常见错误
- 虚拟机CentOS环境下Hadoop伪分布模式的安装与配置问题总结
- Hadoop 2.4.x集群安装配置问题总结
- hadoop2.7.4 安装配置以及java wordcount 运行出错的总结
- Hadoop安装配置及问题总结
- hadoop安装配置过程总结
- hadoop学习---3.hadoop在ubuntu下的安装配置
- 64位CentOS6.8安装hadoop伪分布与64位win10Eclipse的Hadoop开发框架配置
- Debian 7 安装配置总结
- hadoop 1.2.1安装配置
- Hadoop完整安装配置
- 如何在Linux上安装与配置Hadoop?
- CentOS系统下的Hadoop集群(第3期)_VSFTP安装配置
- 高可用,完全分布式Hadoop集群HDFS和MapReduce安装配置指南
- Hadoop集群(第1期)_CentOS安装配置
- Hadoop集群安装配置教程_Hadoop2.6.0_Ubuntu/CentOS
- Eclipse 安装配置总结
- Hadoop安装教程_单机/伪分布式配置_Hadoop2.6.0/Ubuntu14.04