Home arrow Oracle arrow Page 15 - Oracle Application Server 10g Architecture and Administration

Managing Application Server 10gwith dcmctl - Oracle

Get an overview of the Oracle Application Server 10g architecture, its functional components, the administrative tools for application development, and examples of commands that are used to perform frequent Application Server 10g administrative functions. This chapter is from the book, Oracle Application Server 10g Administration Handbook, by John Garmany and Donald K. Burleson (McGraw-Hill/Osborne, ISBN: 0072229586, 2004).

TABLE OF CONTENTS:
  1. Oracle Application Server 10g Architecture and Administration
  2. Hardware Architecture of Application Server 10g
  3. Client Tier, Web Tier, OHS, and Web Cache
  4. App Server Tier, Partitioning
  5. Application Server 10g Clusters and Farms and Database Tier
  6. Application Server Discoverer
  7. Oracle Application Server Wireless
  8. Single Sign-On (SSO)
  9. Oracle Application Server 10g Administration
  10. Command-Line Interfaces or OEM?
  11. Instance Manager Home Page
  12. Category Command Usage Table
  13. Command Line Interface and Scripts
  14. EM Commands with emctl
  15. Managing Application Server 10gwith dcmctl
  16. Miscellaneous Application Server 10g Commands and Sumary
By: McGraw-Hill/Osborne
Rating: starstarstarstarstar / 66
July 13, 2004

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

The Distributed Configuration Manager (DCM) is the master utility for Application Server 10g. The DCM is responsible for maintaining configuration by updating the configuration files on each server. DCM also stores the values of the parameters within each configuration file on each server within isadb. Note that if you choose not to implement the infrastructure (not recommended), the parameter files will exist as flat files on each server.

The dcmctl utility has two important argument settings, verbose (-v) and diagnostic (-d). These are important options because they provide additional diagnostic information about the state of your dcmctl commands. Starting in Application Server 10g release 9.0.4, you can use set commands to enable and disable these options:

dcmctl set v on
dcmctl set d on

Once you have established the settings, you can use dcmctl for a variety of Application Server 10gadministrative functions. Here is an example of using dcmctl to start the HTTP server (OHS):

dcmctl start -ct ohs
http://diogenes:7777
http://diogenes:1080

You can also use the dcmctl command to deploy OC4J applications, and the dcmctl commands can be embedded into command lists for the purpose of deploying them on many servers. For example, lets create a list of dcmctl commands to deploy an OC4J application on multiple servers. Assume that we have saved this file as /home/oracle/dcm_dep.cmd on our main server:

dcm_dep.cmd

echo "creating testcluster"
createcluster testcluster
echo "joining testcluster"
joincluster testcluster
echo "creating component component1"
createcomponent -ct oc4j -co component1
echo "starting component to deploy application"
start -co component1
echo " deploying application"
deployapplication -f /stage/apps/app1.ear -a app1 -co component1
echo "starting the cluster"
start -cl testcluster
echo "verifying everything started "
getstate
exit

So, how can you execute this script on all 20 of your OC4J servers? You can create a shell script to loop through a list of all servers and deploy the J2EE application on each OC4J server. This script requires the remote shell (rsh) and remote copy (rcp) UNIX commands. The rsh command is enabled by placing server host names in your .rhosts file. The rsh facility should only be implemented if all Application Server 10g servers are safe behind a firewall, because rsh allows a hack who gains access to one server to access all other servers in the .rhosts file.

deploy_oc4j.ksh

#!/bin/ksh
#***************************************************
#
# Copyright (c) 2003 by Donald K. Burleson
#
# Deploy Oracle Application Server 10g application on multiple servers
#
#***************************************************
# First, we must set the environment . . . .
export ORACLE_BASE=/private/ias
# Use this ORACLE_HOME for midtier applications
#export ORACLE_HOME=$ORACLE_BASE/midtier
# Use this ORACLE_HOME for infra applications
export ORACLE_HOME=$ORACLE_BASE/infra
SET PATH=.;$PATH;%ORACLE_HOME%dcmbin;%ORACLE_HOME%j2eehome;
%ORACLE_HOME%ldapbin;%ORACLE_HOME%ldapodiadmin;%ORACLE_HOME%
ocabin;%ORACLE_HOME%opmnbin;%ORACLE_HOME%portaladminplsqlsso;
%ORACLE_HOME%ssolib;%ORALE_HOME%uddilib;%ORACLE_HOME%upgrade;
%ORACLE_HOME%wirelessbin
export ORACLE_SID=iasdb
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib
#export DISPLAY=tor:2.0
# Loop through each host name . . .
for host in `cat ~oracle/.rhosts|cut -d"." -f1|awk '{print $1}'|sort -u`
do
# Get the ORACLE_HOME on each Oracle Application Server 10g server
home=`rsh $host "cat /etc/oratab|egrep ':N|:Y'|grep -v *|cut -f1/
d':'"``
# Copy the dcm command file and ear to the remote server
rcp -p /home/oracle/dcm_dep.cmd ${host}:~oracle/dcm_dep.cmd
rcp -p /stage/apps/app1.ear ${host}:/stage/apps/app1.ear
# Set and check file permissions
rsh $host "chmod 500 ~oracle/dcm_dep.cmd "
rsh $host "ls -al ~oracle/dcm_dep.cmd"
# Execute dcmctl to start the dcmctl shell:
rsh $host "$home/dcm/bin/dcmctl shell f ~oracle/dcm_dep.cmd"
done

As you can see, the dcmctl command is very useful when you must deploy applications across many J2EE instances.

This chapter is from Oracle Application Server 10g Administration Handbook, by Garmany and Burleson. (McGraw-Hill/Osborne, 2004, ISBN: 0072229586). Check it out at your favorite bookstore today. Buy this book now.



 
 
>>> More Oracle Articles          >>> More By McGraw-Hill/Osborne
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

ORACLE ARTICLES

- Oracle Java Security Woes Continue
- Oracle's New IaaS Cloud Option: There's a Ca...
- Oracle Acquires Eloqua to Boost Cloud Presen...
- Choosing Innovation: Oracle Survey Insights
- Oracle Fixes Privilege Escalation Bug
- Oracle`s Communications Service Availability...
- Oracle Releases Exalytics, Taleo Plans
- Oracle Releases Communications Network Integ...
- Oracle Releases Communications Data Model 11...
- Oracle Releases PeopleSoft PeopleTools 8.52
- Oracle Integrates Cloudera Apache Distro, My...
- Oracle Releases MySQL 5.5.18
- Oracle Announces NoSQL Database Availability
- Sorting Database Columns With the SELECT Sta...
- Retrieving Table Data with the LIKE Operator

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: