Silent Installation of OEM 12c agent: manually using emcli, scripts and response file

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
We need to install the OEM agent in the target server which we need to monitor from the OEM console. Generally, we can do this by OEM console itself. If it allows the agent installation through OEM is well and good as it is the easiest way. Sometimes we as DBA faces issues in installing the agents in the target server by the OEM console add host, target options. In such situations we can use below method to install the agent in the target server and easy we get it monitored from the OEM. 

There are 2 parts for this activity. 

Part #1 is in the OEM server where we installed the OEM software. 

Part #2 is in the target server which needs to be monitored 

Part #1: OEM Server 
Step 1: Check the emcli login is successful or not.

 
[oracle@OEM bin]$ ./emcli login -username=sysman -password=password1
Login successful

Step 2: Synchronize emcli

[oracle@OEM bin]$ ./emcli sync
Synchronized successfully

Step 3: List out the list of supported platforms.

[oracle@OEM bin]$ ./emcli get_supported_platforms
-----------------------------------------------
Version = 12.1.0.5.0
 Platform = Linux x86-64
-----------------------------------------------
Platforms list displayed successfully.

Step 4: Generate an image from the OEM server which needs to be installed in the target server.

[oracle@OEM bin]$ ./emcli get_agentimage -destination=/u01/installs/agent -platform="Linux x86-64" -version=12.1.0.5.0
 === Partition Detail ===
Space free : 18 GB
Space required : 1 GB
Check the logs at /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2016-07-14_07-31-26-AM.log
Downloading /u01/installs/agent/12.1.0.5.0_AgentCore_226.zip
File saved as /u01/installs/agent/12.1.0.5.0_AgentCore_226.zip
Downloading /u01/installs/agent/12.1.0.5.0_PluginsOneoffs_226.zip
File saved as /u01/installs/agent/12.1.0.5.0_PluginsOneoffs_226.zip
Downloading /u01/installs/agent/unzip
File saved as /u01/installs/agent/unzip
Agent Image Download completed successfully.

Step 5: SCP the file (12.1.0.5.0_AgentCore_226.zip) to target host and unzip it 

Step 6: Get the required information from the OEM server using following command. Highlighted information is required.

[oracle@OEM oms]$ ./bin/emctl status oms -details
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host        : OEM.prod01.r-dc.net
HTTP Console Port          : 7788
HTTPS Console Port         : 7803
HTTP Upload Port           : 4889
HTTPS Upload Port          : 4903
EM Instance Home           : /u01/app/oracle/gc_inst/em/EMGC_OMS1
OMS Log Directory Location : /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL: https://OEM.prod01.r-dc.net:7803/em
Upload URL: https://OEM.prod01.r-dc.net:4903/empbs/upload

WLS Domain Information
Domain Name            : GCDomain
Admin Server Host      : OEM.prod01.r-dc.net
Admin Server HTTPS Port: 7102
Admin Server is RUNNING

Oracle Management Server Information
Managed Server Instance Name: EMGC_OMS1
Oracle Management Server Instance Host: OEM.prod01.r-dc.net
WebTier is Up
Oracle Management Server is Up

BI Publisher is not configured to run on this host

Part #2: Target Server 
Step 1: unzip the file

unzip 12.1.0.5.0_AgentCore_226.zip
Archive:  12.1.0.5.0_AgentCore_226.zip
  inflating: unzip
  inflating: agentDeploy.sh
  inflating: agentimage.properties
  inflating: agent.rsp
 extracting: agentcoreimage.zip      ls -tlr

 extracting: 12.1.0.5.0_PluginsOneoffs_226.zip
[oracle@TargetHost emagent]$ ls -tlr
total 502264
-rw-rw-r-- 1 oracle oinstall       178 Jun 11  2015 agentimage.properties
-rwxr-xr-x 1 oracle oinstall    145976 Jun 11  2015 unzip
-rwxrwxr-x 1 oracle oinstall      3775 Jun 11  2015 agent.rsp
-rwxrwxr-x 1 oracle oinstall     29124 Jun 11  2015 agentDeploy.sh
-rw-rw-r-- 1 oracle oinstall 250059880 Jun 11  2015 agentcoreimage.zip
-rw-r----- 1 oracle oinstall   6961671 Jul 14 07:32 12.1.0.5.0_PluginsOneoffs_226.zip
-rw-r----- 1 oracle oinstall 257102519 Jul 14 07:38 12.1.0.5.0_AgentCore_226.zip

Step 2: Add the following entry in agent.rsp file

[oracle@TargetHost emagent]$ vi agent.rsp
OMS_HOST=xx.xxx.5.10 #IP of the OEM server
EM_UPLOAD_PORT=4889 # Port number highlighted Step#5 in the Part #1
AGENT_REGISTRATION_PASSWORD=password1

Step 3: Deploy the agent

[oracle@TargetHost emagent]$ ./agentDeploy.sh AGENT_BASE_DIR=/u01/app/oracle/product/12.1.0/agent RESPONSE_FILE=/u01/installs/emagent/agent.rsp

Validating the OMS_HOST & EM_UPLOAD_PORT
Executing command : /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/jdk/bin/java -classpath /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/jlib/agentInstaller.jar:/u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/oui/jlib/OraInstaller.jar oracle.sysman.agent.installer.AgentInstaller /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0 /u01/installs/emagent /u01/app/oracle/product/12.1.0/agent AGENT_BASE_DIR=/u01/app/oracle/product/12.1.0/agent RESPONSE_FILE=/u01/installs/emagent/agent.rsp -prereq

Validating oms host & port with url: http://xx.xxx.10:4889/empbs/genwallet
Validating oms host & port with url: https://xx.xxx.10:4889/empbs/genwallet
Return status:0-oms http port is passed
Unzipping the agentcoreimage.zip to /u01/app/oracle/product/12.1.0/agent ....
12.1.0.5.0_PluginsOneoffs_226.zip
Executing command : /u01/installs/emagent/unzip -o /u01/installs/emagent/12.1.0.5.0_PluginsOneoffs_226.zip -d /u01/app/oracle/product/12.1.0/agent
Successfully unzipped /u01/installs/emagent/12.1.0.5.0_PluginsOneoffs_226.zip to /u01/app/oracle/product/12.1.0/agent !
Executing command : /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/jdk/bin/java -classpath /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/oui/jlib/OraInstaller.jar:/u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/oui/jlib/xmlparserv2.jar:/u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/oui/jlib/srvm.jar:/u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/oui/jlib/emCfg.jar:/u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/jlib/agentInstaller.jar:/u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/oui/jlib/share.jar oracle.sysman.agent.installer.AgentInstaller /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0 /u01/installs/emagent /u01/app/oracle/product/12.1.0/agent /u01/app/oracle/product/12.1.0/agent/agent_inst AGENT_BASE_DIR=/u01/app/oracle/product/12.1.0/agent


Executing agent install prereqs...
Executing command: /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -prereqchecker -silent -ignoreSysPrereqs -waitForCompletion  -prereqlogloc /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/cfgtoollogs/agentDeploy -entryPoint oracle.sysman.top.agent_Complete -detailedExitCodes PREREQ_CONFIG_LOCATION=/u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/prereqs  -J-DAGENT_BASE_DIR=/u01/app/oracle/product/12.1.0/agent

Agent install prereqs completed successfully

Cloning the agent home...
Executing command: /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=/u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0 -responseFile /u01/installs/emagent/agent.rsp  AGENT_BASE_DIR=/u01/app/oracle/product/12.1.0/agent AGENT_BASE_DIR=/u01/app/oracle/product/12.1.0/agent RESPONSE_FILE=/u01/installs/emagent/agent.rsp -noconfig  ORACLE_HOME_NAME=agent12c2 -force b_noUpgrade=true AGENT_PORT=-1 EMCTLCFG_MODE=NONE

Cloning of agent home completed successfully

Attaching sbin home...
Executing command: /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -attachHome -waitForCompletion -nowait ORACLE_HOME=/u01/app/oracle/product/12.1.0/agent/sbin ORACLE_HOME_NAME=sbin12c2 -force

Attach home for sbin home completed successfully.

Updating home dependencies...
Executing command: /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -updateHomeDeps -waitForCompletion HOME_DEPENDENCY_LIST={/u01/app/oracle/product/12.1.0/agent/sbin:/u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0} -invPtrLoc /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/oraInst.loc -force

Update home dependency completed successfully.
Executing command: /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/oui/bin/runConfig.sh ORACLE_HOME=/u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0 RESPONSE_FILE=/u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/agent.rsp ACTION=configure MODE=perform COMPONENT_XML={oracle.sysman.top.agent.11_1_0_1_0.xml} RERUN=true
Agent Configuration completed successfully

Step 4: The following configuration scripts need to be executed as the "root" user.

#!/bin/sh
#Root script to run
 /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
Agent Deployment Successful.
Agent deployment log location: /u01/app/oracle/product/12.1.0/agent/core/12.1.0.5.0/cfgtoollogs/agentDeploy/agentDeploy_2016-07-19_09-15-44-AM.log
Agent deployment completed successfully.

Now in the OEM you will be able to see the target from this host also.

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer