在Ubuntu上安装Hive

Bap*_*per 3 ubuntu hadoop hive

我想在我的Ubuntu上安装Hive.我读了这篇文章,这对我很有帮助.我做了除步骤4以外的所有步骤.我不明白这一步应该做什么.

你能详细解释一下这一步吗?

Sat*_*mar 5

第1步:下载并解压缩Hadoop

第2步:将JAVA_HOME路径设置为conf/hadoop-env.sh //这一步是为hadoop设置java路径

第3步:conf/core-site.xml:

<configuration>
  <property>
    <name>fs.default.name</name>  //Place your home folder here for using hadoop 
    <value>hdfs://localhost:9000</value>
  </property>
</configuration>
Run Code Online (Sandbox Code Playgroud)

第4步:conf/hdfs-site.xml:

<configuration>          //This setting for the number of replications of the file or you can add data node for the save the file
  <property>
    <name>dfs.replication</name>
    <value>1</value>
  </property>
</configuration>
Run Code Online (Sandbox Code Playgroud)

第5步:conf/mapred-site.xml:

<configuration>
  <property>
    <name>mapred.job.tracker</name>
    <value>localhost:9001</value>        // add your master host in the place of localhost here
  </property>
</configuration>
Run Code Online (Sandbox Code Playgroud)

步骤6:登录SSH localhost并格式化新的分布式文件系统

bin/hadoop namenode -format
Run Code Online (Sandbox Code Playgroud)

第7步:启动hadoop守护进程:

bin/start-all.sh
Run Code Online (Sandbox Code Playgroud)

第8步:检查端口下面的NameNode和JobTracker

http://localhost:50070/       //master
http://localhost:50030/       //slave  
Run Code Online (Sandbox Code Playgroud)

//最好还是尝试使用ssh来检查你的工作节点

第9步:下载并提取Hive

第10步:在Env变量下面设置.

export HADOOP_HOME=<hadoop-install-dir>
export HIVE_HOME=<hive-install-dir>
export PATH=$HIVE_HOME/bin:$PATH
$HIVE_HOME/bin/hive
Run Code Online (Sandbox Code Playgroud)