0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Pigをインストールする

Posted at

象さん(Hadoop)を Pig で操作するために Pig をインストールしました。

Pig インストール

$ cd ~
$ wget https://archive.apache.org/dist/pig/pig-0.17.0/pig-0.17.0.tar.gz
$ cd /opt
$ sudo tar xvf ~/pig-0.17.0.tar.gz
$ sudo chown -R hadoop:hadoop ./pig-0.17.0/
# シンボリックリンク作成
$ sudo ln -s pig-0.17.0 pig
$ sudo chown -h hadoop:hadoop ./pig

Pig PATH 設定

Pig の PATH を通します。

# hadoop ユーザを作ったので hadoop ユーザで PATH を通しています。ここは各々のユーザで実行してください。
$ sudo su - hadoop
$ cd ~
$ vi .bashrc
$ source .bashrc
export PIG_HOME=/opt/pig
export PATH=$PATH:$PIG_HOME/bin
export PIG_CLASSPATH=$PIG_HOME/conf:$HADOOP_INSTALL/etc/hadoop

Pig 動作確認

$ pig --version
Apache Pig version 0.17.0 (r1797386)
compiled Jun 02 2017, 15:41:58
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?