• No results found

Verifying the Java Environment and Installing Apache ActiveMQ and Oracle GoldenGate for Java

In document D89113GC10_ag (Page 147-151)

Practices for Lesson 7: Overview

Practice 7-1: Verifying the Java Environment and Installing Apache ActiveMQ and Oracle GoldenGate for Java

Overview

In this practice, you make sure that Java is correctly installed on the system and you install ActiveMQ, the JMS broker provided by the Apache Software Foundation. In addition, the software component Oracle GoldenGate Application Adapters for JMS and Flat File must be installed. The latter provides a user exit, a sharable image called libggjava_ue.so, which is a Java Native Interface (JNI) bridge that allows Oracle GoldenGate to interact with Java.

Assumptions

Your system has the Java Development Kit (JDK) release 1.7 update 75 installed in the

/usr/java/jdk1.7.0_75 directory. You will refer to this directory by using the symbolic link "latest," so the JDK install directory becomes /usr/java/latest.

Tasks

1. If your system has access to the Internet, point your browser to the URL

http://activemq.apache.org/activemq-5100-release.html to download the Apache ActiveMQ software. Click the download link for Unix/Linux/Cygwin Distribution. Download the apache-activemq-5.10.0-bin.tar.gz file to the /tmp directory. Alternatively, if you do not have access to the Internet or if you want to save time, you can use the Apache ActiveMQ distribution kit stored in the /install/activmq directory. 2. Open a shell window, use the su command as the root user (you should know the root

password by now; if unsure, ask your instructor), and change the directory to /opt. Expand (untar) the apache-activemq-5.10.0-bin.tar.gz file to create the /opt/apache- activemq-5.10.0 subdirectory. Then use the chown command to change the ownership of the ActiveMQ directory and files from root to oracle:

[OS prompt]$ su - Password: ****** [OS prompt]# cd /opt

[OS prompt]# tar xzvf /install/activemq/apache-activemq-5.10.0-

bin.tar.gz

apache-activemq-5.10.0/bin/run.jar

apache-activemq-5.10.0/activemq-all-5.10.0.jar

apache-activemq-5.10.0/lib/activemq-camel-5.10.0.jar

... many lines omitted for clarity...

apache-activemq-5.10.0/webapps/fileserver/WEB- INF/classes/org/apache/activemq/util/FilenameGuardFilter.class apache-activemq-5.10.0/webapps/fileserver/WEB- INF/classes/org/apache/activemq/util/IOHelper.class apache-activemq-5.10.0/webapps/fileserver/WEB- INF/classes/org/apache/activemq/util/RestFilter.class

[OS prompt]# chown -R oracle.oinstall apache-activemq-5.10.0/

3. Log out from the root account. Make sure that your shell is connected as the default user (oracle) and make sure that Java is correctly installed by executing the command java –version.

[OS prompt]# exit [OS prompt]$ id

uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall), 54322(dba)

[OS prompt]$ java -version java version "1.7.0_75"

Java(TM) SE Runtime Environment (build 1.7.0_75-b13)

Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode) [OS prompt ~]$

4. You must install the Oracle GoldenGate Adapters release 11.2. You will find the distribution kit stored in the /install/oggjava directory. The Oracle GoldenGate Adapters software patch 11.2.1.0.4 is bundled in the zip file p20447460_112104_Linux-x86-64.zip. Change the directory to /u03/ogg and create the directory oggjms_trg. Change the directory to the newly created oggjms_trg directory and copy the zip file from

/install/oggjava to the current directory: [OS prompt]$ cd /u03/ogg

[OS prompt]$ mkdir oggjms_trg [OS prompt]$ ls –l

drwxr-xr-x. 18 oracle oinstall 4096 Mar 25 21:35 oggjms_trg drwxr-xr-x. 29 oracle oinstall 4096 Mar 22 00:38 ogg_node1 drwxr-xr-x. 29 oracle oinstall 4096 Mar 22 00:40 ogg_node2 drwxr-xr-x. 29 oracle oinstall 4096 Mar 22 00:41 ogg_node3 drwxr-xr-x. 29 oracle oinstall 4096 Mar 12 23:31 ogg_src drwxr-xr-x. 29 oracle oinstall 4096 Mar 17 22:08 ogg_trg [OS prompt]$ cd oggjms_trg

[OS prompt]$ pwd /u03/ogg/oggjms_trg

[OS prompt]$ cp /install/oggjava/p20447460_112104_Linux-x86-64.zip . 5. Unzip the p20447460_112104_Linux-x86-64.zip file. Extract (untar) the Java

Adapter TAR file:

[OS prompt ]$ unzip p20447460_112104_Linux-x86-64.zip Archive: p20447460_112104_Linux-x86-64.zip inflating: ggs_Adapters_Linux_x64.tar inflating: OGG_Adapters_Rel_Notes_11.2.1.0.4.pdf inflating: OGG_WinUnix_Rel_Notes_11.2.1.0.27.pdf inflating: Oracle-GoldenGate-11.2.1.0-README.txt inflating: Oracle_GoldenGate_Adapters-README_v11.2.1.txt [OS prompt ]$ tar xvf ggs_Adapters_Linux_x64.tar

AdapterExamples/

AdapterExamples/java-delivery/

AdapterExamples/java-delivery/format_op2xml.vm

... many lines omitted for clarity ... ./ucharset.h ./libantlr3c.so ./libicui18n.so.38 ./tcperrs [OS prompt ]$

6. Launch the GGSCI utility and create the required subdirectories by using the create subdirs command:

[OS prompt ]$ ggsci

Oracle GoldenGate Command Interpreter Version 11.2.1.0.27 19591627

OGGCORE_11.2.1.0.0OGGBP_PLATFORMS_141006.1156

Linux, x64, 64bit (optimized), Generic on Oct 6 2014 13:09:44 Copyright (C) 1995, 2014, Oracle and/or its affiliates. All rights reserved.

GGSCI ([HOST]) 1> create subdirs

Creating subdirectories under current directory /u03/ogg/oggjms_trg

Parameter files /u03/ogg/oggjms_trg/dirprm: already exists

Report files /u03/ogg/oggjms_trg/dirrpt: created

Checkpoint files /u03/ogg/oggjms_trg/dirchk: created

Process status files /u03/ogg/oggjms_trg/dirpcs: created

SQL script files /u03/ogg/oggjms_trg/dirsql: created

Database definitions files /u03/ogg/oggjms_trg/dirdef: created

Extract data files /u03/ogg/oggjms_trg/dirdat: created

Temporary files /u03/ogg/oggjms_trg/dirtmp: created

Stdout files /u03/ogg/oggjms_trg/dirout: created

GGSCI ([HOST]) 2>

7. Edit the manager parameter file and specify port 7709 where the manager will listen for incoming connections:

GGSCI ([HOST]) 2> edit param mgr

Port 7709

8. Exit the editor after saving the file and start the Oracle GoldenGate Manager process: GGSCI ([HOST]) 3> start mgr

Manager started.

GGSCI ([HOST]) 4> info mgr detail

Manager is running (IP port host01.localdomain.7709).

9. Leave the shell window open and GGSCI running, connected to the Java Adapter Oracle GoldenGate instance.

This completes Practice 7-1. Continue with Practice 7-2.

In document D89113GC10_ag (Page 147-151)