Download hive from: http://www.apache.org/dyn/closer.cgi/hive/
Extract the files using terminal:
$ cd Downloads
$ tar -xvf apache-hive-3.1.1-bin.tar.gz
Edit the “.bashrc” file to update the environment variables for user.
$ cd ..
$ nano .bashrc
Add the following entries:
export HIVE_HOME=/home/edureka/Downloads/apache-hive-3.1.1-bin
export PATH=$PATH:/home/edureka/Downloads/apache-hive-3.1.1-bin/bin
Save and exit the file.
And run the below command to update the environment variables:
$ source .bashrc
Now to verify installation, run this command:
$ hive --version
This will print the version of Hive installed.