Steps to install Hive in Ubuntu:

Steps to install Hive in Ubuntu:

  1. install java

    Enter the following command in Terminal to install Java:

    sudo apt-get update
    sudo apt-get install default-jdk
    
  2. Download Hive

    Enter the following command in the terminal to download Hive:

    wget https://mirrors.tuna.tsinghua.edu.cn/apache/hive/hive-3.1.2/apache-hive-3.1.2-bin.tar.gz
    

    This command will download the compressed package of Hive from the Tsinghua Mirror Station.

  3. Unzip Hive

    Enter the following command in the terminal to extract Hive:

    tar -zxvf apache-hive-3.1.2-bin.tar.gz
    

    This command will decompress Hive into the apache-hive-3.1.2-bin directory in the current directory.

  4. Configure Hive

    Open the Hive configuration file hive-env.sh and add the following configuration:

    export HADOOP_HOME=/path/to/hadoop
    export HIVE_CONF_DIR=/path/to/hive/conf
    

    Among them, '/path/to/hadoop' is the path where you installed Hadoop, and '/path/to/hive/conf' is the path where you store the Hive configuration file.

  5. Start Hive

    Enter the following command in the terminal to start Hive:

    cd apache-hive-3.1.2-bin
    bin/hive
    

    This command starts Hive's command-line interface.

  6. Test Hive

    Enter the following command in Hive's command line interface to test Hive:

    show databases;
    

    If Hive is working properly, it will list all databases.

Hope these steps help you to install Hive in Ubuntu.

Guess you like

Origin blog.csdn.net/ccbbaaap/article/details/130657890