Pig Installation
Today we will learn how to install Pig. Installing pig is very simple and straight forward. Following are the steps to install pig. Pig requires Hadoop and java to be already installed.
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)
Stay tuned for more stuff :)
http://www.infochimps.com/datasets/crime-rates-by-state-2004-and-2005-and-by-type-2005-cleaned-up-v/downloads/220311
ReplyDelete