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
Step7 Make sure you can run TGC
 
     
  >> 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 -
* If you have choosed TG package with J2RE, install it according to the instraction of the installer and apply procedures from "Step2 Determine install directory for TG".

For example, it is assumed that "jre-1_5_0_18-linux-i586.bin" which is downloaded from Oracle Corp(former: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 17198684 Nov 28 22:00 jre-1_5_0_18-linux-i586.bin
[oracle@dbsrv1 tg]$ chmod 755 jre-1_5_0_18-linux-i586.bin
[oracle@dbsrv1 tg]$ ls -l
total 13840
-rwxr-xr-x 1 oracle oinstall 17198684 Nov 28 22:00 jre-1_5_0_18-linux-i586.bin
[oracle@dbsrv1 tg]$ ./jre-1_5_0_18-linux-i586.bin
Sun Microsystems, Inc. Binary Code License Agreement

for the JAVA 2 PLATFORM STANDARD EDITION RUNTIME ENVIRONMENT
5.0

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

( * * * * 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 jre1.5.0_18/lib/plugin.jar
Creating jre1.5.0_18/lib/javaws.jar
Creating jre1.5.0_18/lib/deploy.jar

Done.

[oracle@dbsrv1 tg]$ ls
jre1.5.0_18 jre-1_5_0_18-linux-i586.bin
[oracle@dbsrv1 tg]$
 
To the next, execute "java" command and make sure "java" will run without error.
 
*COMMAND-LINE SAMPLE
[oracle@dbsrv1 tg]$ cd jre1.5.0_18/bin
[oracle@dbsrv1 bin]$ ./java -version
java version "1.5.0_18"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_18-b02)
Java HotSpot(TM) Client VM (build 1.5.0_18-b02, mixed mode, sharing)
[oracle@dbsrv1 bin]$
 

 

  Step2 - Determine install directory for TG -
Extract TG ZIP package("tar.gz" package, If you have choosed TG with J2RE Package) to a folder of your choice. In this section, it is assumed that "/home/oracle/tg" directory is used.
 
*COMMAND-LINE SAMPLE (ZIP)
[oracle@dbsrv1 tg]$ pwd
/home/oracle/tg
[oracle@dbsrv1 tg]$ unzip tg09X.zip
 Archive: tg09X.zip
 inflating: tg09X/clean.bat
 creating: tg09X/conf/

( * * * * snip * * * * )

 inflating: tg09X/tgc.init
 extracting: tg09X/tgc.jar
 inflating: tg09X/tgc.log
[oracle@dbsrv1 tg]$ cd tg09X
[oracle@dbsrv1 tg09X]$

 
*COMMAND-LINE SAMPLE (tar.gz)
[oracle@dbsrv1 tg]$ pwd
/home/oracle/tg
[oracle@dbsrv1 tg]$ gzip -d tg09Xwj-linux.tar.gz
[oracle@dbsrv1 tg]$ tar xvf tg09Xwj-linux.tar
./tg09Xwj-linux/
./tg09Xwj-linux/jre1.5.0_18/

( * * * * snip * * * * )

./tg09Xwj-linux/imgs/tg_icon.ico
./tg09Xwj-linux/imgs/icon_rserver_root.gif
./tg09Xwj-linux/imgs/tg_specifyagents_disabled.gif
[oracle@dbsrv1 tg]$ cd tg09Xwj-linux
[oracle@dbsrv1 tg09Xwj-linux]$
 
The directory "/home/oracle/tg/tg09X" contains these subdirectories and files :
 

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

:
:
:
:
:
:
:
:
:

Startup TGC - TG Controller - on Windows systems.
Startup TGC - TG Controller - on Linux systems.
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 -
* If you have choosed TG package with J2RE, install it according to the instraction of the installer and apply procedures from "Step4 Edit the shell script "tg.sh" starting up TG".

Create the symbolic link "/home/oracle/tg/tg09X/j2re" to "/home/oracle/tg/jre1.5.0_18".

Make sure you can run "java" command via the symbolic link.
 
* COMMAND-LINE SAMPLE
[oracle@dbsrv1 tg09X]$ pwd
/home/oracle/tg/tg09X
[oracle@dbsrv1 tg09X]$ ln -s /home/oracle/tg/jre1.5.0_18 \
/home/oracle/tg/tg09X/j2re
[oracle@dbsrv1 tg09X]$ /home/oracle/tg/tg09X/j2re/bin/java -version
java version "1.5.0_18"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_18-b02)
Java HotSpot(TM) Client VM (build 1.5.0_18-b02, mixed mode, sharing)
[oracle@dbsrv1 tg09X]$
 

 

  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 tg09X]$ vi tg.sh
 
*"tg.sh" SAMPLE
#! /bin/sh
# -- #! /bin/sh
# -- TG - Transaction Generator - [ Version 0.X ] initialization script v.X --

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

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

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

# PostgreSQL JDBC DRIVER :
CLASSPATH=./lib/postgresql-8.2-508.jdbc3.jar:${CLASSPATH}

# ORACLE JDBC DRIVER :
CLASSPATH=./lib/ojdbc5.jar:${CLASSPATH}

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

java -Xmx512m tg ${OPTION1} ${OPTION2} ${OPTION3} ${OPTION4} ${OPTION5} ${OPTION6} ${OPTION7} ${OPTION8}

exit
 
After editing, give "tg.sh" execute permission.
 
* COMMAND-LINE SAMPLE
[oracle@dbsrv1 tg09X]$ 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 tg09X]$ ./tg.sh
Transaction Generator Wed Jun 13 23:49:11 JST 2007

Loading configuration file... Failed.
ERROR : Configuration file does not exist. : /home/oracle/tg/tg09X/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.
 



  Step7 - Make sure you can run TGC-
If you can use GUI environments, you can control TG with TGC - TG Controller - which is management tool for TG.

Firstly, replace SWT library for Linux.
* If you have choosed TG package with J2RE, skip this step and proceed next.
 
* COMMAND-LINE SAMPLE
[oracle@dbsrv1 tg09X]$ cd lib
[oracle@dbsrv1 lib]$
rm swt.jar
[oracle@dbsrv1 lib]$ ln -s swt.jar.linux swt.jar
 
 
To the next, Type "tgc.sh" which is startup script for TGC. The following window will be displayed.
* COMMAND-LINE SAMPLE
[oracle@dbsrv1 tg09X]$ chmod 755 tgc.sh
[oracle@dbsrv1 tg09X]$
./tgc.sh
 
 
*If you recieved following messages, TGC failed to startup by the access control of X.

Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
Exception in thread "main" org.eclipse.swt.SWTError: No more handles [gtk_init_check() failed]

at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.widgets.Display.createDisplay(Unknown Source)
at org.eclipse.swt.widgets.Display.create(Unknown Source)
at org.eclipse.swt.graphics.Device.<init>(Unknown Source)
at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
at org.eclipse.swt.widgets.Display.<init>(Unknown Source)
at tgc.<init>(tgc.java:585)
at tgc.main(tgc.java:581)


Type "xhost +" as root user and re-execute "tgc.sh".
 
 
* COMMAND-LINE SAMPLE
[oracle@dbsrv1 tg09X]$ su -
Password:
[root@dbsrv1 ~]#
xhost +
access control disabled, clients can connect from any host
[root@dbsrv1 ~]#
 
 

     
  >> TOP > Usage
> Install steps for Linux
 

 

 

 
 

 

 
 
Copyright 2003 - 2008 tgmstr. All rights reserved.