Oracle Web Tier介绍:
The web tier is:
–
• Responsible for interacting with the end user(与终端用户交互)
• Primarily in the forms of HTTP requests and responses(主要以http请求和响应的方式)
• The outermost tier in the application server(是application server的最外层)
Oracle Web Tier包含的组件:Oracle Web Tier comprises of two components:
Oracle HTTP Server
• Apache based web server that provides a HTTP listener for Oracle WebLogic Server and the framework for hosting static pages, dynamic pages, and applications over the web.
Oracle Web Cache
• A content-aware(内容感知) server accelerator(加速装置), secure reverse proxy server(安全的反向代理服务器) that improves the performance, scalability, and availability of web sites.
–
Oracle HTTP Server介绍:
Oracle HTTP Server is the Web server component for Oracle Fusion Middleware. It provides a listener for Oracle WebLogic Server and the framework for hosting static pages, dynamic pages, and applications over the Web.
Oracle Http Server是ORACLE Fusion Middleware的web服务器,它为ORACLE weblogic 服务器提供了监听器的功能,同时,它还提供了管理保存静态、动态页面,基于web的应用程序 的框架。
Oracle HTTP Server 11g, Release 1 (11.1.1.6.0) is based on Apache HTTP Server 2.2.21 (with critical bug fixes from higher versions) infrastructure, and includes modules developed specifically by Oracle. The features of single sign-on, clustered deployment, and high availability enhance the operation of the Oracle HTTP Server(单点登录、集群部署,高可用性加强). Oracle HTTP Server has the following components to handle client requests:
HTTP listener, to handle incoming requests and route them to the appropriate processing utility.
Modules (mods), to implement and extend the basic functionality of Oracle HTTP Server. Many of the standard Apache HTTP Server modules are included with Oracle HTTP Server. Oracle also includes several modules that are specific to Oracle Fusion Middleware to support integration between Oracle HTTP Server and other Oracle Fusion Middleware components.(我们举几个非常常用的mods来讲解,参考文档:http://blog.csdn.net/cymm_liu/article/details/7067799)
Perl interpreter(perl编译器), a persistent Perl runtime environment embedded in Oracle HTTP Server through mod_perl.
Comes integrated with WLS Plug-in for routing to WLS(自带的集成了WLS的插件,可以把请求路由到WLS)
Oracle HTTP Server enables developers to program their site in a variety of languages and technologies, such as the following:
Perl (through mod_perl and CGI)
C (through CGI and FastCGI)
C++ (through FastCGI)
PHP (through mod_php)
Oracle PL/SQL
Oracle HTTP Server can also be a proxy server(代理服务器), both forward and reverse. A reverse proxy(反向代理) enables content served by different servers to appear as if coming from one server.
Figure 1-1shows an Oracle home with an Oracle instance and an Oracle WebLogic Server domain. Throughout this book, examples will use the components in this figure. The farm (farm1) consists of an Oracle instance and a WebLogic Server domain. The Oracle instance includes Oracle HTTP Server (ohs1) and Oracle Web Cache (wc1), and the WebLogic Server domain includes two Managed Servers.
与以往版本相比,oracle HTTP server和oracle web cache都采用了oracle home 和oracle instance分离的机构,oracle home主要存放二进制等只读文件,instance存放可以改写的配置文件,日志文件等等。
Oracle Home (read only files)
• Binaries and other files created at install time and never changes
• Location represented by ORACLE_HOME env. variable
–
Oracle Instance (updateable files)
• A collection of system components managed by OPMN
• Contains configuration files, log files, static contents, temp files
• Location represented by ORACLE_INSTANCE env. variable
在oracle EBS R12.2中,oracle http server的oracle home 目录结构如下:
目录:$IAS_ORACLE_HOME/ohs/
oracle instance 目录如下:
目录:$IAS_ORACLE_HOME/instances
Web Tier Oracle Instance:A web tier Oracle Instance contains
One OPMN
0 or more system components (such as OHS and Web Cache)
OPMN manages all system components of an Oracle Instance
Oracle Http Server在os中的进程:
在ebs R12.2中,我们可以看到,opmn进程对oracle http server进行管理的脉络:
[apptest@vs022 scripts]$ adopmnctl.sh status
You are running adopmnctl.sh version 120.0.12020000.2
Checking status of OPMN managed processes...
Processes in Instance: EBS_web_VIS_OHS1
---------------------------------+--------------------+---------+---------
ias-component | process-type | pid | status
---------------------------------+--------------------+---------+---------
EBS_web_VIS | OHS | 19184 | Alive ——根据oracle http server的pid我们追根溯源。
adopmnctl.sh: exiting with status 0
adopmnctl.sh: check the logfile /u01/test/apps/fs2/inst/apps/VIS_vs022/logs/appl/admin/log/adopmnctl.txt for more information ...
[apptest@vs022 scripts]$ ps -fu apptest|grep 19184
apptest 19184 19101 0 May01 ? 00:00:01 /u01/test/apps/fs2/FMW_Home/webtier/ohs/bin/httpd.worker -DSSL ——19184是由19101进程产生的。
apptest 19408 19184 0 May01 ? 00:00:00 /u01/test/apps/fs2/FMW_Home/webtier/ohs/bin/odl_rotatelogs -l /u01/test/apps/fs2/FMW_Home/webtier/instances/EBS_web_VIS_OHS1/diagnostics/logs/OHS/EBS_web_VIS/EBS_web_VIS-%Y%m%d%H%M%S.log 10M 70M
apptest 19409 19184 0 May01 ? 00:00:00 /u01/test/apps/fs2/FMW_Home/webtier/ohs/bin/odl_rotatelogs /u01/test/apps/fs2/FMW_Home/webtier/instances/EBS_web_VIS_OHS1/diagnostics/logs/OHS/EBS_web_VIS/access_log 43200
apptest 19410 19184 0 May01 ? 00:00:00 /u01/test/apps/fs2/FMW_Home/webtier/ohs/bin/rotatelogs /u01/test/apps/fs2/FMW_Home/webtier/instances/EBS_web_VIS_OHS1/diagnostics/logs/OHS/EBS_web_VIS/access_log 86400
apptest 19411 19184 0 May01 ? 00:00:00 /u01/test/apps/fs2/FMW_Home/webtier/ohs/bin/rotatelogs /u01/test/apps/fs2/FMW_Home/webtier/instances/EBS_web_VIS_OHS1/diagnostics/logs/OHS/EBS_web_VIS/ssl_request_log 86400
apptest 19412 19184 0 May01 ? 00:00:00 /u01/test/apps/fs2/FMW_Home/webtier/ohs/bin/odl_rotatelogs -l -h:/u01/test/apps/fs2/FMW_Home/webtier/instances/EBS_web_VIS_OHS1/config/OHS/EBS_web_VIS/component_events.xml_EBS_web_VIS /u01/test/apps/fs2/FMW_Home/webtier/instances/EBS_web_VIS_OHS1/auditlogs/OHS/EBS_web_VIS/audit-pid19184-%Y%m%d%H%M%S.log 1M 4M
apptest 19413 19184 0 May01 ? 00:00:00 /u01/test/apps/fs2/FMW_Home/webtier/ohs/bin/httpd.worker -DSSL
apptest 19414 19184 0 May01 ? 00:00:06 /u01/test/apps/fs2/FMW_Home/webtier/ohs/bin/httpd.worker -DSSL
apptest 19417 19184 0 May01 ? 00:00:04 /u01/test/apps/fs2/FMW_Home/webtier/ohs/bin/httpd.worker -DSSL
apptest 25613 20761 0 22:01 pts/0 00:00:00 grep 19184
然后可以看到19184进程有产生了上述很多的进程,包括日志的记录,worker进程等等。
接下来,继续追根,找到19101进程:
[apptest@vs022 scripts]$ ps -fu apptest|grep opmn
apptest 19100 1 0 May01 ? 00:00:00 /u01/test/apps/fs2/FMW_Home/webtier/opmn/bin/opmn -d
apptest 19101 19100 0 May01 ? 00:01:49 /u01/test/apps/fs2/FMW_Home/webtier/opmn/bin/opmn -d ——可以看到19101是有19100进程产生,推断这个19100进程应该是个总管理进程,然后19101是他的slave进程。如果有两个OHS的实例,应该会有差不多19102成为另一个slave进程。
目前我只是猜测。。
apptest 20347 20274 1 May01 ? 00:59:23 /u01/test/apps/fs2/FMW_Home/jrockit32/jre/bin/java -classpath /u01/test/apps/fs2/FMW_Home/webtier/opmn/lib/wlfullclient.jar:/u01/test/apps/fs2/FMW_Home/Oracle_EBS-app1/shared-libs/ebs-appsborg/WEB-INF/lib/ebsAppsborgManifest.jar:/u01/test/apps/fs2/EBSapps/comn/java/classes -mx256m oracle.apps.ad.tools.configuration.RegisterWLSListeners -appsuser APPS -appshost vs022 -appsjdbcconnectdesc jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(LOAD_BALANCE=YES)(FAILOVER=YES)(ADDRESS=(PROTOCOL=tcp)(HOST=vs022.hand-china.com)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=VIS))) -adtop /u01/test/apps/fs2/EBSapps/appl/ad/12.0.0 -wlshost vs022 -wlsuser weblogic -wlsport 7002 -dbsid VIS -dbhost vs022 -dbdomain hand-china.com -dbport 1521 -outdir /u01/test/apps/fs2/inst/apps/VIS_vs022/appltmp/Thu_May_1_09_57_18_2014 -log /u01/test/apps/fs2/inst/apps/VIS_vs022/logs/appl/rgf/Thu_May_1_09_57_18_2014/adRegisterWLSListeners.log -promptmsg hide -contextfile /u01/test/apps/fs2/inst/apps/VIS_vs022/appl/admin/VIS_vs022.xml
apptest 25485 20761 0 21:57 pts/0 00:00:00 grep opmn