hadoop2.x单节点安装

https://my.oschina.net/jackieyeah/blog/657032
正在运行的任务
hadoop job -list
杀掉任务
hadoop job -kill job_1528518736003_0011
给文件加权限
hadoop fs -chmod -R 755 /*.data

java -version

bashrc
export JAVA_HOME=/usr/local/src/jdk1.7.0_79
export PATH="$PATH:$JAVA_HOME/bin"


export HADOOP_HOME=/usr/local/src/hadoop-2.6.1
export PATH="$PATH:$HADOOP_HOME/bin:$JAVA_HOME/bin"

source activate py27tf

etc/hadoop/hadoop-env.sh 
添加
export JAVA_HOME=/usr/local/src/jdk1.7.0_79

etc/hadoop/yarn-env.sh
export JAVA_HOME=/usr/local/src/jdk1.7.0_79


slaves 添加从节点
vm2
vm3


创建tmp目录
core-site.xml

    
        fs.defaultFS
        hdfs://vm1:9000
    

      
        hadoop.tmp.dir
        /usr/local/src/hadoop-2.6.1/tmp
      

创建data name目录

hdfs-site.xml

   
  dfs.namenode.secondary.http-address  
  vm1:9001  
 

   
  dfs.namenode.name.dir  
  file:/usr/local/src/hadoop-2.6.1/tmp/dfs/name  
 
   
  dfs.namenode.data.dir  
  file:/usr/local/src/hadoop-2.6.1/tmp/dfs/data  
 
   
  dfs.replication  
  3  
 

mapred-site.xml



 
  mapreduce.framework.name            
  yarn    
 


yarn-site.xml
 
  yarn.nodemanager.aux-services
  mapreduce_shuffle
 
 
  yarn.nodemanager.aux-services.mapreduce.shuffle.class
  org.apache..hadoop.mapred.ShuffleHandler
 
 
  yarn.resourcemanager.address                                     
  vm1:8032                                    
 
 
  yarn.resourcemanager.scheduler.address
  vm1:8030    
 
 
  yarn.resourcemanager.resource-tracker.address
  vm1:8035    
 
 
  yarn.resourcemanager.admin.address           
  vm1:8033
 
 
  yarn.resourcemanager.webapp.address          
  vm1:8088
 


hadoop2.6复制到其他两台机器上

初始化
hadoop namenode -format

启动

./sbin/start-all.sh

你可能感兴趣的:(hadoop2.x单节点安装)