Similar to Hive, Pig provides a handy tool for manipulating Hadoop data. In this recipe, we are going to discuss the installation of Apache Pig.
Before we install Pig, we need to make sure Hadoop has been properly installed. Please refer to the previous sections about the configuration of a Hadoop cluster.
Download the Pig archive file from a mirror site with the following command on the administrator machine:
wget http://www.motorlogy.com/apache/pig/stable/pig-0.10.1.tar.gz ~/repo
Use the following steps to configure Pig:
Log in to the master node from the Hadoop administrator machine as
hduser
with the following command:ssh hduser@master
Copy the archive to
/usr/local
with the following command:sudo wget ftp://hadoop.admin/repo/pig-0.10.1.tar.gz /usr/local
Decompress the Pig archive file with the following command:
cd /usr/local sudo tar xvf pig-0.10.1.tar.gz
Create a symbolic link to the Pig directory using the following command:
sudo ln -s /usr...