RETL 13.1 Demo 安装日志

====================================================================

四、RETL安装

按照 retl的developer guider安装

su – oracle

准备安装目标目录:

mkdir /d01/app/retail_apps/retl

解压缩安装介质到stage目录后进入Stage目录:

cd /d01/stage/retail/alloc/rfx-13.1

./install.sh

安装过程很简单:

—————————————-

[oracle@retek13 rfx-13.1]$ ./install.sh

Enter directory for RETL software:

—> \c

/d01/app/retail_apps/retl

Is this the correct directory for the install? y or n

RFX_HOME: /d01/app/retail_apps/retl

—> \c

y

Creating install directory in /d01/app/retail_apps/retl …

Copying Library Files…

Copying Sample Files…

Copying Executables…

Copying Config File…

Successful completion of RETL Install

To complete the RETL setup and installation:

1) Place the following in a .kshrc/ .profile to retain setup variables:

RFX_HOME=/d01/app/retail_apps/retl

PATH=/d01/app/retail_apps/retl/bin:$PATH

export RFX_HOME PATH

2) Be sure to verify any additional environment setup as per the "Setup" section

of the Programmers Guide.

3) Verify the installation by running the following command:

$RFX_HOME/bin/verify_retl

——————————————-

执行验证:

$RFX_HOME/bin/verify_retl

报java例外,

Exception in thread "main" java.lang.ClassFormatError: com.retek.retl.base.RETL (unrecognized class file version)

at java.lang.VMClassLoader.defineClass(libgcj.so.7rh)

原因:操作系统自带的java 是1.4版本的,13.1的retl要求1.6的jdk,下载一个:

http://java.sun.com/javase/index.jsp

JAVA_HOME=/d01/jdk1.6.0_23

export JAVA_HOME

RFX_HOME=/d01/app/retail_apps/retl

export RFX_HOME

ORACLE_HOME=/d01/app/oracle/product/11.1.0/db_1

ORACLE_SID=retl

PATH=$RFX_HOME/bin:$JAVA_HOME:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH:

NLS_LANG=AMERICAN_AMERICA.UTF8

export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH NLS_LANG

再次运行验证

$RFX_HOME/bin/verify_retl

[oracle@retek13 bin]$ $RFX_HOME/bin/verify_retl

Checking RETL Environment…passed!

Checking RETL binary…passed!

Running samples…failed!

===================================================================

RETL Installation is faulty! One or more tests failed in the samples directory.\n See /tmp/verifyretl-3558.log for failed tests

If tests have failed due to unexpected reasons, please contact support.

Please correct this problem and run the following line to verify

your installation is correct:

verify_retl

===================================================================

More /tmp/verifyretl-3558.log

[oracle@retek13 bin]$ more /tmp/verifyretl-8212.log

[ binop] [ Passed ]!

[ export] [ Passed ]!

[ fieldmod] [ Passed ]!

[ filter] [ **FAILED** ] – 1 failure(s).

[ funnel] [ **FAILED** ] – 1 failure(s).

[ generator] [ Passed ]!

[ import] [ Passed ]!

[ retl-training] [ Passed ]!

[ sort] [ **FAILED** ] – 1 failure(s).

[ verify_db] [ Passed ]!

———————————————

filter 测试失败,进入

cd /d01/app/retail_apps/retl/samples/filter

查看 out3.txt 可知 gsort 可执行文件未找到,这个文件在 /d01/app/retail_apps/retl/bin目录下是个链接,执行同目录下的gsort.Linux, 这个文件不存在; 在RETL的安装文档中讲到 retl的gsort 应链接到linux本身的sort程序,所以还要执行:

rm -f $RFX_HOME/bin/gsort

ln -s /bin/sort $RFX_HOME/bin/gsort

再次测试通过

[oracle@retek13 retl]$ $RFX_HOME/bin/verify_retl

Checking RETL Environment…passed!

Checking RETL binary…passed!

Running samples…/d01/app/retail_apps/retl/samples

passed!

=========================================================================

WARNING : RETL was not verified with a database. If database support

is required in the future, please run the following:

verify_retl -do

Congratulations! Your RETL environment and installation passed all tests

See the programmer’s guide for more information about how to further test

your database installation (if applicable).

=========================================================================

Exiting…saving output in /tmp/verifyretl-25217.log

For Oracle的测试也是成功的:

[oracle@retek13 retl]$ $RFX_HOME/bin/verify_retl -do

Checking RETL Environment…found ORACLE environment…passed!

Checking RETL binary…passed!

Running samples…/d01/app/retail_apps/retl/samples

passed!

=========================================================================

Congratulations! Your RETL environment and installation passed all tests

See the programmer’s guide for more information about how to further test

your database installation (if applicable).

=========================================================================

Exiting…saving output in /tmp/verifyretl-26003.log

总结:

运行RETL前先设置环境变量:

su – oracle

JAVA_HOME=/d01/jdk1.6.0_23

export JAVA_HOME

RFX_HOME=/d01/app/retail_apps/retl

export RFX_HOME

ORACLE_HOME=/d01/app/oracle/product/11.1.0/db_1

ORACLE_SID=retl

PATH=$RFX_HOME/bin:$JAVA_HOME:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH:

NLS_LANG=AMERICAN_AMERICA.UTF8

export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH NLS_LANG