Home skin

 

  Location : TOP > Usage
> Install steps for ORACLE (Linux)
 
     
  Step1 Install J2RE
Step2 Determine install directory for TG
Step3 Create a symbolic link to J2RE
Step4 Edit the shell script "tg.sh"
Step5 Make sure you can run TG
Step6 Make sure you can load JDBC driver
 
     
  >> TOP  
 
   

 

 

 

 

This chapter guides your installation of TG on the following environment.

Environment
Platform Linux
JDBC driver ORACLE JDBC Driver(Type.2)
Target database ORACLE
Others Oracle Client has been correctoly installed.
TG is executed by operating system user who owns Oracle binary.

 

  Step1 - Install J2RE -

For example, it is assumed that "j2sdk-1_4_2_01-linux-i586.bin" (downloaded from Sun Microsystem's inc web site) will be installed to the "/home/oracle/tg" directory.

Make sure the downloaded package is executable. If not, use "chmod" command to give the package "execute" permission and run it.

 
*COMMAND-LINE SAMPLE
[oracle@dbsrv1 tg]$ pwd
/home/oracle/tg
[oracle@dbsrv1 tg]$ ls -l
total 13840
-rw-r--r-- 1 oracle oinstall 14150306 Nov 28 22:00 j2re-1_4_2_01-linux-i586.bin
[oracle@dbsrv1 tg]$ chmod 755 j2re-1_4_2_01-linux-i586.bin
[oracle@dbsrv1 tg]$ ls -l
total 13840
-rwxr-xr-x 1 oracle oinstall 14150306 Nov 28 22:00 j2re-1_4_2_01-linux-i586.bin
[oracle@dbsrv1 tg]$ ./j2re-1_4_2_01-linux-i586.bin
Sun Microsystems, Inc.
Binary Code License Agreement

for the

JAVATM 2 RUNTIME ENVIRONMENT (J2RE), STANDARD EDITION, VERSION 1.4.2_X

SUN MICROSYSTEMS, INC. ("SUN") IS WILLING TO LICENSE THE SOFTWARE IDENTIFIED
BELOW TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS
CONTAINED IN THIS BINARY CODE LICENSE AGREEMENT AND SUPPLEMENTAL LICENSE
TERMS (COLLECTIVELY "AGREEMENT"). PLEASE READ THE AGREEMENT CAREFULLY. BY
DOWNLOADING OR INSTALLING THIS SOFTWARE, YOU ACCEPT THE TERMS OF THE

( * * * * snip * * * * )

For inquiries please contact: Sun Microsystems, Inc., 4150 Network Circle,
Santa Clara, California 95054, U.S.A.
(LFI#130039/Form ID#011801)

Do you agree to the above license terms? [yes or no]
yes< input "yes" and press enter here.
Unpacking...
Checksumming...

( * * * * snip * * * * )

Creating j2sdk1.4.2_01/jre/javaws/javaws.jar
Done.
[oracle@dbsrv1 tg]$ ls
j2re-1_4_2_01-linux-i586.bin j2re1.4.2_01
[oracle@dbsrv1 tg]$
 

To the next, execute "java" command and make sure "java" will run without error.

 
*COMMAND-LINE SAMPLE
[oracle@dbsrv1 tg]$ cd j2re1.4.2_01/bin
[oracle@dbsrv1 bin]$ ./java -version
java version "1.4.2_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)
[oracle@dbsrv1 bin]$
 

 

  Step2 - Determine install directory for TG -

Extract TG ZIP package to a folder of your choice. In this section, it is assumed that "/home/oracle/tg" directory is used.

 
*COMMAND-LINE SAMPLE
[oracle@dbsrv1 tg]$ pwd
/home/oracle/tg
[oracle@dbsrv1 tg]$ unzip tg080.zip
 Archive: tg080.zip
 inflating: tg080/clean.bat
 creating: tg080/conf/

( * * * * snip * * * * )

 inflating: tg080/tgc.init
 extracting: tg080/tgc.jar
 inflating: tg080/tgc.log
[oracle@dbsrv1 tg]$ cd tg070
[oracle@dbsrv1 tg]$
 
The directory "/home/oracle/tg/tg080" contains these subdirectories and files :
 

- tgc.bat
- tgc.jar
- tg.bat
- tg.sh
- tg.conf
- tg.jar
- jobs
- lib
- conf

:
:
:
:
:
:
:
:
:

Startup TGC - TG Controller -.
Contains classes for TGC.
Startup TG on Windows systems.
Startup TG on Linux, UNIX systems.
Contains parameters for TG.
Contains classes for TG.
Contains scripts for JOB.
Contains java libraries.
Contains confifration files for TG.

 

 

  Step3 - Create a symbolic link to J2RE -

Create the symbolic link "/home/oracle/tg/tg080/j2re" to "/home/oracle/tg/j2re1.4.2_01".
Make sure you can run "java" command via the symbolic link.

 
* COMMAND-LINE SAMPLE
[oracle@dbsrv1 tg080]$ pwd
/home/oracle/tg/tg080
[oracle@dbsrv1 tg080]$ ln -s /home/oracle/tg/j2re1.4.2_01 \
/home/oracle/tg/tg080/j2re

[oracle@dbsrv1 tg080]$ /home/oracle/tg/tg080/j2re/bin/java -version
java version "1.4.2_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_01-b06)
Java HotSpot(TM) Client VM (build 1.4.2_01-b06, mixed mode)
[oracle@dbsrv1 tg080]$
 

 

  Step4 - Edit the shell script "tg.sh" starting up TG -

Edit the shell script "tg.sh" which is used to startup TG. And, set "CLASSPATH" environmental value to contain JDBC driver file.

* According to circumstances, you might set other environmental values "LD_LIBRARY_PATH", "TNS_ADMIN".

 
* COMMAND-LINE SAMPLE
[oracle@dbsrv1 tg080]$ vi tg.sh
 
*"tg.sh" SAMPLE
#! /bin/sh
# -- #! /bin/sh
# -- TG - Transaction Generator - [ Version 0.X ] initialization script v.2 --

OPTION1=$1
OPTION2=$2
OPTION3=$3

PATH=./j2re/bin:${PATH}
export PATH

# MySQL JDBC DRIVER :
#CLASSPATH=./lib/mysql-connector-java-5.1.0-bin.jar:${CLASSPATH}

# PostgreSQL JDBC DRIVER :
#CLASSPATH=./lib/jdbc7.1-1.2.jar:${CLASSPATH}

# ORACLE JDBC DRIVER :
CLASSPATH=${ORACLE_HOME}/jdbc/lib/ojdbc14.jar:${CLASSPATH}

# General setting :
CLASSPATH=./tg.jar:.:${CLASSPATH}
export CLASSPATH

java -Xmx512m tg ${OPTION1} ${OPTION2} ${OPTION3}

exit
 

After editing, give "tg.sh" execute permission.

 
* COMMAND-LINE SAMPLE
[oracle@dbsrv1 tg080]$ chmod 755 tg.sh
 

 

  Step5 - Make sure you can run TG -

Run "tg.sh" to startup TG.
When your setup has been done correctly, the following message will be displayed.

 
* COMMAND-LINE SAMPLE
[oracle@dbsrv1 tg080]$ ./tg.sh
TG - Transaction Generator - [ Version 0.80 ] Wed Jun 13 23:49:11 JST 2007

Loading configuration file... Failed.
ERROR : Configuration file does not exist. : /home/oracle/tg/tg080/tg.conf

type "HELP" or "h" to print help messages.

TG>
 

*The example above is assumed that the configuration file of TG (tg.conf) does not exist. Therefore "Loading configuration file... Failed." message is displayed. For the details of "tg.cpmf", please see "Command-line mode" and "Parameter reference" pages.

 

 

  Step6 - Make sure you can load JDBC driver -

Type "check driver oracle" on TG command prompt and press "Enter" key. When JDBC driver is correctly loaded, the following message will be displayed.

 
* COMMAND-LINE SAMPLE
TG> check driver oracle
Loading JDBC driver "oracle.jdbc.driver.OracleDriver" ... OK.

TG>
 

*If you recieved following messages, TG failed to load JDBC driver.

"Loading Oracle JDBC driver... .Failed."

See section "Step4 - Edit the shell script "tg.sh" starting up TG -", Edit the shell script and correct "CLASSPATH" environmental value.

 

     
  >> TOP > Usage
> Install steps for Linux
 

 

Copyright 2003 - 2008 tgmstr. All rights reserved.