Oracle9i Application Server Administrator's Guide Release 2 (9.0.2) Part Number A92171-02 |
|
This chapter provides an introduction to configuring these key components: Oracle HTTP Server, OC4J, and Oracle9iAS Web Cache.
It contains the following topics:
This chapter provides an introduction to configuring components using the Oracle Enterprise Manager Web site. It discusses common configuration tasks associated with three key components: Oracle HTTP Server, Oracle9iAS Containers for J2EE, and Oracle9iAS Web Cache.
If you edit Oracle HTTP Server or OC4J configuration files manually, instead of using the Enterprise Manager Web site, you must use the DCM command-line utility dcmctl
to notify the DCM repository of the changes. Otherwise, your changes will not go into effect and will not be reflected in the Enterprise Manager Web site. Table 6-1 lists the dcmctl
commands. Note that the dcmctl
tool is located in:
(UNIX) ORACLE_HOME/dcm/bin/dcmctl (Windows) ORACLE_HOME\dcm/bin\dcmctl
Before you change configuration parameters, manually or using the Enterprise Manager Web site, you can save the current state of your configuration files and installed J2EE applications with the following command:
dcmctl saveInstance -dir directory_name
You can then restore the state and back out of any subsequent changes that were made using the following command:
dcmctl restoreInstance [ -dir directory_name ]
See Also:
Appendix F, "DCM Command-Line Utility (dcmctl)" for more information |
You can configure Oracle HTTP Server using the Oracle HTTP Server Home Page on the Oracle Enterprise Manager Web site. You can perform tasks such as modifying directives, changing log properties, specifying a port for a listener, managing client requests, and editing server configuration files.
You can access the Oracle HTTP Server Home Page in the Name column of the System Components table on the Instance Home Page. Figure 6-1 displays the Oracle HTTP Server Home Page.
This section describes the following tasks:
See Also:
If you are unfamiliar with the Oracle HTTP Server configuration settings, see the Oracle HTTP Server Administration Guide before making any changes. |
After you start Oracle HTTP Server, the system is ready to listen for and respond to requests. You may need to make modifications to the document root, administrator e-mail, user, and group settings in order to process requests efficiently.
To modify these settings:
Enterprise Manager displays a confirmation page, which confirms that the appropriate configuration files have been updated.
When you start Oracle HTTP Server, it connects to a port and awaits client requests. Oracle HTTP Server will automatically attempt to listen on port 7777.
To specify a listener port:
The first row in the Listening Addresses/Ports table identifies the default listener port. To edit the default listener port, edit the number in the Listening Port column.
To add port settings, click Add Another Row to add a new row to the table. Enter the IP address and/or port number to the new row.
Enterprise Manager displays a confirmation page, which confirms that the appropriate configuration files have been updated.
You can change Error Log properties from the Oracle HTTP Server Home Page on the Oracle Enterprise Manager Web site. The Error Log file is an important source of information for maintaining a well-performing server. The Error Log records all of the information about problem situations so that you can easily diagnose and fix the problems. The following directives allow you to customize how your error log is set up.
To customize the error log properties:
Enterprise Manager displays a confirmation page, which confirms that the appropriate configuration files have been updated.
You can change Access Log properties from the Oracle HTTP Server Home Page on the Oracle Enterprise Manager Web site. The Access Log contains basic information about every HTTP transaction that the server handles. Specifically, the access log file contains: hostname, remote logname, remote user, time, request, response code, and bytes transferred. This information can be used to generate statistical reports about the server's usage patterns.
Note: Access Log files are not automatically generated. You must first tell the server where and how to store access log information. |
To create an access log file:
(UNIX) /private2/ias/Apache/Apache/logs/access_log
(Windows) C:\ias_home\Apache\Apache\logs\access_log
You can also type the relative path and filename. A relative path is assumed to be relative to the Server Root directory:
(UNIX) logs/access_log
(Windows) logs\access_log
common
. For information on creating custom log formats, go to "Adding an Access Log File" from the online help for the Server Properties Page.
For a full description of the available log formats, click Help at the top of the Server Properties page.
Note:
Enterprise Manager displays a confirmation page, which confirms that the appropriate configuration files have been updated.
To change access log properties:
Enterprise Manager displays a confirmation page, which confirms that the appropriate configuration files have been updated.
You can specify how the Child Processes and Connections should initialize resources during the server's processing phase through the Oracle HTTP Server Home Page on the Oracle Enterprise Manager Web site. The Child Process and Connection settings impact the ability of the server to process requests. You may need to modify these settings as the number of requests increases or decreases to maintain a well-performing server.
Note: For more information on setting the client request and connection handling parameters, see the Oracle HTTP Server Administration Guide. |
To modify child process and connection settings:
For help on individual settings, click Help at the top of the Server Properties page.
Enterprise Manager displays a confirmation page, which confirms that the appropriate configuration files have been updated.
You can access the HTTP server configuration files directly through the Oracle HTTP Server Advanced Properties Page on the Oracle Enterprise Manager Web site. Use these files to customize the features of your server.
See Also:
For more information on using the HTTP server configuration files to customize your server settings, see the Oracle HTTP Server Administration Guide. |
To edit a configuration file:
Enterprise Manager displays a confirmation page, which confirms that the appropriate configuration files have been updated.
Oracle HTTP Server contains the mod_plsql
module, which provide support for building PL/SQL-based applications on the Web. PL/SQL stored procedures retrieve data from a database and generate HTTP responses containing data and code to display in a Web browser.
In order to use mod_plsql
you must install the PL/SQL Web Toolkit into a database and create a Database Access Descriptor (DAD) which provides mod_plsql with connection information for the database.
See Also:
"mod_plsql" for more information on installing the PL/SQL Web Toolkit into a database |
You can create a DAD using the Enterprise Manager Web site:
mod_plsql
with Oracle9iAS Portal or Oracle Login Server, select the Portal radio button. Otherwise, select the General radio button. The subsequent screens will be populated with default values based on your selection. Click Next. This opens the Database Connection Page.
For more details on mod_plsql configuration parameters, refer to "mod_plsql" in Chapter 6 of Oracle HTTP Server Administration Guide
See Also:
You can delete a DAD using the Enterprise Manager Web site:
It is recommended that you use the Oracle9iAS Containers for J2EE (OC4J) for your servlet environment; it is the default configuration for Oracle9iAS Release 2 (9.0.2). However, you may want or need to use JServ in your Oracle9iAS Release 2 installation. These instructions are provided to explain how to enable JServ, and, if necessary, use it for some applications and OC4J for others. The instructions assume a working familiarity with the Oracle HTTP Server and JServ configuration.
This section has the following topics:
This section describes directives used to enable JServ with mod_oprocmgr
.
This section explains how to enable the Oracle default mode for JServ. Use this mode if you want process management and load balancing capabilities for multiple JVMs. The ApJServManual
directive has a new mode, `auto', that enables using JServ with the Oracle module mod_oprocmgr
. The following file contains LoadModule directives for mod_jserv
and mod_oprocmgr
:
(UNIX)ORACLE_HOME
/Apache/Jserv/etc/jserv.conf
(Windows) ORACLE_HOME\Apache\Jserv\conf\jserv.conf
This section explains how to enable JServ in automatic mode. Use this mode if you need only one JVM. In this mode, the ApJServManual directive is set to `off' and the mod_jserv module launches and monitors the JVM. If the Oracle HTTP Server is restarted or stopped, mod_jserv restarts or stops the JVM.
This section explains how to enable JServ in manual mode. Use this mode if you need to run multiple JVMs. In this mode, the ApJServManual directive is set to `on' and you have to stop and start the JVM manually. To monitor the JVM, you must use an external monitoring facility.
This section explains how to use mod_rewrite to enable some applications to execute on JServ, and others on OC4J.
This section describes some JServ configuration directives that are related to using JServ with mod_oprocmgr. All directives are described thoroughly in the configuration files.
This section describes directives in jserv.properties
.
Use this directive to specify the ports to which JServ will bind. For example:
port=8007
If no ports are specified, the JServ processes will choose their ports. The following port directive enables the JServ processes to choose their own ports (the default behavior):
port=
If you eliminate the port directive entirely, an error will occur.
You can specify multiple ports, and separate the values with commas. Note that a range of ports (9000-9010) is a valid value.
port=8007,9000-9010,8010
This section describes directives in jserv.conf
.
This directive accepts a new mode, auto, which invokes the new infrastructure functionality (in which mod_oprocmgr
manages processes). The syntax is:
ApJServManual auto
You can set the mode to on or off to use standard JServ functionality.
This directive defines groups for the process manager to manage for mod_jserv
. If you have worked with mod_jserv
, you will note that this directive replaces the ApJServBalance
, ApJServHost
, ApJServRoute
and ApJServShmFile
directives.
All JServ processes to be managed must belong to a group, and each group has its own ApJServGroup
directive. If you only have one JServ process, you must define a group with just that process in it. The processes in a group are identical except for their listening ports, so requests directed to the group are distributed evenly among the processes.
The ApJServGroup
directive takes four arguments: groupname, number of processes, node weight, and properties file. In the following example, the groupname is mygroup
, the number of processes is 1
, the node weight is 1
, and the full path of the properties file used to start the JServ processes is:
(UNIX) /private/ias/Apache/Jserv/etc/jserv.properties (Windows) C:\iashome\Apache\Jserv\conf\jserv.properties (UNIX) ApJServGroup mygroup 1 1 /private/ias/Apache/Jserv/etc/jserv.properties (Windows) ApJServGroup mygroup 1 1 C:\iashome\Apache\Jserv\conf\jserv.properties
This directive defines a mount point and maps it to a process group and zone. In the following example, the mount point is /servlets, the group is mygroup, and the zone is root. Note that the balance protocol is in use for routing, as in the standard JServ configuration.
(UNIX) ApJServGroupMount /servlets balance://mygroup/root (Windows) ApJServGroupMount /servlets balance://mygroup/root
Place this directive after the ApJServGroup
directive in the configuration file.
This directive specifies the secret key that JServ needs to authenticate clients. It can be disabled, as follows:
ApJServGroupSecretKey disabled
When activated, the directive takes one or two arguments. In the following example, with group and filename arguments, the filename mysecretkey
applies to the group mygroup
:
(UNIX) ApJServGroupSecretKey mygroup /usr/local/apache/jserv/mysecretkey (Windows) ApJServGroupSecretKey mygroup C:\ias\apache\jserv\mysecretkey
You can supply only the filename argument. No group is named, so the secret key filename applies to all groups.
(UNIX) ApJServGroupSecretKey /usr/local/apache/jserv/mysecretkey (Windows) ApJServGroupSecretKey C:\ias\apache\jserv\mysecretkey
You cannot combine directives using the one-argument syntax with directives using the two-argument syntax. If you use the two-argument syntax, the default for groups without a group-specific secret key is 'disabled'.
Place this directive after the ApJServGroup
directive in the configuration file.
This section explains how to implement process management and load balancing services for JServ processes with mod_oprocmgr
. Terms used in this section to describe the module and its functions are defined inTable 6-2:
mod_oprocmgr
provides infrastructure capabilities, such as automatic starting of processes, death detection and restart, and load balancing. These capabilities are enabled by a new mode, auto, for the ApJServManual
directive.
Based on the configuration information provided by mod_jserv
, mod_oprocmgr
starts the specified number of JServ processes, managing them for the life of the servers.
Follow these steps to enable JServ with mod_oprocmgr
:
jserv.conf
file in
(UNIX)ORACLE_HOME
/Apache/Apache/conf/httpd.conf
(Windows)ORACLE_HOME
\Apache\Apache\conf\httpd.conf
by removing the initial '#' character in the line:
(UNIX) include "/ORACLE_HOME/Apache/Jserv/etc/jserv.conf" (Windows) include "C:\ORACLE_HOME\Apache\Jserv\conf\jserv.conf"
(UNIX)ORACLE_HOME
/Apache/Jserv/etc/jserv.conf
(Windows)ORACLE_HOME
\Apache\Jserv\conf\jserv.conf
(UNIX) ORACLE_HOME
/Apache/Jserv/etc/jserv.properties
(Windows) ORACLE_HOME
\Apache\Jserv\conf\jserv.properties
(UNIX)ORACLE_HOME
/Apache/Jserv/etc/zone.properties
(Windows)ORACLE_HOME
\Apache\Jserv\conf\zone.properties
Follow these steps to enable JServ in automatic mode:
jserv.conf
file in
(UNIX)ORACLE_HOME
/Apache/Apache/conf/httpd.conf
(Windows)ORACLE_HOME
\Apache\Apache\conf\httpd.conf
by removing the initial '#' character in the line:
(UNIX) include "/ORACLE_HOME/Apache/Jserv/etc/jserv.conf" (Windows) include "C:\ORACLE_HOME\Apache\Jserv\conf\jserv.conf"
ApJServManual off
in following file:
(UNIX)ORACLE_HOME
/Apache/Jserv/etc/jserv.conf
(Windows)ORACLE_HOME
\Apache\Jserv\conf\jserv.conf
jserv.conf
.
(UNIX)ORACLE_HOME
/Apache/Jserv/etc/jserv.properties
(Windows)ORACLE_HOME
\Apache\Jserv\conf\jserv.properties
to the same value as that specified in the ApJServDefaultPort directive.
(UNIX)ORACLE_HOME
/Apache/Jserv/etc/zone.properties
(Windows)ORACLE_HOME
\Apache\Jserv\conf\zone.properties
Follow these steps to enable JServ in manual mode:
jserv.conf
file in
(UNIX)ORACLE_HOME
/Apache/Apache/conf/httpd.conf
(Windows)ORACLE_HOME
\Apache\Apache\conf\httpd.conf
by removing the initial '#' character in the line:
(UNIX) include "/ORACLE_HOME/Apache/Jserv/etc/jserv.conf" (Windows) include "C:\ORACLE_HOME\Apache\Jserv\conf\jserv.conf"
on
:
ApJServManual on
in following file:
(UNIX)ORACLE_HOME
/Apache/Jserv/etc/jserv.conf
(Windows)ORACLE_HOME
\Apache\Jserv\conf\jserv.conf
jserv.conf
.
(UNIX)ORACLE_HOME
/Apache/Jserv/etc/jserv.properties
(Windows)ORACLE_HOME
\Apache\Jserv\conf\jserv.properties
(UNIX)ORACLE_HOME
/Apache/Jserv/etc/zone.properties
(Windows)ORACLE_HOME
\Apache\Jserv\conf\zone.properties
(UNIX)ORACLE_HOME
/Apache/Apache/bin/startJServ.sh
(Windows)ORACLE_HOME
\Apache\Apache\bin\startJsv.bat
Perform the following configuration steps to enable JServ and Oracle9iAS Containers for J2EE (OC4J) to coexist. This is important if you have the Portal and Wireless installation type, because of the Portal dependency on OC4J.
You must rewrite the URL for application1.
(UNIX)ORACLE_HOME
/Apache/Apache/conf/httpd.conf
(Windows)ORACLE_HOME
\Apache\Apache\conf\httpd.conf
and ensure that the following directives are active (uncommented) and present:
LoadModule rewrite_module libexec/mod_rewrite.so AddModule mod_rewrite.c RewriteEngine on
(UNIX)ORACLE_HOME
/Apache/jsp/conf/ojsp.conf
(Windows)ORACLE_HOME
\Apache\jsp\conf\ojsp.conf
to add these directives:
RewriteRule /application1/(.*)/(.*)\.jsp$ /application1/$1/$2.jsp1 ApJServAction .jsp1 /servlets/oracle.jsp.JspServlet
ApJServAction .jsp /servlets/oracle.jsp.JspServlet
(UNIX)ORACLE_HOME
/Apache/Jserv/etc/jserv.conf
(Windows)ORACLE_HOME
\Apache\Jserv\conf\jserv.conf
and mount /servlets
to the JVM that will service the JSP requests. Use the ApJServMount
or ApJServGroupMount
directive (depending on how the JServ processes are started).
You can configure Oracle9iAS Containers for J2EE (OC4J) using the Enterprise Manager Web site. You can use the Instance Home Page to create and delete OC4J instances, each of which has its own OC4J Home Page. You can use each individual OC4J Home Page to configure the corresponding OC4J instance and its deployed applications.
This section provides instructions for creating and deleting OC4J instances and an overview of the configuration tasks you can perform on OC4J instances and applications.
See Also:
Oracle9iAS Containers for J2EE User's Guide for more detailed instructions on configuring OC4J instances and applications |
Every application server instance has a default OC4J instance named OC4J_home
. You can create additional instances, each with a unique name, within an application server instance.
To create a new OC4J instance:
A new OC4J instance is created with the name you provided. This OC4J instance shows up on the Instance Home Page in the System Components section. The instance is initially in a stopped state and can be started any time after creation.
To delete an OC4J instance:
You can use the Enterprise Manager Web site to do the following types of configuration:
Each OC4J instance has its own OC4J Home Page which allows you to configure global services and deploy applications to that instance.
Some examples of the tasks you can perform from the OC4J Home Page are:
Once you have deployed an application, it has its own Application Home Page, which is accessible from the OC4J Home Page. Using the Application Home Page, you can modify most of the application parameters. Some examples of the tasks you can perform from the Application Home Page are:
Oracle9iAS Containers for J2EE User's Guide contains complete instructions for configuring OC4J instances and applications using the Enterprise Manager Web site
See Also:
Oracle9iAS Web Cache is an example of a component that has integrated a pre-Oracle9iAS Release 2 configuration tool into the Enterprise Manager Web site. This simplifies administration by providing access to the management features of the Oracle9iAS Web Cache Manager and the management features of the Enterprise Manager Web site from a single Home Page.
To access Oracle9iAS Web Cache Manager:
For information on using Oracle9iAS Web Cache Manager, refer to Oracle9iAS Web Cache Administration and Deployment Guide.
See Also:
|
Copyright © 2002 Oracle Corporation. All Rights Reserved. |
|