Pig Installation
If you have not installed it, follow the link here
1. Download Pig from Apache Pig website. Check the compatibility of pig you are downloading with already installed hadoop on your machine. I am going to download Pig 0.10.1.
2. After the download is complete, go to download directory and extract Pig 0.10.1.tar.gz
3. Copy the extracted folder in $HOME/pig directory.
4. Edit /etc/bash.bashrc and set PIG_HOME with following command
sudo leafpad /etc/bash.bashrc
Then go to last line and copy following
export PIG_HOME=$HOME/pig
export PATH=$PATH:PIG_HOME/bin
also set JAVA_HOME if not set earlier using following command. In my case my java is installed at /usr/lib/jvm/java-6-jdk-i386
export JAVA_HOME=/usr/lib/jvm/java-6-jdk-i386
5. After this close the terminal and open again.
6. Now type pig in terminal and it should open pig shell (grunt)
If it opens then PIG is installed and its ready to use :)
No comments:
Post a Comment