Hadoop伪分布式部署(HDFS)

环境要求:java、ssh

1.上传并解压tar包
[root@hadoop000 software]# rz #上传hadoop-2.8.1.tar.gz
[root@hadoop000 software]# tar -xzvf hadoop-2.8.1.tar.gz 
2.配置环境变量
[root@hadoop000 software]# vi /etc/profile
export HADOOP_HOME=/opt/software/hadoop-2.8.1
export PATH=$HADOOP_HOME/bin:$PROTOC_HOME/bin:$FINDBUGS_HOME/bin:$MAVEN_HOME/bin:$JAVA_HOME/bin:$PATH
[root@hadoop000 software]# source /etc/profile

3.配置文件

[hadoop@hadoop000 ~]# cd /opt/software/hadoop-2.8.1
[hadoop@hadoop000 hadoop-2.8.1]# vi etc/hadoop/core-site.xml
<configuration>
    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://192.168.137.130:9000</value>    # 配置自己机器的IP
    </property>
</configuration>

[hadoop@hadoop000 hadoop-2.8.1]# vi etc/hadoop/hdfs-site.xml
<configuration>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
</configuration>

#更改JAVA_HOME
[hadoop@hadoop000 hadoop-2.8.1]#  vi etc/hadoop/hadoop-env.sh
# 将export JAVA_HOME=${JAVA_HOME}改为
export JAVA_HOME=/usr/java/jdk1.8.0_45
4.格式化和启动
[hadoop@hadoop000 hadoop-2.8.1]# bin/hdfs namenode -format
[hadoop@hadoop000 hadoop-2.8.1]# sbin/start-dfs.sh
5.检查是否成功
[hadoop@hadoop000 hadoop-2.8.1]# jps
19536 DataNode
19440 NameNode
19876 Jps
19740 SecondaryNameNode
访问: http://localhost:50070
阅读更多
版权声明: https://blog.csdn.net/wangkun_j/article/details/80346105
文章标签: Hadoop
个人分类: Hadoop
上一篇【Hadoop】Hadoop2.8编译
下一篇20180517早课记录12-Hadoop
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭
关闭