Apache Pig 0.15.0 Installation on ubuntu 14.04
1) A machine with Ubuntu 14.04 LTS operating system
2) Apache Hadoop 2.6.4 pre installed (How to install Hadoop on Ubuntu 14.04)
3) Apache Pig 0.15.0 Software (Download Here)
Step 1 - Creating pig directory. Open a new terminal(CTRL + ALT + T) and enter the following command.
Step 2 - Change the ownership and permissions of the directory /usr/local/pig. Here 'hduser' is an Ubuntu username.
Step 3 - Switch User, is used by a computer user to execute commands with the privileges of another user account.
Step 4 - Change the directory to /home/hduser/Desktop , In my case the downloaded pig-0.15.0.tar.gz file is in /home/hduser/Desktop folder. For you it might be in /downloads folder check it.
Step 5 - Untar the pig-0.15.0.tar.gz file.
Step 6 - Move the contents of pig-0.15.0 folder to /usr/local/pig
Step 7 - Edit $HOME/.bashrc file by adding the pig path.
$HOME/.bashrc file. Add the following lines
Step 8 - Reload your changed $HOME/.bashrc settings
Step 9 - Change the directory to /usr/local/pig/conf
Step 10 - Verify Pig Installation.
Step 11 - Before fire up apache pig you need to start history server daemon of hadoop otherwise you will get some runtime exception. You can see that in the terminal.
Step 12 - Edit mapred-site.xml.
Step 13 - Add the following lines to mapred-site.xml. Dont forget to mention the host and port number for history server.
Step 14 - Change the directory to /usr/local/hadoop/sbin
Step 15 - Start the History Server.
Step 16 - Change the directory to /usr/local/pig/bin
Step 17 - Enter into grunt shell in local mode.
Step 18 - Enter into grunt shell in MapReduce mode.
Please share this blog post and follow me for latest updates on
Previous Post Next Post
Labels : Pig Execution Mechanism Pig GRUNT Shell Usage Pig Load and Store Operations Pig Diagnostic Operators Pig Group Example Pig Join Example Pig Cross Example Pig Union Example Pig Split Example Pig Filter Example Pig Distinct Example Pig Foreach Example Pig OrderBy Example Pig OrderBy Example Pig Eval Functions Example Pig BagToString Example Pig Concat Example Pig Tokenize Example Pig UDF's Java Example Pig SCRIPT