Skip to content

Install and configure Apache Pig

Table of contents

  1. Download, unpack and move
  2. Setting up the environment variable
  3. Add path to Java
  4. Verify Pig


Download, unpack and move

Today (2022-01-06) the latest available version of Apache Pig is 0.17.0 (2020-07-06) and you can get it from project's webpage or directly from download subpage.

After veryfing integrity of your archive:

you can extract it:

and move to destinate location /usr/lib/:


Setting up the environment variable

Run text editor:

and paste at the end:

After saving changes, activate the environment variables with the following command:


Add path to Java

This step is optional, you may need it or not -- it depends on your previous instalations etc.

Locate your Java:

Run text editor:

paste at the end:

save file and activate the environment variables with the following command:


Verify Pig

If you want, you can create a directory for all your Pig test and jobs. In my case this is /home/nosql/Pulpit/nosql2/pig

Great! Pig is ready to work. Now you can make a basic test.

Create simple test file:

Load and dump test data: