[root@hadoop000 software]# rz #上传hadoop-2.8.1.tar.gz
[root@hadoop000 software]# tar -xzvf hadoop-2.8.1.tar.gz
[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
[hadoop@hadoop000 hadoop-2.8.1]# bin/hdfs namenode -format
[hadoop@hadoop000 hadoop-2.8.1]# sbin/start-dfs.sh
[hadoop@hadoop000 hadoop-2.8.1]# jps
19536 DataNode
19440 NameNode
19876 Jps
19740 SecondaryNameNode
访问: http://localhost:50070
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。