Friday, June 22, 2012


oracle-http-server-ohs-11g-installation



Step by Step instructions to install Oracle HTTP Server (OHS) 11g Installation on Linux is described in this article. Oracle HTTP Server is the Web server in Oracle Fusion Middleware. It provides a HTTP listener for Oracle WebLogic Server and the framework for hosting static pages, dynamic pages, and applications over the Web.  Oracle HTTP Server is based on the proven, open source technology of Apache. Oracle HTTP Server 11 g is based on Apache 2.2 web server, and includes all base Apache modules and modules developed specifically by Oracle. Here is the environment I have installed OHS in:
OSOEL 4 Update8 32bit
Server Nameoam10.freeoraclehelp.com
User & Grouporacle & oinstall
ORACLE_HOME/oracle/middleware/ohs
ORACLE_INSTANCE/oracle/middleware/instances/ohs
PortsAutomatic Port Selection
htdocs$ORACLE_INSTANCE/config/OHS/<component_name>/htdocs

This article is organized into the following sections:

Pre-Install Tasks

[root@oam10 oid]# yum install libaio-devel
Setting up Install Process
Setting up repositories
el4_u8_base               100% |=========================| 1.1 kB    00:00     
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for libaio-devel to pack into transaction set.
libaio-devel-0.3.105-2.i3 100% |=========================| 5.8 kB    00:00     
---> Package libaio-devel.i386 0:0.3.105-2 set to be updated
--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size 
=============================================================================
Installing:
 libaio-devel            i386       0.3.105-2        el4_u8_base       9.9 k

Transaction Summary
=============================================================================
Install      1 Package(s)         
Update       0 Package(s)         
Remove       0 Package(s)         
Total download size: 9.9 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): libaio-devel-0.3.1 100% |=========================| 9.9 kB    00:00     
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libaio-devel                 ######################### [1/1] 
Installed: libaio-devel.i386 0:0.3.105-2
Complete!
[root@oam10 oid]# 

OHS 11g Installation

Oracle HTTP Server(OHS) 11g Installation 001
Oracle HTTP Server(OHS) 11g Installation 002
Oracle HTTP Server(OHS) 11g Installation 003
Oracle HTTP Server(OHS) 11g Installation 004
Oracle HTTP Server(OHS) 11g Installation 005
Oracle HTTP Server(OHS) 11g Installation 006
Oracle HTTP Server(OHS) 11g Installation 007
If you need to customize ports, copy staticports.ini from <OHS11g_Dump>/Disk1/stage/Response/staticports.ini, edit the ports of your interest and uncomment that particular line, and select the file in the above screen. If you’re planning to run multiple OHS instances on the same server, this is the best way to go about. For your convenience, I am listing the file down here. You don’t have to all ports.. Just change only those you want and uncomment.
$cat staticports.ini 
#######################################################################################
#This file is a template file for staticports.ini
#This file must be edited to provide the ports which required to be set
#Those ports which are not provided explicitly in this file will be assigned automatically
#The ports should be specified as a single port
#Keep in mind to uncomment the port no
#######################################################################################

########################Begin section for OPMN Port No################################
######################################################################################

[OPMN]

#This port indicates the OPMN Local Port
#OPMN Local Port = 6700

#This port indicates the OPMN Local Port
#OPMN Remote Port = 6701

########################Begin section for ohs component################################
#This port nos will be considered only if OHS is selected for configuration
#######################################################################################

[OHS]

#The http_main port for ohs component
#OHS Port = 8888

#This port indicates the OHS Proxy Port
#OHS Proxy Port = 8889

#This port indicates the OHS SSL Port
#OHS SSL Port = 4443

########################Begin section for Web Cache component################################
#This port nos will be considered only if Web Cache is selected for configuration
#######################################################################################

[WEBCACHE]

#The port indicates the Web Cache Listen Port
#Web Cache Listen Port = 7777

#The port indicates the Web Cache Admin Port
#Web Cache Admin Port = 7778

#The port indicates the Web Cache Statistics Port
#Web Cache Statistics Port = 7779

#The port indicates the Web Cache Invalidation Port
#Web Cache Invalidation Port = 7780

#The port indicates the Web Cache SSL Port
#Web Cache SSL Port = 7781
$
Oracle HTTP Server(OHS) 11g Installation 008
Oracle HTTP Server(OHS) 11g Installation 010
Oracle HTTP Server(OHS) 11g Installation 011
Oracle HTTP Server(OHS) 11g Installation 012
Oracle HTTP Server(OHS) 11g Installation 013

Post-Install Checks

If you would like to change the port after the installation, edit$ORACLE_INSTANCE/config/OHS/<component_name>/httpd.conf and change the listen port. If the listen port is less than 1024, then you need to set uid for root on .apachectl. In Unix, ports less than 1024 requires root privileges.
If set uid is not set for .apachectl, you would see the following error messages:
/oracle/middleware/ohs/ohs/bin/apachectl startssl: execing httpd
[Wed Nov 30 18:58:17 2011] [warn] Errors will be logged into /oracle/middleware/instances/ohs/diagnostics/logs/OHS/ohs1/ohs1.log
[OHS11g@oam10 ~]$cat /oracle/middleware/instances/ohs/diagnostics/logs/OHS/ohs1/ohs1.log 
[2011-11-30T18:58:15.8385-05:00] [OHS] [INCIDENT_ERROR:32] [OHS-9999] [worker.c] [host_id: oam10.freeoraclehelp.com] [host_addr: 192.168.1.69] [pid: 31982] [tid: 3086771936] [user: oracle] [VirtualHost: main] (13)Permission denied:  make_sock: could not bind to address [::]:80

[2011-11-30T18:58:15.8385-05:00] [OHS] [INCIDENT_ERROR:32] [OHS-9999] [worker.c] [host_id: oam10.freeoraclehelp.com] [host_addr: 192.168.1.69] [pid: 31982] [tid: 3086771936] [user: oracle] [VirtualHost: main] (13)Permission denied:  make_sock: could not bind to address 0.0.0.0:80

[2011-11-30T18:58:15.8386-05:00] [OHS] [INCIDENT_ERROR:20] [OHS-9999] [worker.c] [host_id: oam10.freeoraclehelp.com] [host_addr: 192.168.1.69] [pid: 31982] [tid: 3086771936] [user: oracle] [VirtualHost: main]  no listening sockets available, shutting down

[2011-11-30T18:58:15.8386-05:00] [OHS] [ERROR:32] [OHS-9999] [worker.c] [host_id: oam10.freeoraclehelp.com] [host_addr: 192.168.1.69] [pid: 31982] [tid: 3086771936] [user: oracle] [VirtualHost: main]  Unable to open logs

[OHS11g@oam10 ~]$
So, set the permissions as below:
cd $ORACLE_HOME/Apache/Apache/bin
chown root .apachectl
chmod 6750 .apachectl
[root@oam10 Response]# cd /oracle/middleware/ohs/ohs/bin
[root@oam10 bin]# ls -l .apachectl
-rwxr-x---  1 oracle oinstall 465658 Oct 27  2009 .apachectl
[root@oam10 bin]# chown root .apachectl
[root@oam10 bin]# chmod 6750 .apachectl
[root@oam10 bin]# ls -l .apachectl     
-rwsr-s---  1 root oinstall 465658 Oct 27  2009 .apachectl
[root@oam10 bin]# 

Startup and Shutdown

Start or Stop of Oracle HTTP Server is managed by opmnctl. Make sure that environment is sourced right before calling opmnctl stopall or startall or status.
[oracle@oam10 ~]$ cat ohs.env 
ORACLE_HOME=/oracle/middleware/ohs ; export ORACLE_HOME
ORACLE_INSTANCE=/oracle/middleware/instances/ohs ; export ORACLE_INSTANCE
TNS_ADMIN=$ORACLE_HOME/network/admin ; export TNS_ADMIN
PATH=$ORACLE_HOME/bin:$ORACLE_INSTANCE/bin:$PATH:. ; export PATH
export PS1="[OHS11g@\h \W]\$"
alias p='sqlplus "/ as sysdba" '
[oracle@oam10 ~]$ . ./ohs.env 
[OHS11g@oam10 ~]$opmnctl stopall
opmnctl stopall: stopping opmn and all managed processes...
[OHS11g@oam10 ~]$opmnctl startall
opmnctl startall: starting opmn and all managed processes...
[OHS11g@oam10 ~]$opmnctl status

Processes in Instance: ohs_instance
---------------------------------+--------------------+---------+---------
ias-component                    | process-type       |     pid | status  
---------------------------------+--------------------+---------+---------
ohs1                             | OHS                |   32763 | Alive   

[OHS11g@oam10 ~]$

Oracle Free Presentation on OHS 11gR1

Do you want to read more? Here is a free presentation from Oracle Corporation. Original Link ishttp://www.oracle.com/technetwork/middleware/ias/ohs11gr1-131852.pdfOracle Presentation on OHS 11gR1 000
Oracle Presentation on OHS 11gR1 002
Oracle Presentation on OHS 11gR1 003
Oracle Presentation on OHS 11gR1 004
Oracle Presentation on OHS 11gR1 005
Oracle Presentation on OHS 11gR1 006
Oracle Presentation on OHS 11gR1 007
Oracle Presentation on OHS 11gR1 008
Oracle Presentation on OHS 11gR1 009
Oracle Presentation on OHS 11gR1 010
Oracle Presentation on OHS 11gR1 011
Oracle Presentation on OHS 11gR1 012
Oracle Presentation on OHS 11gR1 013
Oracle Presentation on OHS 11gR1 014
Oracle Presentation on OHS 11gR1 015
Oracle Presentation on OHS 11gR1 016
Oracle Presentation on OHS 11gR1 017
Oracle Presentation on OHS 11gR1 018
Oracle Presentation on OHS 11gR1 019
Oracle Presentation on OHS 11gR1 020
Oracle Presentation on OHS 11gR1 021
Oracle Presentation on OHS 11gR1 022
Oracle Presentation on OHS 11gR1 023
Oracle Presentation on OHS 11gR1 024
Oracle Presentation on OHS 11gR1 025
Oracle Presentation on OHS 11gR1 026
Oracle Presentation on OHS 11gR1 027
Oracle Presentation on OHS 11gR1 028
Oracle Presentation on OHS 11gR1 029
Oracle Presentation on OHS 11gR1 030
Oracle Presentation on OHS 11gR1 031
Oracle Presentation on OHS 11gR1 032
Oracle Presentation on OHS 11gR1 033
Oracle Presentation on OHS 11gR1 034
Oracle Presentation on OHS 11gR1 035
Oracle Presentation on OHS 11gR1 036
Oracle Presentation on OHS 11gR1 037
Oracle Presentation on OHS 11gR1 038
Oracle Presentation on OHS 11gR1 039
Oracle Presentation on OHS 11gR1 040
Oracle Presentation on OHS 11gR1 041
Oracle Presentation on OHS 11gR1 042
Oracle Presentation on OHS 11gR1 043
Oracle Presentation on OHS 11gR1 044
Oracle Presentation on OHS 11gR1 045
Oracle Presentation on OHS 11gR1 046
Oracle Presentation on OHS 11gR1 047
Oracle Presentation on OHS 11gR1 048
Oracle Presentation on OHS 11gR1 049
Oracle Presentation on OHS 11gR1 050
Oracle Presentation on OHS 11gR1 051
Oracle Presentation on OHS 11gR1 052
Oracle Presentation on OHS 11gR1 053
Oracle Presentation on OHS 11gR1 054
Oracle Presentation on OHS 11gR1 055
Oracle Presentation on OHS 11gR1 056
Oracle Presentation on OHS 11gR1 057
Oracle Presentation on OHS 11gR1 058
Oracle Presentation on OHS 11gR1 001

No comments:

Post a Comment