首先到下载Oracle GoldenGate安装文件,注意在edelivery下载的时候查找GoldenGate时要选择“Oracle
Fusion Middleware”,然后选择好平台及对应的版本:
下载好GoldenDate软件后,安装过程是非常的简单,你可以就在oracle用户下安装,也可以创建一个专有用户来安装,假如,我们创建一个ogg的操作系统用户来安装GoldenDate,那么首先要设置好ogg的用户环境变量,你可以直接将oracle用户的环境变量copy过来使用:
export
ORACLE_BASE=/u01/app/oracle
export
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export
ORACLE_SID=source
export
ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
export
PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin
export
PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export
PATH=${PATH}:$ORACLE_BASE/common/oracle/bin
export
TNS_ADMIN=$ORACLE_HOME/network/admin
export TEMP=/tmp
export TMPDIR=/tmp
export
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
设置好环境变量后,确认LD_LIBRARY_PATH环境变量设置正确,到gg的安装目录下,通常是~/ggs/目录下运行ldd ggsci命令检查之:
[ogg@source ggs]$ ldd ggsci
libdl.so.2 => /lib64/libdl.so.2
(0x00000038d1d00000)
libicui18n.so.38 => ./libicui18n.so.38
(0x0000002a9556c000)
libicuuc.so.38 => ./libicuuc.so.38
(0x0000002a958cc000)
libicudata.so.38 =>
./libicudata.so.38 (0x0000002a95c05000)
libpthread.so.0 =>
/lib64/tls/libpthread.so.0 (0x00000038d1f00000)
libnnz10.so =>
/u01/app/oracle/product/10.2.0/db_1/lib/libnnz10.so (0x0000002a968dc000)
libclntsh.so.10.1 =>
/u01/app/oracle/product/10.2.0/db_1/lib/libclntsh.so.10.1 (0x0000002a96d7c000)
libstdc++.so.6 =>
/usr/lib64/libstdc++.so.6 (0x00000038d8600000)
libm.so.6 => /lib64/tls/libm.so.6
(0x00000038d1b00000)
libgcc_s.so.1 =>
/lib64/libgcc_s.so.1 (0x00000038d8200000)
libc.so.6 => /lib64/tls/libc.so.6
(0x00000038d1800000)
/lib64/ld-linux-x86-64.so.2 (0x00000038d1400000)
libnsl.so.1 => /lib64/libnsl.so.1
(0x00000038d9400000)
如上返回结果表示环境变量设置没有任何问题!接下来需要登录GoldenGate命令环境创建必要的子目录,进入GG命令环境的命令就是ggsci:
[ogg@source ggs]$ ./ggsci
Oracle GoldenGate Command
Interpreter for Oracle
Version 10.4.0.19 Build 002
Linux, x64, 64bit (optimized),
Oracle 10 on Sep 22 2009 14:18:08
Copyright (C) 1995, 2009,
Oracle and/or its affiliates.All rights
reserved.
--使用create subdirs名称创建gg需要使用的子目录
GGSCI (source) 1>create subdirs
Creating subdirectories under
current directory /ggs
Parameter files/ggs/dirprm: created
Report files/ggs/dirrpt: created
Checkpoint files/ggs/dirchk: created
Process status files/ggs/dirpcs: created
SQL script files/ggs/dirsql: created
Database definitions files/ggs/dirdef: created
Extract data files/ggs/dirdat: created
Temporary files/ggs/dirtmp: created
Veridata files/ggs/dirver: created
Veridata Lock files/ggs/dirver/lock: created
Veridata Out-Of-Sync files/ggs/dirver/oos: created
Veridata Out-Of-Sync XML files
/ggs/dirver/oosxml: created
Veridata Parameter files/ggs/dirver/params: created
Veridata Report files/ggs/dirver/report: created
Veridata Status files/ggs/dirver/status: created
Veridata Trace files/ggs/dirver/trace: created
Stdout files/ggs/dirout: created
GGSCI (source) 2> exit
[ogg@source ggs]$
这样Oracle GoldenGate就安装好了!简单吧?接下来我将会介绍如何使用它们!记住,GG只不过是一个工具,就像你安装ms office一样简单,但怎么使用好它还是要好好琢磨琢磨嘀