Monday, August 3, 2015

Oracle Enterprise Manager Cloud Control 12c Release 5 (12.1.0.5.0) - Agent Installation using agentDeploy option using PULL method


Step-1: Login to OMS Server:

[oracle@oel66 bin]$ pwd
/u01/app/oracle/em12cr5/oms/bin

[oracle@oel66 home]$ cd /home/oracle/
[oracle@oel66 ~]$ mkdir agent_soft
[oracle@oel66 ~]$ cd /u01/app/oracle/em12cr5/oms/bin
[oracle@oel66 bin]$ pwd

Step-2: Specify username and password:

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

Step-3: execute the command 'sync'

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

Step-4: check supported platforms:

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

Step-5: Execute 'get_agentimage' using EMCLI: 

[oracle@oel66 bin]$ ./emcli get_agentimage -destination=/home/oracle/agent_soft -platform="Linux x86-64" -version=12.1.0.5.0
 === Partition Detail ===
Space free : 14 GB
Space required : 1 GB
Check the logs at /u01/app/oracle/agent12cr5/agent_inst/.emcli/get_agentimage_2015-07-09_11-42-52-AM.log
Downloading /home/oracle/agent_soft/12.1.0.5.0_AgentCore_226.zip
File saved as /home/oracle/agent_soft/12.1.0.5.0_AgentCore_226.zip
Downloading /home/oracle/agent_soft/12.1.0.5.0_PluginsOneoffs_226.zip
File saved as /home/oracle/agent_soft/12.1.0.5.0_PluginsOneoffs_226.zip
Downloading /home/oracle/agent_soft/unzip
File saved as /home/oracle/agent_soft/unzip
Agent Image Download completed successfully.

[oracle@oel66 bin]$ cd /home/oracle/agent_soft/

Step-6: Move the agent software to database server machine through 'scp' command:

[oracle@oel66 agent_soft]$ ls -lrth
total 246M
-rw-r--r--. 1 oracle oinstall 246M Jul  9 11:43 12.1.0.5.0_AgentCore_226.zip

[oracle@oel66 agent_soft]$ scp 12.1.0.5.0_AgentCore_226.zip oracle@192.168.56.112:/u01/app/oracle/agent12c/
The authenticity of host '192.168.56.112 (192.168.56.112)' can't be established.
RSA key fingerprint is 42:5d:97:8c:a7:8a:78:7d:fa:f2:45:55:3c:85:61:54.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.56.112' (RSA) to the list of known hosts.
oracle@192.168.56.112's password:
12.1.0.5.0_AgentCore_226.zip                                                                                                                               100%  245MB  35.0MB/s   00:07
[oracle@oel66 agent_soft]$

Step-7: Goto agent directory (i.e database server)

[oracle@oel652 oracle]$ pwd
/u01/app/oracle
[oracle@oel652 oracle]$ mkdir agent12c
[oracle@oel652 oracle]$ cd agent12c
[oracle@oel652 agent12c]$ mkdir agent_inst

[oracle@oel652 agent12c]$ pwd
/u01/app/oracle/agent12c
[oracle@oel652 agent12c]$ cd ..

[oracle@oel652 oracle]$ pwd
/u01/app/oracle
[oracle@oel652 oracle]$ cd agent12c
[oracle@oel652 agent12c]$ ls -lrth
total 4.0K
drwxr-xr-x. 2 oracle oinstall 4.0K Jul  9 11:55 agent_inst
[oracle@oel652 agent12c]$ pwd
/u01/app/oracle/agent12c
[oracle@oel652 agent12c]$ ls -lrth
total 246M
drwxr-xr-x. 2 oracle oinstall 4.0K Jul  9 11:55 agent_inst
-rw-r--r--. 1 oracle oinstall 246M Jul  9 11:55 12.1.0.5.0_AgentCore_226.zip

Step-8: unzip the agent software 

[oracle@oel652 agent12c]$ 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
 extracting: 12.1.0.5.0_PluginsOneoffs_226.zip
[oracle@oel652 agent12c]$ ls -lrth
total 491M
-rw-rw-r--. 1 oracle oinstall  178 Jun 11 06:11 agentimage.properties
-rwxr-xr-x. 1 oracle oinstall 143K Jun 11 06:11 unzip
-rwxrwxr-x. 1 oracle oinstall 3.7K Jun 11 06:11 agent.rsp
-rwxrwxr-x. 1 oracle oinstall  29K Jun 11 06:11 agentDeploy.sh
-rw-rw-r--. 1 oracle oinstall 239M Jun 11 06:11 agentcoreimage.zip
-rw-r--r--. 1 oracle oinstall 6.7M Jul  9 11:43 12.1.0.5.0_PluginsOneoffs_226.zip
drwxr-xr-x. 2 oracle oinstall 4.0K Jul  9 11:55 agent_inst
-rw-r--r--. 1 oracle oinstall 246M Jul  9 11:55 12.1.0.5.0_AgentCore_226.zip

Step-9: Edit the file agent.rsp and do the changes required for your environment:

[oracle@oel652 agent12c]$ vi agent.rsp

[oracle@oel652 agent12c]$ cat agent.rsp

-------------------------------------
OMS_HOST=192.168.56.110
EM_UPLOAD_PORT=4903
AGENT_REGISTRATION_PASSWORD=oracle123
AGENT_INSTANCE_HOME=/u01/agent12r5
AGENT_PORT=3872
b_startAgent=true
ORACLE_HOSTNAME=192.168.56.112
s_agentHomeName="agent12c_home"
-------------------------------------

[oracle@oel652 agent12c]$ vi agent.rsp

step-10: Excute './agentDeploy.sh' using the required arguments 

[oracle@oel652 agent12c]$ ./agentDeploy.sh AGENT_BASE_DIR=/u01/agent12r5 RESPONSE_FILE=/u01/app/oracle/agent12c/agent.rsp -ignorePrereqs

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

Validating oms host & port with url: http://192.168.56.110:4903/empbs/genwallet
Validating oms host & port with url: https://192.168.56.110:4903/empbs/genwallet
Return status:3-oms https port is passed
Unzipping the agentcoreimage.zip to /u01/agent12r5 ....
12.1.0.5.0_PluginsOneoffs_226.zip
Executing command : /u01/app/oracle/agent12c/unzip -o /u01/app/oracle/agent12c/12.1.0.5.0_PluginsOneoffs_226.zip -d /u01/agent12r5
Successfully unzipped /u01/app/oracle/agent12c/12.1.0.5.0_PluginsOneoffs_226.zip to /u01/agent12r5 !
Executing command : /u01/agent12r5/core/12.1.0.5.0/jdk/bin/java -classpath /u01/agent12r5/core/12.1.0.5.0/oui/jlib/OraInstaller.jar:/u01/agent12r5/core/12.1.0.5.0/oui/jlib/xmlparserv2.jar:/u01/agent12r5/core/12.1.0.5.0/oui/jlib/srvm.jar:/u01/agent12r5/core/12.1.0.5.0/oui/jlib/emCfg.jar:/u01/agent12r5/core/12.1.0.5.0/jlib/agentInstaller.jar:/u01/agent12r5/core/12.1.0.5.0/oui/jlib/share.jar oracle.sysman.agent.installer.AgentInstaller /u01/agent12r5/core/12.1.0.5.0 /u01/app/oracle/agent12c /u01/agent12r5 /u01/agent12r5 AGENT_BASE_DIR=/u01/agent12r5

Cloning the agent home...
Executing command: /u01/agent12r5/core/12.1.0.5.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=/u01/agent12r5/core/12.1.0.5.0 -responseFile /u01/app/oracle/agent12c/agent.rsp  AGENT_BASE_DIR=/u01/agent12r5 AGENT_BASE_DIR=/u01/agent12r5 RESPONSE_FILE=/u01/app/oracle/agent12c/agent.rsp -noconfig  ORACLE_HOME_NAME=agent12c_home -force b_noUpgrade=true EMCTLCFG_MODE=NONE

Cloning of agent home completed successfully

Attaching sbin home...
Executing command: /u01/agent12r5/core/12.1.0.5.0/oui/bin/runInstaller -debug -ignoreSysPrereqs   -attachHome -waitForCompletion -nowait ORACLE_HOME=/u01/agent12r5/sbin ORACLE_HOME_NAME=sbin12c3 -force

Attach home for sbin home completed successfully.

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

Update home dependency completed successfully.
Executing command: /u01/agent12r5/core/12.1.0.5.0/oui/bin/runConfig.sh ORACLE_HOME=/u01/agent12r5/core/12.1.0.5.0 RESPONSE_FILE=/u01/agent12r5/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

The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
 /u01/agent12r5/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/agent12r5/core/12.1.0.5.0/cfgtoollogs/agentDeploy/agentDeploy_2015-07-09_12-01-17-PM.log
Agent deployment completed successfully.
[oracle@oel652 agent12c]$

Step-11: Login as root user and execute the following:

login as: root
root@192.168.56.112's password:
Last login: Wed Jul  8 08:19:23 2015 from 192.168.56.10
[root@oel652 ~]# sh /u01/agent12r5/core/12.1.0.5.0/root.sh
Finished product-specific root actions.
/etc exist

Creating /etc/oragchomelist file...
[root@oel652 ~]#

Step-12: Check Agent installed directories:

[oracle@oel652 agent12c]$ cd /u01/agent12r5/
[oracle@oel652 agent12r5]$ ls -lrth
total 44K
-rw-rw-r--. 1 oracle oinstall  178 Jun 11 06:11 agentimage.properties
-rwxr-xr-x. 1 oracle oinstall  223 Jul  9 11:42 plugins.txt
drwxr-xr-x. 7 oracle oinstall 4.0K Jul  9 11:42 plugins
drwxr-xr-x. 3 oracle oinstall 4.0K Jul  9 12:01 core
drwxr-xr-x. 2 oracle oinstall 4.0K Jul  9 12:01 bin
drwxr-xr-x. 3 oracle oinstall 4.0K Jul  9 12:01 install
-rw-r--r--. 1 oracle oinstall  298 Jul  9 12:02 plugins.txt.status
drwxr-----. 2 oracle oinstall 4.0K Jul  9 12:02 internal
drwxrwxr-x. 3 oracle oinstall 4.0K Jul  9 12:02 diag
drwxr-----. 8 oracle oinstall 4.0K Jul  9 12:03 sysman
drwxr-xr-x. 5 oracle oinstall 4.0K Jul  9 12:04 sbin
[oracle@oel652 agent12r5]$ cd bin/
[oracle@oel652 bin]$ ls -lrth
total 16K
-rwx------. 1 oracle oinstall 568 Jul  9 12:01 emctl
-rwx------. 1 oracle oinstall 561 Jul  9 12:01 forwarderProxy
-rwxr-x---. 1 oracle oinstall 653 Jul  9 12:01 emtgtctl
-rw-r--r--. 1 oracle oinstall 216 Jul  9 12:01 nmosudo.props


[oracle@oel652 bin]$ ./emctl start agent
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
Agent is already running

[oracle@oel652 bin]$ ps -ef | grep agent
oracle    3223     1  0 10:35 ?        00:00:00 /usr/bin/seahorse-agent --variables
oracle    3355  3099  0 10:35 ?        00:00:00 /usr/libexec/polkit-gnome-authentication-agent-1
oracle   20987     1  0 12:02 pts/1    00:00:00 /u01/agent12r5/core/12.1.0.5.0/perl/bin/perl /u01/agent12r5/core/12.1.0.5.0/bin/emwd.pl agent /u01/agent12r5/sysman/log/emagent.nohup
oracle   21029 20987  1 12:02 pts/1    00:00:13 /u01/agent12r5/core/12.1.0.5.0/jdk/bin/java -Xmx128M -server -Djava.security.egd=file:///dev/./urandom -Dsun.lang.ClassLoader.allowArraySyntax=true -XX:+UseLinuxPosixThreadCPUClocks -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+UseCompressedOops -Dwatchdog.pid=20987 -cp /u01/agent12r5/core/12.1.0.5.0/jdbc/lib/ojdbc5.jar:/u01/agent12r5/core/12.1.0.5.0/ucp/lib/ucp.jar:/u01/agent12r5/core/12.1.0.5.0/modules/oracle.http_client_11.1.1.jar:/u01/agent12r5/core/12.1.0.5.0/lib/xmlparserv2.jar:/u01/agent12r5/core/12.1.0.5.0/lib/jsch.jar:/u01/agent12r5/core/12.1.0.5.0/lib/optic.jar:/u01/agent12r5/core/12.1.0.5.0/modules/oracle.dms_11.1.1/dms.jar:/u01/agent12r5/core/12.1.0.5.0/modules/oracle.odl_11.1.1/ojdl.jar:/u01/agent12r5/core/12.1.0.5.0/modules/oracle.odl_11.1.1/ojdl2.jar:/u01/agent12r5/core/12.1.0.5.0/sysman/jlib/log4j-core.jar:/u01/agent12r5/core/12.1.0.5.0/jlib/gcagent_core.jar:/u01/agent12r5/core/12.1.0.5.0/sysman/jlib/emagentSDK-intg.jar:/u01/agent12r5/core/12.1.0.5.0/sysman/jlib/emagentSDK.jar oracle.sysman.gcagent.tmmain.TMMain
oracle   22543 19884  0 12:16 pts/1    00:00:00 grep agent
[oracle@oel652 bin]$

Step-13: Check agent status:

[oracle@oel652 bin]$ ./emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version          : 12.1.0.5.0
OMS Version            : 12.1.0.5.0
Protocol Version       : 12.1.0.1.0
Agent Home             : /u01/agent12r5
Agent Log Directory    : /u01/agent12r5/sysman/log
Agent Binaries         : /u01/agent12r5/core/12.1.0.5.0
Agent Process ID       : 21029
Parent Process ID      : 20987
Agent URL              : https://192.168.56.112:3872/emd/main/
Local Agent URL in NAT : https://192.168.56.112:3872/emd/main/
Repository URL         : https://oel66:4903/empbs/upload
Started at             : 2015-07-09 12:02:44
Started by user        : oracle
Operating System       : Linux version 3.8.13-16.2.1.el6uek.x86_64 (amd64)
Last Reload            : (none)
Last successful upload                       : 2015-07-09 12:24:08
Last attempted upload                        : 2015-07-09 12:24:08
Total Megabytes of XML files uploaded so far : 0.47
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 18.72%
Collection Status                            : Collections enabled
Heartbeat Status                             : Ok
Last attempted heartbeat to OMS              : 2015-07-09 12:27:50
Last successful heartbeat to OMS             : 2015-07-09 12:27:50
Next scheduled heartbeat to OMS              : 2015-07-09 12:28:51

---------------------------------------------------------------
Agent is Running and Ready
[oracle@oel652 bin]$

No comments:

Post a Comment