Following Installation steps will execute successfully only when you have installed Hadoop with the help of this link.
open terminal window
sudo su hduser
sudo wget http://apache-mirror.rbc.ru/pub/apache/pig/pig-0.13.0/pig-0.13.0.tar.gz
sudo cp pig-0.13.0.tar.gz /usr/local/
sudo tar -xvf pig-0.13.0.tar.gz
sudo mv pig-0.13.0 pig
sudo rm pig-0.13.0.tar.gz
sudo chown hduser:hadoop -R pig
Add PIG variables in bashrc file by using following commands
#PIG VARIABLES START
#PIG VARIABLES END
Run following command to start pig prompt which is also known as grunt.
Above command will launch pig prompt in MapReduce mode.
If you want to run pig in local mode, then you can use following command .
pig -x local