1 下载pig-0.12.1.tar.gz
2 cp文件到/home目录下面
3 解压tar xzvf pig-0.12.1.tar.gz
4 vim /etc/profile
#pig
#设置path,增加指向hadoop/bin
PATH=$PATH:/home/pig-0.12.1/bin:/home/mdrill/hadoop-0.20.2/bin
export PATH
#设置PIG_CLASSPATH环境变量
PIG_CLASSPATH=/home/mdrill/hadoop-0.20.2/conf
export PIG_CLASSPATH
5 vim pig.properties
fs.default.name=hdfs://mdrill:9000/
mapred.job.tracker=mdrill:9001
6 source /etc/profile
7 启动pig
>pig
2 cp文件到/home目录下面
3 解压tar xzvf pig-0.12.1.tar.gz
4 vim /etc/profile
#pig
#设置path,增加指向hadoop/bin
PATH=$PATH:/home/pig-0.12.1/bin:/home/mdrill/hadoop-0.20.2/bin
export PATH
#设置PIG_CLASSPATH环境变量
PIG_CLASSPATH=/home/mdrill/hadoop-0.20.2/conf
export PIG_CLASSPATH
5 vim pig.properties
fs.default.name=hdfs://mdrill:9000/
mapred.job.tracker=mdrill:9001
6 source /etc/profile
7 启动pig
>pig