centos hadoop 僞分佈

centos hadoop 僞分佈
修改配置文件
1. hadoop-env.sh :JAVA_HOME
2. core-site.sh :
<configuration>
    <property>
        <name>fs.default.name</name>
        <value>hdfs://localhost:9000</value>
    </property>
    <property>
        <name>hadoop.tmp.dir</name>
        <value>file:/simple/hadoop/tmp</value>
    </property>
</configuration>
3.hdfs-site.xml
<configuration>
<property>
        <name>dfs.replication</name>
        <value>1</value>
</property>
<property>
        <name>dfs.namenode.name.dir</name>
        <value>file:/simple/hadoop/tmp/dfs/name</value>
</property>
<property>
        <name>dfs.datanode.data.dir</name>
        <value>file:/simple/hadoop/tmp/dfs/data</value>
</property>
</configuration>
4.mapred-site.xml
<configuration>
 <property>
      <name>mapreduce.framework.name</name>
      <value>yarn</value>
 </property>
 <property>
      <name>yarn.app.mapreduce.am.staging-dir</name>
      <value>/simple/hadoop/staging</value>
 </property>
</configuration>
5.yarn-site.xml
<configuration>
        <property>
                <name>yarn.nodemanager.aux-services</name>
                <value>mapreduce_shuffle</value>
        </property>
        <property>
                <name>yarn.resourcemanager.hostname</name>
                <value>localhost</value>
        </property>
</configuration>
 

切換root用戶
進入$HADOOP_HOME/bin
hdfs namenode -format 搭建完成後執行一次

start-all.sh

jps 查看進程 共六個:
16944 ResourceManager
16801 SecondaryNameNode
16613 DataNode
17079 NodeManager
17389 Jps
16526 NameNode


瀏覽器輸入
http://localhost:50070/

如果能夠查看信息說明Hadoop安裝成功了

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章