1. Oozie를 다운받아 압축을 푼다.
mkdir build
cd build #빌드해야되므로 따로 공간을 만든다.
wget http://mirror.apache-kr.org/oozie/3.3.2/oozie-3.3.2.tar.gz
tar zxvf oozie-3.3.2.tar.gz
2. Oozie 빌드
cd ~/build/oozie-3.3.2/bin
./mkdistro.sh -DskipTests
3. Oozie 설치
cp ~/build/oozie-3.3.2/distro/target/oozie-3.3.2-distro.tar.gz ~
cd ~
tar zxvf oozie-3.3.2-distro.tar.gz
mkdir ~/oozie-3.3.2/libext
4. Oozie 환경변수 설정
vi .bash_profile
export OOZIE_HOME=/home/bigdata/oozie-3.3.2
export PATH=$PATH:$OOZIE_HOME/bin
5. 라이브러리 세팅
cp ~/hadoop-1.2.1/lib/*.jar ~/oozie-3.3.2/libext
cp ~/hadoop-1.2.1/*.jar ~/oozie-3.3.2/libext
cd ~/oozie-3.3.2/libext
wget http://extjs.com/deploy/ext-2.2.zip
6. Oozie configuration
cd $OOZIE_HOME
bin/oozie-setup.sh prepare-war -extjs ./libext/ext-2.2.zip
INFO: Oozie is ready to be started
bin/ooziedb.sh create -sqlfile oozie.sql -run
Oozie DB has been created for Oozie version '3.3.2'
The SQL commands have been written to: oozie.sql
7. 테스트
1) hadoop에 oozie example 적재
cd $OOZIE_HOME
tar zxvf oozie-examples.tar.gz
hadoop fs -put examples examples
2) example 프로퍼티 파일에 hadoop Namenode와 jobtracker 정보 설정
vi examples/apps/map-reduce/job.properties
nameNode=hdfs://localhost:9000 #디폴트로 설정된 포트가 다르므로 주의
jobTracker=localhost:9001 #디폴트로 설정된 포트가 다르므로 주의
:wq
3) hadoop 설정파일에 oozie 프록시 설정
cd ~/hadoop-1.2.1/conf
vi core-site.xml
< property>
<name>hadoop.proxyuser.bigdata.hosts</name>
<!-- hadoop.proxyuser.{oozie 실행계정}.hosts -->
<value>localhost</value>
< /property>
< property>
<name>hadoop.proxyuser.bigdata.groups</name>
<!-- hadoop.proxyuser.{oozie 실행계정}.groups -->
<value>bigdata</value> <!-- oozie 실행계정 그룹 -->
< /property>
4) hadoop 기동
start-all.sh
5) oozie 기동
oozie-start.sh
6) example실행
cd $OOZIE_HOME
oozie job -oozie http://localhost:11000/oozie -config examples/apps/map-reduce/job.properties -run
7) 확인
콘솔 : http://localhost:11000/oozie
프롬프트 : oozie jobs -oozie http://localhost:11000/oozie
oozie job -oozie http://localhost:11000/oozie -info {Job ID}