Friday, July 10, 2015

Agent Deployment: Management Agent using the AgentPull script 12.1.0.4


Oracle 12c (12.1.0.4.0) Release 4 OEM
Install / Deployment of Management Agent using the AgentPull script


·               To install a Management Agent using the AgentPull script, you do not need to download the Management Agent software onto the destination host. The AgentPull script performs this action automatically.

If the destination host runs on UNIX, access the following URL from the host from your web browser or command line.


If the destination host runs on Microsoft Windows, access the following URL from the host from your web browser or command line


Save the file as AgentPull.sh (AgentPull.bat for Microsoft Windows) to a local directory, say /SOFT (c:\SOFT for Microsoft Windows




Ensure that you install the cURL utility on the destination host. You can download the cURL utility from the following URL:

http://curl.haxx.se/dlwiz/?type=bin

Note: For destination hosts running on Microsoft Windows, Oracle recommends that you install cURL in c:\.




[oracle@rac126 Agent12cR4]$ more /etc/oratab

EMREP12C:/u01/app/oracle/product/11.2.0/dbhome_1:N


·                Creating Agent Home directory and Software Directory where we can put Agent12cR4 Binary and Pull Script and Response File

[oracle@rac126 oracle]$ mkdir AgentR4

[oracle@rac126 oracle]$ cd AgentR4/

[oracle@rac126 AgentR4]$ pwd
/u01/app/oracle/AgentR4


[oracle@rac126 AgentR4]$   cd /SOFT/

[oracle@rac126 SOFT]$ mkdir AgentR4
[oracle@rac126 SOFT]$ cd AgentR4/


·                  Download the AgentPull.sh script using cURL utility

[oracle@rac126 AgentR4]$ curl "https://oem250.ora.com:7802/em/install/getAgentImage" --insecure -o AgentPull.sh

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21158  100 21158    0     0   137k      0 --:--:-- --:--:-- --:--:-- 20.1M




[oracle@rac126 AgentR4]$ ls -l
total 24
-rw-r--r-- 1 oracle oinstall 21158 Jun 25 22:01 AgentPull.sh

·                  Provide the execute permission to the AgentPull.sh script

[oracle@rac126 AgentR4]$ chmod +x *
[oracle@rac126 AgentR4]$ ls -l
total 24
-rwxr-xr-x 1 oracle oinstall 21158 Jun 25 22:01 AgentPull.sh

·                  If the destination host runs on UNIX, and the OMS host runs on Microsoft Windows, run the following command.  This will remove any ^m character from the file and make it compatible to windows platform.


dos2unix <absolute_path_to_AgentPull.sh>
For example, run the command dos2unix /tmp/AgentPull.sh.


·                  Identify the platforms for which the Management Agent software is available on the OMS host. Run the AgentPull.sh script (AgentPull.bat for Microsoft Windows) specifying the -showPlatforms option to display the platforms for which the Management Agent software is available on the OMS host.

[oracle@rac126 AgentR4]$ ./AgentPull.sh -showPlatforms


Platforms       Version
Linux x86-64 12.1.0.4.0
Microsoft Windows x64 (64-bit) 12.1.0.4.0
IBM AIX on POWER Systems (64-bit) 12.1.0.4.0


·                  Create a response file (in any location on the destination host, its up to us) :


[oracle@rac126 AgentR4]$ vi agent12cR4.rsf

[oracle@rac126 AgentR4]$ more agent12cR4.rsf

LOGIN_USER=sysman
LOGIN_PASSWORD=********
PLATFORM="Linux x86-64"
VERSION=12.1.0.4.0
AGENT_REGISTRATION_PASSWORD=********


·                  Ensure we have running DNS server configured in our environment or we can manually configured in /etc/hosts for source and destination entry.

[oracle@rac126 AgentR4]$ nslookup rac126
Server:         192.168.1.100
Address:        192.168.1.100#53

Name:   rac126.ora.com
Address: 192.168.1.126

[oracle@rac126 AgentR4]$ nslookup oem250
Server:         192.168.1.100
Address:        192.168.1.100#53

Name:   oem250.ora.com
Address: 192.168.1.250



·                  Run the AgentPull.sh script (AgentPull.bat for Microsoft Windows) specifying the RSPFILE_LOC and AGENT_BASE_DIR parameters

[oracle@rac126 AgentR4]$ ./AgentPull.sh RSPFILE_LOC=/SOFT/AgentR4/agent12cR4.rsf AGENT_BASE_DIR=/u01/app/oracle/AgentR4


  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  237M  100  237M    0     0  5202k      0  0:00:46  0:00:46 --:--:-- 5640k
test of /u01/app/oracle/AgentR4//agent.zip OK
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 6795k  100 6795k    0     0  1914k      0  0:00:03  0:00:03 --:--:-- 2674k
Command: /usr/bin/curl  https://oem250.ora.com:4903/em/install/getAgentImage?user=sysman&platform=Linux x86-64&version=12.1.0.4.0&script=download&host=rac126oracom&type=pluginimage --insecure -o /u01/app/oracle/AgentR4//plugin.zip -S --stderr /u01/app/oracle/AgentR4//error.txt
test of /u01/app/oracle/AgentR4//plugin.zip OK
Unzipping agent image...
Executing agentDeploy.sh...

Validating the OMS_HOST & EM_UPLOAD_PORT
Executing command : /u01/app/oracle/AgentR4/core/12.1.0.4.0/jdk/bin/java -classpath /u01/app/oracle/AgentR4/core/12.1.0.4.0/jlib/agentInstaller.jar:/u01/app/oracle/AgentR4/core/12.1.0.4.0/oui/jlib/OraInstaller.jar oracle.sysman.agent.installer.AgentInstaller /u01/app/oracle/AgentR4/core/12.1.0.4.0 /u01/app/oracle/AgentR4 /u01/app/oracle/AgentR4 -prereq

Validating oms host & port with url: http://oem250.ora.com:4903/empbs/genwallet
Validating oms host & port with url: https://oem250.ora.com:4903/empbs/genwallet
Return status:3-oms https port is passed
Unzipping the agentcoreimage.zip to /u01/app/oracle/AgentR4 ....
plugin.zip
Executing command : /u01/app/oracle/AgentR4/unzip -o /u01/app/oracle/AgentR4/plugin.zip -d /u01/app/oracle/AgentR4
Executing command : /u01/app/oracle/AgentR4/core/12.1.0.4.0/jdk/bin/java -classpath /u01/app/oracle/AgentR4/core/12.1.0.4.0/oui/jlib/OraInstaller.jar:/u01/app/oracle/AgentR4/core/12.1.0.4.0/oui/jlib/xmlparserv2.jar:/u01/app/oracle/AgentR4/core/12.1.0.4.0/oui/jlib/srvm.jar:/u01/app/oracle/AgentR4/core/12.1.0.4.0/oui/jlib/emCfg.jar:/u01/app/oracle/AgentR4/core/12.1.0.4.0/jlib/agentInstaller.jar:/u01/app/oracle/AgentR4/core/12.1.0.4.0/oui/jlib/share.jar oracle.sysman.agent.installer.AgentInstaller /u01/app/oracle/AgentR4/core/12.1.0.4.0 /u01/app/oracle/AgentR4 /u01/app/oracle/AgentR4 /u01/app/oracle/AgentR4/agent_inst AGENT_BASE_DIR=/u01/app/oracle/AgentR4


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

Agent install prereqs completed successfully

Cloning the agent home...
Executing command: /u01/app/oracle/AgentR4/core/12.1.0.4.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=/u01/app/oracle/AgentR4/core/12.1.0.4.0 -responseFile /u01/app/oracle/AgentR4//agentpswd.rsp  AGENT_BASE_DIR=/u01/app/oracle/AgentR4 AGENT_BASE_DIR=/u01/app/oracle/AgentR4 OMS_HOST=oem250.ora.com EM_UPLOAD_PORT=4903 RESPONSE_FILE=/u01/app/oracle/AgentR4//agentpswd.rsp -noconfig  ORACLE_HOME_NAME=agent12c1 -force b_noUpgrade=true AGENT_PORT=-1

Cloning of agent home completed successfully

Attaching sbin home...
Executing command: /u01/app/oracle/AgentR4/core/12.1.0.4.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -attachHome -waitForCompletion -nowait ORACLE_HOME=/u01/app/oracle/AgentR4/sbin ORACLE_HOME_NAME=sbin12c1 -force

Attach home for sbin home completed successfully.

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

Update home dependency completed successfully.
Executing command: /u01/app/oracle/AgentR4/core/12.1.0.4.0/oui/bin/runConfig.sh ORACLE_HOME=/u01/app/oracle/AgentR4/core/12.1.0.4.0 RESPONSE_FILE=/u01/app/oracle/AgentR4/core/12.1.0.4.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

The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
 /u01/app/oracle/AgentR4/core/12.1.0.4.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/AgentR4/core/12.1.0.4.0/cfgtoollogs/agentDeploy/agentDeploy_2015-06-25_22-08-59-PM.log
Agent deployment completed successfully.



[oracle@rac126 AgentR4]$ sudo /u01/app/oracle/AgentR4/core/12.1.0.4.0/root.sh
[sudo] password for oracle:
Finished product-specific root actions.
/etc exist

Creating /etc/oragchomelist file...




[oracle@rac126 AgentR4]$ cd /u01/app/oracle/AgentR4/core/12.1.0.4.0/bin
[oracle@rac126 bin]$ echo agent:/u01/app/oracle/AgentR4/core/12.1.0.4.0:N >> /etc/oratab
[oracle@rac126 bin]$ . oraenv
ORACLE_SID = [EMREP12C] ? agent
ORACLE_BASE environment variable is not being set since this
information is not available for the current user ID oracle.
You can set ORACLE_BASE manually if it is required.



[oracle@rac126 bin]$ ./emctl status agent

Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version          : 12.1.0.4.0
OMS Version            : 12.1.0.4.0
Protocol Version       : 12.1.0.1.0
Agent Home             : /u01/app/oracle/AgentR4/agent_inst
Agent Log Directory    : /u01/app/oracle/AgentR4/agent_inst/sysman/log
Agent Binaries         : /u01/app/oracle/AgentR4/core/12.1.0.4.0
Agent Process ID       : 21601
Parent Process ID      : 21559
Agent URL              : https://rac126.ora.com:3872/emd/main/
Local Agent URL in NAT : https://rac126.ora.com:3872/emd/main/
Repository URL         : https://oem250.ora.com:4903/empbs/upload
Started at             : 2015-06-25 22:10:36
Started by user        : oracle
Operating System       : Linux version 2.6.39-400.209.1.el5uek (amd64)
Last Reload            : (none)
Last successful upload                       : 2015-06-25 22:11:55
Last attempted upload                        : 2015-06-25 22:11:55
Total Megabytes of XML files uploaded so far : 0.25
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 45.18%
Collection Status                            : Collections enabled
Heartbeat Status                             : Ok
Last attempted heartbeat to OMS              : 2015-06-25 22:12:41
Last successful heartbeat to OMS             : 2015-06-25 22:12:41
Next scheduled heartbeat to OMS              : 2015-06-25 22:13:41

---------------------------------------------------------------
Agent is Running and Ready



[oracle@rac126 bin]$ uname -a
Linux rac126.ora.com 2.6.39-400.209.1.el5uek #1 SMP Tue Sep 10 20:33:17 PDT 2013 x86_64 x86_64 x86_64 GNU/Linux
[oracle@rac126 bin]$ more /etc/redhat-release
Red Hat Enterprise Linux Server release 5.10 (Tikanga)


·                  Securing Management Agent if we have not configured yet else leave the below step.

[oracle@rac126 bin]$ ./emctl secure agent

Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Agent successfully stopped...   Done.
Securing agent...   Started.
Enter Agent Registration Password :
Agent successfully restarted...   Done.
Securing agent...   Successful.


[oracle@rac126 bin]$ ./emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version          : 12.1.0.4.0
OMS Version            : 12.1.0.4.0
Protocol Version       : 12.1.0.1.0
Agent Home             : /u01/app/oracle/AgentR4/agent_inst
Agent Log Directory    : /u01/app/oracle/AgentR4/agent_inst/sysman/log
Agent Binaries         : /u01/app/oracle/AgentR4/core/12.1.0.4.0
Agent Process ID       : 23168
Parent Process ID      : 23125
Agent URL              : https://rac126.ora.com:3872/emd/main/
Local Agent URL in NAT : https://rac126.ora.com:3872/emd/main/
Repository URL         : https://oem250.ora.com:4903/empbs/upload
Started at             : 2015-06-25 22:15:23
Started by user        : oracle
Operating System       : Linux version 2.6.39-400.209.1.el5uek (amd64)
Last Reload            : (none)
Last successful upload                       : 2015-06-25 22:15:29
Last attempted upload                        : 2015-06-25 22:15:29
Total Megabytes of XML files uploaded so far : 0.01
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 45.18%
Collection Status                            : Collections enabled
Heartbeat Status                             : Ok
Last attempted heartbeat to OMS              : 2015-06-25 22:15:28
Last successful heartbeat to OMS             : 2015-06-25 22:15:28
Next scheduled heartbeat to OMS              : 2015-06-25 22:16:28

---------------------------------------------------------------
Agent is Running and Ready



·                  Bouncing and Checking the Status of Agent

[oracle@rac126 bin]$ ./emctl stop agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Stopping agent ..... stopped.

[oracle@rac126 bin]$ ./emctl start agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Starting agent ........... started.

[oracle@rac126 bin]$ ./emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version          : 12.1.0.4.0
OMS Version            : 12.1.0.4.0
Protocol Version       : 12.1.0.1.0
Agent Home             : /u01/app/oracle/AgentR4/agent_inst
Agent Log Directory    : /u01/app/oracle/AgentR4/agent_inst/sysman/log
Agent Binaries         : /u01/app/oracle/AgentR4/core/12.1.0.4.0
Agent Process ID       : 23864
Parent Process ID      : 23821
Agent URL              : https://rac126.ora.com:3872/emd/main/
Local Agent URL in NAT : https://rac126.ora.com:3872/emd/main/
Repository URL         : https://oem250.ora.com:4903/empbs/upload
Started at             : 2015-06-25 22:16:17
Started by user        : oracle
Operating System       : Linux version 2.6.39-400.209.1.el5uek (amd64)
Last Reload            : (none)
Last successful upload                       : 2015-06-25 22:16:30
Last attempted upload                        : 2015-06-25 22:16:30
Total Megabytes of XML files uploaded so far : 0.01
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 45.18%
Collection Status                            : Collections enabled
Heartbeat Status                             : Ok
Last attempted heartbeat to OMS              : 2015-06-25 22:16:22
Last successful heartbeat to OMS             : 2015-06-25 22:16:22
Next scheduled heartbeat to OMS              : 2015-06-25 22:17:23

---------------------------------------------------------------
Agent is Running and Ready



Enjoy ….. J

2 comments:

  1. Is it true that you are not able to access the routerlogin.net login page? If the answer is yes, then you have nothing to worry about. Fortunately, we know how to help you solve it.

    ReplyDelete