Oracle HTTP Server 12c 12.2.1.3 in collocated mode

Installing OHS 12c in collocated mode requires installing Oracle fusion middleware infrastructure followed by OHS 12c installation and configuration.

Check below post section “Install Infrastructure 12c” for installing Oracle fusion middleware
https://oraidam.wordpress.com/2018/03/08/oracle-internet-directory-12c-12-2-1-3-in-collocated-mode/

then follow below steps for installing and configuring OHS 12c.

Install OHS 12c

[oracle@oel1 OHS12c]$ unzip fmw_12.2.1.3.0_ohs_linux64_Disk1_1of1.zip
[oracle@oel1 OHS12c]$ ./fmw_12.2.1.3.0_ohs_linux64.bin

image
image
image
image
image
image

Configure HTTP Server

[oracle@oel1 OHS12c]$ cd /u01/oracle/product/Oracle_Home/oracle_common/common/bin/
[oracle@oel1 bin]$ ./config.sh

I am going to update existing domain which I created for OID in below post.
https://oraidam.wordpress.com/2018/03/08/oracle-internet-directory-12c-12-2-1-3-in-collocated-mode/

However, if you don’t have one you can create new domain. (Note: You need to create schemas if you are creating a new domain)

image
Select Oracle HTTP Server (Collocated)
image
image
image
image
Add new components ohs1 and specify component type as OHS
XWin_MobaX_2018-03-06_14-25-02XWin_MobaX_2018-03-06_14-26-37
XWin_MobaX_2018-03-06_14-27-09XWin_MobaX_2018-03-06_14-27-38XWin_MobaX_2018-03-06_14-28-30
image
image

Start Servers

Start Node manager

[oracle@oel1 bin]$ cd /u01/oracle/config/Domain_Home/ODS_Domain/bin
[oracle@oel1 bin]$ nohup ./startNodeManager.sh &

image

Start Admin server

[oracle@oel1 bin]$ cd /u01/oracle/config/Domain_Home/ODS_Domain/bin
[oracle@oel1 bin]$ nohup ./startWebLogic.sh &

image

Start OHS

[oracle@oel1 bin]$ cd /u01/oracle/config/Domain_Home/ODS_Domain/bin[oracle@oel1 bin]$ ./startComponent.sh ohs1

image

Verify
http://oel1.mylab.com:7777/
image

Advertisements

Oracle Access Manager 12c 12.2.1.3 in collocated mode

To install OAM in collocated mode, we must first install Oracle Fusion Middleware Infrastructure 12c followed by Oracle Access Manager 12c. Infrastructure and and OAM must be installed in same Oracle Home.

Directory Structure

[oracle@oel1 /]$ cd /u02/
[oracle@oel1 u02]$ mkdir -p oracle/product/Oracle_Home
[oracle@oel1 u02]$ mkdir -p oracle/config/Domain_Home
[oracle@oel1 u02]$ mkdir -p oracle/config/Application_Home

[oracle@oel1 u02]$ tree oracle/
oracle/
├── config
│   ├── Application_Home
│   └── Domain_Home
└── product
     └── Oracle_Home

Install Infrastructure 12c

[oracle@oel1 OAM12c]$ unzip fmw_12.2.1.3.0_infrastructure_Disk1_1of1.zip
[oracle@oel1 OAM12c]$ java -jar fmw_12.2.1.3.0_infrastructure.jar

Navigate through installation screens clicking Next, select or browse to correct Oracle Home on Installation Location screen.
image
image_thumb6

Install Oracle Access Manager 12c

[oracle@oel1 OAM12c]$ unzip fmw_12.2.1.3.0_idm_Disk1_1of1.zip
[oracle@oel1 OAM12c]$ java -jar fmw_12.2.1.3.0_idm.jar

Navigate through installation screens clicking Next, select or browse to correct Oracle Home on Installation Location screen.
image
image
image
image

Create Schemas

[oracle@oel1 Oracle_Home]$ cd /u02/oracle/product/Oracle_Home/oracle_common/bin/
[oracle@oel1 bin]$ ./rcu

image
image
select the Oracle Access Manager schema.
This action automatically selects the following schemas as dependencies:
• Common Infrastructure Services (STB)
• Oracle Platform Security Services (OPSS)
• Audit Services (IAU)
• Audit Services Append (IAU_Append)
• Audit Services Viewer (IAU_Viewer)
• Metadata Services (MDS)
• WebLogic Services (WLS)
image
image
image
image

Configure OAM Domain

[oracle@oel1 bin]$ cd /u02/oracle/product/Oracle_Home/oracle_common/common/bin
[oracle@oel1 bin]$ ./config.sh

image
select the template Oracle Access Management Suite. Selecting this template automatically selects the following as dependencies:
• Oracle Enterprise Manager
• Oracle JRF
• WebLogic Coherence Cluster Extension
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image
image

Start Servers

[oracle@oel1 bin]$ cd /u02/oracle/config/Domain_Home/OAM_Domain/bin
[oracle@oel1 bin]$ nohup ./startWebLogic.sh &

image

[oracle@oel1 bin]$ cd /u02/oracle/config/Domain_Home/OAM_Domain/bin
[oracle@oel1 bin]$ nohup ./startNodeManager.sh &

image

Login to weblogic console
http://oel1.mylab.com:7011/console
Go to Servers –> Control
Select the server and click Start
image
image

OAM Console: http://oel1.mylab.com:7011/oamconsole
image
image

OHS Add X-Content-Type-Options Header

Missing X-Content-Type-Options header increases exposure to drive-by download attacks.

This post covers adding X-Content-Type-Options header to OHS.

Edit $INSTANCE_HOME/INSTANCE_NAME/config/OHS/INSTANCE_NAME/httpd.conf

Ensure mod_headers.so is enabled

LoadModule headers_module “${ORACLE_HOME}/ohs/modules/mod_headers.so”

Add below line

Header set X-Content-Type-Options nosniff

Restart OHS

Verify
1

Oracle Internet Directory 12c 12.2.1.3 in collocated mode

To install OID in collocated mode, we must first install Oracle Fusion Middleware Infrastructure 12c followed by Oracle Internet Directory 12c. Infrastructure and and OID must be installed in same Oracle Home.

Directory Structure

[oracle@oel1 /]$ cd /u01/
[oracle@oel1 u01]$ mkdir -p oracle/product/Oracle_Home
[oracle@oel1 u01]$ mkdir -p oracle/config/Domain_Home
[oracle@oel1 u01]$ mkdir -p oracle/config/Application_Home

[oracle@oel1 u01]$ tree oracle/
oracle/
├── config
│   ├── Application_Home
│   └── Domain_Home
└── product
     └── Oracle_Home

Install Infrastructure 12c

[oracle@oel1 OAM12c]$ unzip fmw_12.2.1.3.0_infrastructure_Disk1_1of1.zip
[oracle@oel1 OAM12c]$ java -jar fmw_12.2.1.3.0_infrastructure.jar

Navigate through installation screens clicking Next, select or browse to correct Oracle Home on Installation Location screen.
image
image

Install Oracle Internet Directory 12c

[oracle@oel1 OAM12c]$ unzip fmw_12.2.1.3.0_oid_linux64_Disk1_1of1.zip
[oracle@oel1 OAM12c]$ ./fmw_12.2.1.3.0_oid_linux64.bin

Navigate through installation screens clicking Next, select or browse to correct Oracle Home on Installation Location screen.
image
Select Collocated in Installation Type
image
Select JDK, check below link for details on how to install JDK
https://oraidam.wordpress.com/2018/01/09/install-java-jdk/
image
image
image

Create schemas in DB

[oracle@oel1 Oracle_Home]$ cd /u01/oracle/product/Oracle_Home/oracle_common/bin/
[oracle@oel1 bin]$ ./rcu

image
image

Oracle Internet Directory (ODS) schema does not need a prefix. The prefix is required for the other schemas selected during the schema creation process.
Note: You can load only one Oracle Internet Directory (ODS) schema per Database.

If you are configuring Oracle Internet Directory in a collocated mode, the following dependent schemas are selected:
Oracle Platform Security Services (OPSS)
Audit Services (IAU)
Audit Services Append (IAU_Append)
Audit Services Viewer (IAU_Viewer)
WebLogic Services (WLS)
Common Infrastructure Service (STB)
XWin_MobaX_2018-03-05_09-33-56
Note: check troubleshoot section if any errors related to processes and open_cursors
XWin_MobaX_2018-03-05_09-43-50
Proceed on next screens to create schemas.
XWin_MobaX_2018-03-05_09-47-05


Configure Oracle Internet Directory Domain

[oracle@oel1 bin]$ cd /u01/oracle/product/Oracle_Home/oracle_common/common/bin/
[oracle@oel1 bin]$ ./config.sh

XWin_MobaX_2018-03-05_09-50-56
Select following configuration templates for OID collocated mode
• Oracle Internet Directory (Collocated) -12.2.1.3.0 [oid]
Selecting this template automatically selects the following as dependencies:
– Oracle Directory Services Manager -12.2.1.3.0 [oid]
– Oracle JRF -12.2.1.3.0 [oracle_common]
– WebLogic Coherence Cluster Extension -12.2.1.3.0 [wlserver]
– Oracle Enterprise Manager – 12.2.1.3.0 [em]
XWin_MobaX_2018-03-05_09-53-28
XWin_MobaX_2018-03-05_09-54-30
XWin_MobaX_2018-03-05_09-55-03
XWin_MobaX_2018-03-05_09-55-41
XWin_MobaX_2018-03-05_09-56-51
XWin_MobaX_2018-03-05_09-58-39
XWin_MobaX_2018-03-05_09-59-30
XWin_MobaX_2018-03-05_09-59-57
XWin_MobaX_2018-03-05_10-00-51
XWin_MobaX_2018-03-05_10-01-23
XWin_MobaX_2018-03-05_10-01-59
image
image
image
Note: Do not change the name of the default machine (oidhost1), as the WLST command oid_setup() run for setting up the OID instance, later during the post-configuration stage.
image
image
image
image
image
image

Start Servers

[oracle@oel1 bin]$ cd /u01/oracle/config/Domain_Home/ODS_Domain/bin/
[oracle@oel1 bin]$ nohup ./startWebLogic.sh &

image

[oracle@oel1 bin]$ cd /u01/oracle/config/Domain_Home/ODS_Domain/bin/[oracle@oel1 bin]$ nohup ./startNodeManager.sh &

image

Initial OID setup

[oracle@oel1 bin]$ cd /u01/oracle/product/Oracle_Home/oracle_common/common/bin
[oracle@oel1 bin]$ ./wlst.sh

nmConnect(username=’weblogic’,password=’Oracle123′,domainName=’ODS_Domain’)

image
connect(‘weblogic’,’Oracle123′,’t3://oel1.mylab.com:7001′)
image

oid_setup(orcladminPassword=’Oracle123′,odsPassword=’Oracle123′,realmDN=’dc=us,dc=oracle,dc=com’)

The command oid_setup() performs the following operations:
• Sets the password for cn=orcladmin user.
• Creates the oid1 instance.
The following parameters are set by default when oid_setup is run:
– instanceName = ‘oid1’
– host = ‘hostname of the current machine’
– port = ‘3060’
– machine = ‘oidhost1’
This gets created automatically when you run config.sh.
– sslPort = ‘3131’
• Starts the OID instance oid1 .
• Creates the realm.
image

Verify

[oracle@oel1 bin]$ cd /u01/oracle/product/Oracle_Home/bin
[oracle@oel1 bin]$ ldapbind -h oel1.mylab.com -p 3060
bind successful

image
image
Troubleshoot
If you face below error while creating schemas

ERROR – RCU-6107 The database initialization parameter prerequisite check failed.
CAUSE – RCU-6107 The database initialization parameter prerequisite check failed for processes.
Current Value is 300. It should be greater than or equal to 500.
ACTION – RCU-6107 Make sure that the database initialization parameter has the required value.

ERROR – RCU-6107 The database initialization parameter prerequisite check failed.
CAUSE – RCU-6107 The database initialization parameter prerequisite check failed for open_cursors.
Current Value is 300. It should be greater than or equal to 500.
ACTION – RCU-6107 Make sure that the database initialization parameter has the required value.

Check with DB Team to set the processes and open_cursors to 500 at database and restart

SQL> alter system set processes=500 scope=spfile;
SQL> alter system set open_cursors=500 scope=spfile;

OHS Add X-XSS-Protection Header

Missing X-XSS-Protection header may allow Cross-Site Scripting attacks.

This post covers adding X-XSS-Protection header to OHS.

Edit $INSTANCE_HOME/INSTANCE_NAME/config/OHS/INSTANCE_NAME/httpd.conf

Add below line

Header set X-XSS-Protection “1; mode=block”

Restart OHS

Verify
2

OHS HSTS – Add Strict-Transport-Security Header

Missing Strict-Transport-Security header may opens the potential for a man-in-the-middle attack, where the redirect could be exploited to direct a user to a malicious site instead of the secure version of the original page.

This post covers adding Strict-Transport-Security header to OHS.

Edit $INSTANCE_HOME/INSTANCE_NAME/config/OHS/INSTANCE_NAME/httpd.conf

Add below line

Header set Strict-Transport-Security “max-age=63072000; includeSubdomains;”

Restart OHS

Verify
3

And to redirect visitors to https, you can add below line

Redirect permanent / https://example.com/

Oracle web tier apply patch set 11.1.1.9 to existing 11.1.1.7

Backup complete 11.1.1.7 home

cd $MW_HOME

tar -cvf Oracle_WT1_backup.tar Oracle_WT1

Note: run tar as root to backup all files

Download 11.1.1.9 patchset – patch 20995453

Unzip and go to Disk1 folder

unzip p20995453_111190_Linux-x86-64.zip

Run the installer

cd Disk1

./runInstaller

Choose “Install software – Do Not Configure
XWin_MobaX_2018-02-27_11-00-23

specify Installation Location
XWin_MobaX_2018-02-27_11-03-23

chrome_2018-02-27_11-04-08
XWin_MobaX_2018-02-27_11-12-54

Verify

$ORACLE_HOME/OPatch/opatch lsinventory

Oracle Interim Patch Installer version 11.1.0.11.0
Copyright (c) 2018, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/product/oracle/Middleware_Webtier/Oracle_WT1
Central Inventory : /u01/app/oraInventory
    from           : /u01/product/oracle/Middleware_Webtier/Oracle_WT1/oraInst.loc
OPatch version    : 11.1.0.11.0
OUI version       : 11.1.0.9.0
Log file location : /u01/product/oracle/Middleware_Webtier/Oracle_WT1/cfgtoollogs/opatch/opatch2018-02-27_11-15-21AM_1.log

OPatch detects the Middleware Home as “/u01/product/oracle/Middleware_Webtier”

Lsinventory Output file location : /u01/product/oracle/Middleware_Webtier/Oracle_WT1/cfgtoollogs/opatch/lsinv/lsinventory2018-02-27_11-15-21AM.txt

——————————————————————————–
Installed Top-level Products (1):

Oracle WebTier and Utilities CD                                      11.1.1.9.0
There are 1 products installed in this Oracle Home.

start OHS instance

$INSTANCE_HOME/bin/opmnctl startall

$INSTANCE_HOME/bin/opmnctl status

Processes in Instance: ohs1
———————————+——————–+———+———
ias-component                    | process-type       |     pid | status
———————————+——————–+———+———
ohs1                             | OHS                |   33731 | Alive

If web tier is associated to weblogic domain follow below step

cd ORACLE_HOME/opmn/bin

./upgradenonj2eeapp.sh
-oracleInstance Instance_Home_Location
-adminHost WebLogic_Server_Host_Name
-adminPort administration_server_port_number
-adminUsername administration_server_user

MobaXterm_Personal_10.5_2018-02-27_11-26-15