将JAVA_HOME指向第二步安装的JDK所在目录
1.
# The java implementation to use. Required.
2.
export JAVA_HOME=/usr/java/jre1.8.0_25
保存并退出
[root@localhost ~]$ vi ~/.bash_profile
4.修改hadoop配置文件
伪分布式使用IP地址而不是主机名或localhost的好处是不需要修改/etc/hosts,当然全分布式还是需要修改的。
修改core-site.xml:
xml version="1.0"?
xml-stylesheet type="text/xsl" href="configuration.xsl"?
Put site-specific property overrides in this file.
修改mapred-site.xml:
xml version="1.0"?
xml-stylesheet type="text/xsl" href="configuration.xsl"?
Put site-specific property overrides in this file.
修改hdfs-site.xml:
xml version="1.0"?
xml-stylesheet type="text/xsl" href="configuration.xsl"?
Put site-specific property overrides in this file.
通过以上步骤hadoop即安装配置完成,进入hadoop-1.21.1主目录的bin目录下
#./hadoop namenode -format //格式化hadoopnamenode,很多时候namenode启动不
起来可以试试格式化一下。
#./start-all.sh //启动hadoop的各个监护进程。
可以通过http://localhost:50070
和http://localhost:50030
查看namenode和jobtracker。
#./stop-all.sh //关闭hadoop的各个监护进程
更多:Windows7下eclipse调试Fedora虚拟机的hadoop+hbase伪分布式(第二节)
https://www.002pc.com/diannaojichu/898.html
你可能感兴趣的虚拟机,Fedora,eclipse,hadoop,Windows7,hbase
