!!! Execute on each OGG server !!!
OGG server #1***************************
- ogg-srv01.oracak.ruOGG server #2
***************************
- ogg-srv02.oracak.ru
1. Installing the required libraries for OGG.
[root] #
yum -y install libpq.x86_64
yum -y install libnsl.x86_64
2. Creating the oracle user - the owner of OGG.
[root] #>
groupadd -g 101 dba
groupadd -g 10004 oinstall
useradd -c 'Oracle software owner' -d /home/oracle -g oinstall -G dba -m -u 101 -s /bin/bash oracle
passwd -u oracle
usermod -g oinstall -G dba oracle
mkdir /u01/ /trails /gg
chown -R oracle:oinstall /u01
chown -R oracle:oinstall /trails
chown -R oracle:oinstall /gg
3. Creating a profile with environment variables for "OGG for Postgres"
[oracle] $> vi ~/.profile.postgres.gg21
export GG=/gg/gg21
export LD_LIBRARY_PATH=$GG/lib
export PATH=$PATH:$HOME/bin:$GG/bin
export DISPLAY="`who -m | cut -f2 -d'(' | cut -f1 -d')'`:0.0"
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
export TEMP=/tmp
export TMPDIR=/tmp
export EDITOR=vi
export ODBCINI=$GG/odbc.ini
umask 022
cd $GG
4. Installing the 'OGG for Postgres' distribution.
[oracle] $>
-- Create a directory and unpack the OGG distribution into it.
mkdir -p /gg/gg21
unzip ggs_Linux_x64_PostgreSQL_64bit.zip
tar -xvf ggs_Linux_x64_PostgreSQL_64bit.tar
5. The schema name for GoldenGate objects is set in the $GG_HOME/GLOBALS file.
[oracle] $> . ~/.profile.postgres.gg21
[oracle] $> vi $GG/GLOBALS
GGSCHEMA ggadmin
6. Configure ODBC connections to connect to the haproxy port.
[oracle] $> vi $GG/odbc.ini
[ODBC Data Sources]
GG_postgres=DataDirect 7.1 PostgreSQL Wire Protocol
[ODBC]
IANAAppCodePage=106
InstallDir=/gg/gg21
####################### PG-HAPROXY CONNECTION
[gg_dbquik1]
Driver=/gg/gg21/lib/GGpsql25.so
Database=dbquik1
HostName=db-pgsql01.oracak.com.ru
PortNumber=8080
AlternateServers=(Hostname=db-pgsql02.oracak.com.ru:PortNumber=8080:Database=dbquik1)
ConnectionRetryCount=3
ConnectionRetryDelay=5
LoadBalancing=1
FailoverMode=1
FailoverPreconnect=0
KeepAlive=1
[gg_dbquik2]
Driver=/gg/gg21/lib/GGpsql25.so
Database=dbquik2
HostName=db-pgsql03.oracak.com.ru
PortNumber=8080
AlternateServers=(Hostname=db-pgsql04.oracak.com.ru:PortNumber=8080:Database=dbquik2)
ConnectionRetryCount=3
ConnectionRetryDelay=5
LoadBalancing=1
FailoverMode=1
FailoverPreconnect=0
KeepAlive=1
7. Create a credential store on the OGG server:
[oracle] $> . ~/.profile.postgres.gg21
[oracle] $> $GG/ggsci
ggsci>>
create subdirs
add credentialstore
alter credentialstore add user ggadmin, password <***> alias ggadmin
INFO CREDENTIALSTORE
8. Create a parameter file for GG Manager:
./ggsci
edit param mgr
Port 7831start mgr
ACCESSRULE, PROG *, ALLOW
AUTORESTART ER *, RETRIES 120, WAITMINUTES 10, RESETMINUTES 1200
PURGEOLDEXTRACTS /ggtrail/dbquik1/*, USECHECKPOINTS, MINKEEPHOURS 96
-- End of parameter file
Note (ogg-srv02.oracak.ru):
PURGEOLDEXTRACTS /ggtrail/dbquik2/*, USECHECKPOINTS, MINKEEPHOURS 96