Installing Oracle GoldenGate for Oracle 12.1.2 on Linux EL 6.x/RHEL 6.x/CentOS 6.x

 

Overview

    Purpose

    This Oracle-By-Example (OBE) tutorial covers installing Oracle GoldenGate version 12.1.2.0.0 on a Linux host running the OL 6.x of the operating system and the Oracle Database 12c. Other versions of the Linux OS can also be used for this OBE, namely:

    • Red Hat Enterprise Linux (RHEL) version 6.x
    • CentOS release 6.x

    Time to Complete

    Approximately 10 minutes. Since this OBE involves downloading software from the Internet, the final time depends on the speed of the Internet connection.

    Introduction

    Oracle GoldenGate provides very fast replication of heterogeneous databases by reading transaction logs and writing the changes to one or more target databases. Several OBEs in this section (Oracle Learning Library - Oracle GoldenGate) rely on the Oracle GoldenGate software being installed (together with database software from several vendors) on either a single host (which simulates both source and target replication environments) or two hosts (or virtual machines,) the first simulating the replication source and the second simulating the replication target. This OBE instructs on how to properly install the Oracle GoldenGate 12.1.2 software. Other, more advanced OBEs, will refer to this OBE rather than replicating the software installation process in each OBE.

    Scenario

    Most, but not all, Oracle GoldenGate features can be demonstrated using a single computer and a single database instance. In this case, Oracle GoldenGate replication occurs between two different database schemas running on the same database instance. To make this arrangement possible, the Oracle GoldenGate software must be installed twice on the same computer/VM, in different directories, one dedicated to the Oracle GoldenGate instance simulating the replication source and one dedicated to the Oracle GoldenGate instance simulating the replication target. The replication source instance manager will use the TCP/IP network port 7809, while the  replication target instance manager will use the TCP/IP network port 7909.

    In summary, the environment is:

    Host Name OS User Mgr Port Source Install Directory
    host01 Linux 64-bit oracle 7809 /u01/app/oracle/product/ogg_src
    host01 Linux 64-bit oracle 7909 /u01/app/oracle/product/ogg_trg

    More advanced and more realistic simulation environments involve having two different computers or VMs. This OBE can still be used to install the Oracle GoldenGate software in those environments. For convenience, even if not necessary, the second host (referred to as host02) will install the Oracle GoldenGate instance using the TCP/IP port 7909 for the manager. 

    When two hosts are configured, the /u01/app/oracle/product directory on host01 will contain the directories 12.1.0 and ogg_src. The /u01/app/oracle/product directory on host02 will contain the directories 12.1.0 and ogg_trg.

    Hardware and Software Requirements

    The following is a list of hardware and software requirements:

    Hardware
    • One Linux host. It can be a physical machine or a VM. Two environments are simulated, a replication source and a replication target. The Oracle GoldenGate 12.1.2 software is installed in two different location in the filesystem in order to simulate the two environments.
    • Alternatively, two Linux hosts. They can be physical machines or VMs. Two environments are simulated, a replication source and a replication target. In this alternative configuration, the Oracle GoldenGate 12.1.2 software is installed in one location in the filesystem of the first host (ogg_src) and in a different location (ogg_trg) of the second Linux host.
    Software
    • Readline wrapper (rlwrap) software for Linux. It allows line editing while using the Oracle GoldenGate Software Command Interface (ggsci) and the sqlplus utility.
    • Oracle GoldenGate on Oracle, Linux-64 ( Oracle Software Delivery Cloud ), version 12.1.2.0.0, part number V40146-01. This is the part number for 64-bit Linux.

    Prerequisites

    Before starting this tutorial, you should:

    • Have root access to the Linux computer/VM.
    • Have web access to download the software and documentation.
    • Have Oracle 12cR1 Database installed on the same host.

    Typographic Conventions

    Text color and font in the directions and in the screens should be interpreted as follows:

    Some_Command
    You type this as a command or a value. Example:
    Enter ./ggsci to start the command line interpreter.
    Some_Prompt
    The system responds with this as a prompt or reply. Example:
    After the welcome splash banner, you can enter commands at the GGSCI (host01) 1> prompt.
    Some_Button
    Click this on-screen button. Example:
    After selecting the version you want, click Continue to start the download.
    Some_Variable
    A variable that you substitute with a real value. Example:
    Enter your userid/password at the prompt.
    Some_Filename
    A filename, path, or folder/directory. Example:
    Edit the hosts file in the /etc directory.
    Some_Code
    A keyword or code element. Example:
    Change the parameter HandleCollisions to NoHandleCollisions after the initial load.
 

1. Downloading the Software


    Before installing the Oracle GoldenGate software you must download the software bundle packed into a zipped file from the Oracle eDelivery web site. To download the Oracle GoldenGate software, perform the following steps:

     

    1.1 Accessing Oracle GoldenGate Documentation

      Connect to the Linux computer using the oracle user.

      Access the documentation library.

      Using a web browser, go to http://docs.oracle.com/goldengate/1212/gg-winux/docs.htm. You have the option to either read the documents online, or to download the various manuals in PDF, Mobi or  ePub format.

      Click Oracle GoldenGate Installing and Configuring Oracle GoldenGate for Oracle Database. Read the guide to have access to detailed information pertaining to the installation of the Oracle GoldenGate software for the Oracle Database.

      You have successfully accessed Oracle GoldenGate documentation as a prerequisite for installing the software.

     

    1.2 Downloading Oracle GoldenGate on Linux

      Download the software from Oracle Software Delivery Cloud.

      Using a web browser, go to https://edelivery.oracle.com and click Sign In. On the Terms and Conditions page, select Yes for both agreements, and click Continue.

      On the Media Pack Search page, select Product Pack = Oracle Fusion Middleware, and Platform = Linux x86-64.

      Click Go.

      Select Oracle GoldenGate on Oracle v12.1.2 Media Pack for Linux x86-64.

      Click Continue.

      Make sure you are looking at part number V40146-01 for "Oracle GoldenGate V12.1.2.0.0 for Oracle on Linux x86-64."

      Click Download and wait for the download process to complete. Leave the browser open as you will download more software later.

      Copy the downloaded file V40146-01.zip to the /stage directory, where all the software needed for the OBE resides.

      Open a terminal window on the host01 computer and verify that the /stage directory exists. Create the /stage directory if it does not exist yet. To create the directory log in as the root user (using the "su -" command) and assign the read, write and execute privilege (chmod 777 /stage) on that directory for all users on the system.
      Host01 - Linux
      [oracle@host01 ~]$ ls /stage 
      ls: cannot access /stage: No such file or directory
      [oracle@host01 ~]$ su - 
      Password:
      [root@host01 ~]# mkdir /stage                                                     
      [root@host01 ~]# chmod 777 /stage  
      

      Copy the file V40146-01.zip from the browser default download directory (usually ~oracle/Downloads) to the /stage directory. If your browser uses a different directory for its downloads, replace ~oracle/Downloads with the appropriate directory.

      Host01 - Linux
      [root@host01 ~]$ cp ~oracle/Downloads/V40146-01.zip /stage 
      [root@host01 ~]# ls -l /stage                                                     
      total 333320
      -rw-r--r--. 1 root root 341316447 Jan 26 17:13 V40146-01.zip
      [root@host01 ~]# 
      
     

    1.3 Downloading the rlwrap package for Linux

      You download now the rlwrap package. The rlwrap package depends on the readline and readline-devel packages, which must be installed on the system.

      Using the terminal window still connected as root, issue the "yum list installed" command, to find out if those packages are already installed on the system.

      Host01 - Linux
      [root@host01 ~]$ yum list installed | grep readline-devel  
      readline-devel.x86_64               6.0-4.el6                 @public_ol6_latest  
      

      If the prompt returns without finding the package, it means it is not installed. Use yum to install the missing packages, for example:

      Host01 - Linux
      [root@host01 ~]# yum install readline-devel
      Loaded plugins: refresh-packagekit, security
      Setting up Install Process
      Resolving Dependencies
      --> Running transaction check
      ---> Package readline-devel.x86_64 0:6.0-4.el6 will be installed
      --> Finished Dependency Resolution
      
      Dependencies Resolved
      
      =======================================================================================================================
       Package                                   Arch         Version             Repository                      Size
      =======================================================================================================================
      Installing:
       readline-devel                            x86_64       6.0-4.el6           public_ol6_latest              134 k
      
      Transaction Summary
      =======================================================================================================================
      Install       1 Package(s)
      
      Total download size: 134 k
      Installed size: 255 k
      Is this ok [y/N]: y
      Downloading Packages:
      readline-devel-6.0-4.el6.x86_64.rpm                                                                     | 134 kB  00:01
      Running rpm_check_debug
      Running Transaction Test
      Transaction Test Succeeded
      Running Transaction
        Installing : readline-devel-6.0-4.el6.x86_64                                                                      1/1
        Verifying  : readline-devel-6.0-4.el6.x86_64                                                                      1/1
      Installed:
        readline-devel.x86_64 0:6.0-4.el6                                                                                    
      Complete!
      [root@host01 ~]#

      Download the rlwrap package from:

      http://rpm.pbone.net/index.php3/stat/4/idpl/15282330/dir/redhat_el_6/com/rlwrap-0.37-1.el6.i686.rpm.htm

      Use the browser still connected to the oracle user. The rlwrap-0.37-1.el6.i686.rpm file will be stored in the browser download directory (usually ~oracle/Downloads.)

      Copy the rlwrap-0.37-1.el6.i686.rpm file to the /stage directory. Use the terminal window connected as root to perform the copy:

      Host01 - Linux
      [root@host01 ~]# cp ~oracle/Downloads/rlwrap-0.37-1.el6.i686.rpm /stage  
      [root@host01 ~]# ls -l /stage
      total 333412
      -rw-r--r--. 1 root root     90460 Jan 26 22:27 rlwrap-0.37-1.el6.i686.rpm                   
      -rw-r--r--. 1 root root 341316447 Jan 26 17:13 V40146-01.zip
       
      
     

    1.4 Expanding the Oracle GoldenGate software

      The Oracle GoldenGate software bundle is delivered as a zip file (V40146-01.zip ) You must expand the zip file using the unzip command before you can install the software.

      Open a terminal window. Use the oracle user (the default user) to change directory to the /stage directory. Unzip the Oracle GoldenGate software bundle:

      Host01 - Linux
      [oracle@host01 ~]$ cd /stage  
      [oracle@host01 stage]$ ls
      rlwrap-0.37-1.el6.i686.rpm  V40146-01.zip
      [oracle@host01 stage]$ unzip V40146-01.zip
      Archive:  V40146-01.zip
         creating: fbo_ggs_Linux_x64_shiphome/
         creating: fbo_ggs_Linux_x64_shiphome/Disk1/
         creating: fbo_ggs_Linux_x64_shiphome/Disk1/install/
        inflating: fbo_ggs_Linux_x64_shiphome/Disk1/install/.oui  
        inflating: fbo_ggs_Linux_x64_shiphome/Disk1/install/runInstaller.sh                       
       
      ... many lines omitted for clarity ...
      inflating: OGG_WinUnix_Rel_Notes_12.1.2.0.0.pdf inflating: OGG_WinUnix_Rel_Notes_12.1.2.0.0.doc inflating: Oracle-GoldenGate-12.1.2.0-README.doc inflating: Oracle-GoldenGate-12.1.2.0-README.txt [oracle@host01 stage]$

      Unzipping the file V40146-01.zip creates the directory fbo_ggs_Linux_x64_shiphome/Disk1 under /stage. The release notes and the README files are also extracted and stored in the /stage directory.

      Host01 - Linux
      [oracle@host01 stage]$ ls -l  
      total 333952
      drwxr-xr-x. 3 oracle oinstall      4096 Sep 25 19:59 fbo_ggs_Linux_x64_shiphome
      -rw-r--r--. 1 oracle oinstall    144384 Oct  7 09:04 OGG_WinUnix_Rel_Notes_12.1.2.0.0.doc
      -rw-r--r--. 1 oracle oinstall    282049 Oct  7 09:04 OGG_WinUnix_Rel_Notes_12.1.2.0.0.pdf
      -rw-r--r--. 1 oracle oinstall     93696 Oct  7 09:04 Oracle-GoldenGate-12.1.2.0-README.doc  
      -rw-r--r--. 1 oracle oinstall     23528 Oct  7 09:04 Oracle-GoldenGate-12.1.2.0-README.txt
      -rw-r--r--. 1 root   root         90460 Jan 26 22:27 rlwrap-0.37-1.el6.i686.rpm
      -rw-r--r--. 1 root   root     341316447 Jan 26 17:13 V40146-01.zip  
      [oracle@host01 stage]$ ls fbo_ggs_Linux_x64_shiphome/Disk1
      install  response  runInstaller  stage
      
 

2. Installing the software

    The /stage directory now contains all files needed to install both the readline wrapper (rlwrap) and Oracle GoldenGate 12.1.2.0.0.

     

    2.1 Installing the readline wrapper

      Use the terminal window connected as root to install the readline wrapper utility. Change directory to /stage and use the yum command to install rlwrap:

      Host01 - Linux
      [root@host01 ~]#  cd /stage 
      [root@host01 stage]# yum install rlwrap-0.37-1.el6.i686.rpm 
      Loaded plugins: refresh-packagekit, security
      Setting up Install Process
      Examining rlwrap-0.37-1.el6.i686.rpm: rlwrap-0.37-1.el6.i686
      Marking rlwrap-0.37-1.el6.i686.rpm to be installed
      Resolving Dependencies
      --> Running transaction check
      ---> Package rlwrap.i686 0:0.37-1.el6 will be installed
      --> Finished Dependency Resolution
      
      Dependencies Resolved
      
      ===================================================================================================================
       Package                            Arch               Version                Repository                    Size
      ===================================================================================================================
      Installing:
       rlwrap                             i686               0.37-1.el6             /rlwrap-0.37-1.el6.i686      191 k
      
      Transaction Summary
      ===================================================================================================================
      Install       1 Package(s)
      
      Total size: 191 k
      Installed size: 191 k
      Is this ok [y/N]: y
      Downloading Packages:
      Running rpm_check_debug
      Running Transaction Test
      Transaction Test Succeeded
      Running Transaction
        Installing : rlwrap-0.37-1.el6.i686                                                                          1/1 
        Verifying  : rlwrap-0.37-1.el6.i686                                                                          1/1 
      
      Installed:
        rlwrap.i686 0:0.37-1.el6                                                                                         
      
      Complete!
      [root@host01 stage]#  
      

      Use the terminal window connected as oracle to add the "alias" commands which enable rlwrap. You must edit the bashrc hidden file, located in the default directory for the oracle user to add the alias commands. Since bashrc is a hidden file, you must prefix its name with a dot (.) - use either vi or gedit to edit the file. Change directory to the oracle default (cd ~) edit the bashrc file and add the alias to invoke sqlplus and the Oracle GoldenGate Software Command Interface (ggsci)

      Host01 - Linux
      [oracle@host01 stage]$ cd ~ 
      [oracle@host01 ~]$ vi .bashrc
      # .bashrc
      
      # Source global definitions
      if [ -f /etc/bashrc ]; then
              . /etc/bashrc
      fi
      
      # User specific aliases and functions
      alias sqlplus="rlwrap sqlplus"
      alias ggsci="rlwrap ./ggsci"
      

      Save the file leaving the editor. Source the new version of the bashrc file and make sure the two new alias commands have been defined:

      Host01 - Linux
      [oracle@host01 ~]$ . .bashrc
      [oracle@host01 ~]$ alias
      alias ggsci='rlwrap ./ggsci'
      alias l.='ls -d .* --color=auto'
      alias ll='ls -l --color=auto'
      alias ls='ls --color=auto'
      alias sqlplus='rlwrap sqlplus'
      alias vi='vim'
      alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
      [oracle@host01 ~]$ 
      

      Note the double dot separated by a space in the first line. The first dot instructs the shell to source the file. The second dot is necessary because bashrc is a hidden file.

     

    2.2 Installing the Oracle GoldenGate software for the replication source

      The Oracle Database 12c software is already installed on the computer, as per requirement listed in the "Prerequisites" section. It is assumed that the database software has been installed following the Optimal Flexible Architecture (OFA) standard, and that ORACLE_HOME is located at /u01/app/oracle/product/12.1.0/dbhome_1.

      You will install the Oracle GoldenGate software for the replication source in the directory /u01/app/oracle/product/ogg_src, which you must create.

      Use the terminal window connected as oracle. Create the /u01/app/oracle/product/ogg_src directory.
      Host01 - Linux
      [oracle@host01 ~]$ mkdir /u01/app/oracle/product/ogg_src
      [oracle@host01 ~]$ ls /u01/app/oracle/product
      12.1.0  ogg_src
      [oracle@host01 ~]$ 
      

      Run the Oracle GoldenGate 12.1.2.0.0 installer as the oracle user. The installer is located in the /stage/fbo_ggs_Linux_x64_shiphome/Disk1 directory.

      Host01 - Linux
      [oracle@host01 ~]$ cd /stage
      [oracle@host01 stage]$ cd fbo_ggs_Linux_x64_shiphome
      [oracle@host01 fbo_ggs_Linux_x64_shiphome]$ ls
      Disk1
      [oracle@host01 fbo_ggs_Linux_x64_shiphome]$ cd Disk1/
      [oracle@host01 Disk1]$ ls
      install  response  runInstaller  stage
      [oracle@host01 Disk1]$ ./runInstaller
      Starting Oracle Universal Installer...
      
      Checking Temp space: must be greater than 120 MB.   Actual 11011 MB    Passed
      Checking swap space: must be greater than 150 MB.   Actual 3967 MB    Passed
      Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
      Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-01-24_12-19-47AM. Please wait ...
      

      The installer starts, and after a few second the "Install Wizard - Step 1 of 5" window appears on screen:

      Select "Oracle GoldenGate for Oracle Database 12c (506.0MB)" and click Next.

      The "Install Wizard - Step 2 of 5" window appears on screen:

      In the "Software Location" field enter the directory you created to host the Oracle GoldenGate software for the replication source,/u01/app/oracle/product/ogg_src. Leave the "Start Manager" checkbox selected, and accept the default values for the Database Location (/u01/app/oracle/product/12.1.0/dbhome_1) and Manager Port (7809.) Click Next.

      The "Install Wizard - Step 3 of 5" window appears on screen:

      Verify the fields you entered in the previous screens and click Install to start the installation.

      The "Install Wizard - Step 4 of 5" window appears on screen.

      The window displays the progress bar and keeps you informed about the installation process.

      After a while, the installation process ends and the last window of the wizard appears, informing you that the installation was successful:

      Click Close to dispose of the window. The Oracle GoldenGate software for the replication source is now installed.

     

    2.3 Installing the Oracle GoldenGate software for the replication target

      The Oracle Database 12c software is already installed on the computer, as per requirement listed in the "Prerequisites" section. It is assumed that the database software has been installed following the Optimal Flexible Architecture (OFA) standard, and that ORACLE_HOME is located at /u01/app/oracle/product/12.1.0/dbhome_1.

      You will install the Oracle GoldenGate software for the replication target in the directory /u01/app/oracle/product/ogg_trg, which you must create.

      Use the terminal window connected as oracle. Create the /u01/app/oracle/product/ogg_trg directory.
      Host01 - Linux
      [oracle@host01 ~]$ mkdir /u01/app/oracle/product/ogg_trg
      [oracle@host01 ~]$ ls /u01/app/oracle/product
      12.1.0  ogg_src  ogg_trg
      [oracle@host01 ~]$ 
      

      Run the Oracle GoldenGate 12.1.2.0.0 installer as the oracle user. The installer is located in the /stage/fbo_ggs_Linux_x64_shiphome/Disk1 directory.

      Host01 - Linux
      [oracle@host01 ~]$ cd /stage
      [oracle@host01 stage]$ cd fbo_ggs_Linux_x64_shiphome
      [oracle@host01 fbo_ggs_Linux_x64_shiphome]$ ls
      Disk1
      [oracle@host01 fbo_ggs_Linux_x64_shiphome]$ cd Disk1/
      [oracle@host01 Disk1]$ ls
      install  response  runInstaller  stage
      [oracle@host01 Disk1]$ ./runInstaller
      Starting Oracle Universal Installer...
      
      Checking Temp space: must be greater than 120 MB.   Actual 11011 MB    Passed
      Checking swap space: must be greater than 150 MB.   Actual 3967 MB    Passed
      Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
      Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-01-24_12-19-47AM. Please wait ...
      

      The installer starts, and after a few second the "Install Wizard - Step 1 of 5" window appears on screen:

      Select "Oracle GoldenGate for Oracle Database 12c (506.0MB)" and click Next.

      The "Install Wizard - Step 2 of 5" window appears on screen:

      In the "Software Location" field enter the directory you created to host the Oracle GoldenGate software for the replication source,/u01/app/oracle/product/ogg_trg. Leave the "Start Manager" checkbox selected, and accept the default value for the Database Location (/u01/app/oracle/product/12.1.0/dbhome_1) Change the default value for the Manager Port from 7809 to 7909. The Oracle GoldenGate instance simulating the replication target must use a different port in order not to clash with the replication source instance, which has been configured to use port 7809. Click Next.

      The "Install Wizard - Step 3 of 5" window appears on screen:

      Verify the fields you entered in the previous screens and click Install to start the installation.

      The "Install Wizard - Step 4 of 5" window appears on screen.

      The window displays the progress bar and keeps you informed about the installation process.

      After a while, the installation process ends and the last window of the wizard appears, informing you that the installation was successful:

      Click Close to dispose of the window. The Oracle GoldenGate software for the replication target is now installed.

 

Summary

    In this tutorial, you have learned how to:

    • Download the Oracle GoldenGate software version 12.1.2
    • Download the rlwrap utility, useful to minimize typing ggsci and sqlplus commands
    • Install the Oracle GoldenGate software for the replication source instance using the new installer
    • Install the Oracle GoldenGate software for the replication target instance using the new installer
    • Install the rlwrap utility

    Resources

    Credits

    • Lead Curriculum Developer: Elio Bonazzi.
    • Other Contributors: Steve Friedberg, Joe deBuzna, Chris Lawless.