简体   繁体   English

Linux Centos6 VM如何格式化namenode?

[英]Linux Centos6 VM How to format the namenode?

I'm trying to start hadoop on my Centos6 VM linux. 我正在尝试在Centos6 VM Linux上启动hadoop。 these steps have been followed 遵循了这些步骤

  • yum install hadoop* mahout* oozie* hbase* hive* hue* pig* zookeeper* done yum install hadoop * mahout * oozie * hbase * hive * hue * pig * zookeeper *已完成
  • yum install java-1.7.0-openjdk-devel.x86_64 done 百胜安装java-1.7.0-openjdk-devel.x86_64完成
  • yum install sudo done 百胜安装须藤完成
  • yum install nano done 百胜安装纳米完成
  • sudo /etc/init.d/hadoop-hdfs-namenode init fail -->sudo: update-rc.d: command not found sudo /etc/init.d/hadoop-hdfs-namenode初始化失败-> sudo:update-rc.d:找不到命令

I checked etc/init.d and there is nothing like hadoop-hdfs-namenode. 我检查了etc / init.d,没有什么像hadoop-hdfs-namenode一样。 Instead of this command i found this hadoop namenode -format and executed. 我找到了这个hadoop namenode -format并执行了它,而不是这个命令。 And it worked then next step 然后工作就可以了

  • for i in hadoop-hdfs-namenode hadoop-hdfs-datanode ; 因为我在hadoop-hdfs-namenode hadoop-hdfs-datanode中; do sudo service $i start ; 做sudo服务$ i start; done 完成

I executed this command but got unrecognized service error. 我执行了此命令,但收到无法识别的服务错误。

Centos version 6.2-x64 Centos版本6.2-x64

When you first install Hadoop, you must configure it following this https://hadoop.apache.org/docs/r2.4.1/hadoop-project-dist/hadoop-common/ClusterSetup.html 首次安装Hadoop时,必须按照以下https://hadoop.apache.org/docs/r2.4.1/hadoop-project-dist/hadoop-common/ClusterSetup.html进行配置。

Use this command to format a new distributed filesystem and namenode 使用此命令格式化新的分布式文件系统和名称节点

$ $HADOOP_PREFIX/bin/hdfs namenode -format <cluster_name> 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM