ITPub博客

首页 > Linux操作系统 > Linux操作系统 > hadoop安装

hadoop安装

原创 Linux操作系统 作者:olivianing 时间:2013-07-05 19:58:21 0 删除 编辑
1、环境

  虚拟环境: vmware workstation 8
  操作系统:SUSE linux 10 sp2 64位(主机开启VT支付)

2、下载包


   hadoop-1.1.2-1.x86_64

3、jdk安装
  1)检测包是否已安装

     hadoop1:/usr/java # rpm -qa | grep jdk
     jdk-1.6.0_38-ea
    先卸载包
     hadoop1:/usr/java # rpm -e jdk-1.6.0_38-ea
  
  2) 创建java目录
   rac1:/mnt/hgfs/software # mkdir /usr/java
   rac1:/mnt/hgfs/software # cd /usr/java
   rac1:/usr/java # cp  /mnt/hgfs/software/jdk-6u38-ea-bin-b04-linux-amd64-31_oct_2012-rpm.bin ./
   rac1:/usr/java # chmod 777jdk-6u38-ea-bin-b04-linux-amd64-31_oct_2012-rpm.bin
 3)安装jdk
rac1:/usr/java # ./jdk-6u38-ea-bin-b04-linux-amd64-31_oct_2012-rpm.bin

4)修改环境变量
 export JAVA_HOME=/usr/java/jdk1.6.0_38
 export CLASSPATH=.:$JAVA_HOME/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

 export PATH=$PATH:$JAVA_HOME/bin

5)测试java安装ok与否

3、hadoop安装
    1)创建hadoop用户
useradd hadoop
passwd hadoop 
groupadd hadoop 
usermod -g hadoop hadoop 
mkdir /home/hadoop 
chown hadoop: hadoop /home/hadoop
     2)配置等效性
在每个节点进行以下操作并检验等效性是否生效
hadoop@hadoop1:~> ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/hadoop/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/hadoop/.ssh/id_rsa.
Your public key has been saved in /home/hadoop/.ssh/id_rsa.pub.
The key fingerprint is:
ab:91:cd:8e:6a:90:6e:d1:ae:d6:2f:e0:15:df:78:9f hadoop@hadoop1
hadoop@hadoop1:~> cat .ssh/
id_rsa       id_rsa.pub   known_hosts
hadoop@hadoop1:~> cat .ssh/id_rsa.pub >>.ssh/authorized_keys
hadoop@hadoop1:~> cd .ssh/
hadoop@hadoop1:~/.ssh> ls
authorized_keys  id_rsa  id_rsa.pub  known_hosts
hadoop@hadoop1:~/.ssh> chmod 644 authorized_keys
hadoop@hadoop1:~/.ssh> scp authorized_keys 192.168.116.3:/home/hadoop/.ssh/authorized_keys
Password:
authorized_keys                               100%  396     0.4KB/s   00:00
hadoop@hadoop1:~/.ssh> ssh 192.168.116.3
hadoop@hadoop2:~> exit

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28598517/viewspace-765622/,如需转载,请注明出处,否则将追究法律责任。

上一篇: hadoop安装
下一篇: suse 网卡配置
请登录后发表评论 登录
全部评论

注册时间:2013-02-09

  • 博文量
    27
  • 访问量
    115017