当前位置:操作系统 > Unix/Linux >>

hadoop在linux上的安装

hadoop在linux上的安装
 
配置免密码登录
ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa
cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
 
test:ssh localhost
 
hadoop环境变量
export JAVA_HOME=/usr/local/jdk
export HADOOP_INSTALL=/usr/local/hadoop
export PATH=$PATH:$HADOOP_INSTALL/bin
 
修改hadoop配置
修改conf/core-site.xml
<property>
  <name>fs.default.name</name>
  <value>hdfs://localhost:9000</value>
</property>
 
修改conf/hdfs-site.xml
<property>
  <name>dfs.replication</name>
  <value>1</value>
</property>
 
修改conf/mapred-site.xml
<property>
  <name>mapred.job.tracker</name>
  <value>localhost:9001</value>
</property>
 
启动
./bin/hadoop namenode -format
./bin/start-all.sh 
 
测试
localhost:50030
localhost:50070
 
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,