hadoop2.5.2下安装pig0.14

  • 时间:
  • 来源:互联网

1、下载pig

http://apache.fayea.com/pig/

2、配置

上传到linux,解压

[root@master opt]# tar zxvf pig-0.14.0.tar.gz 

修改属组
[root@master opt]# chown -R hadoop:hadoop pig-0.14.0

配置环境变量

export JAVA_HOME=/usr/java/jdk1.7.0_71
export JAVA_BIN=/usr/java/jdk1.7.0_71/bin
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
export HADOOP_HOME=/opt/hadoop-2.5.2
export PATH=$PATH:$HADOOP_HOME/bin

export HIVE_HOME=/opt/apache-hive-0.14.0-bin
export CLASSPATH=$CLASSPATH:$HIVE_HOME/lib
export PATH=$PATH:$HIVE_HOME/bin:$HIVE_HOME/conf
export MYSQL_HOME=/usr/local/mysql
export PATH=$PATH:$MYSQL_HOME/bin
export ZOOKEEPER_HOME=/opt/zookeeper-3.4.6
export PATH=$PATH:$ZOOKEEPER_HOME/bin
export PIG_HOME=/opt/pig-0.14.0
export PATH=$PATH:$PIG_HOME/bin

红色必备

3、启动pig

1)本地模式下

[hadoop@master pig-0.14.0]$ cd bin
[hadoop@master bin]$ ls
pig  pig.cmd  pig.py
[hadoop@master bin]$ . pig -x local

grunt> quit         #退出

2)集群模式下

[hadoop@master bin]$ . pig

grunt> quit         #退出

本文链接http://element-ui.cn/news/show-576598.aspx