If you prefer RPM package management system to keep tracks of installed software on your systems, you can deploy Oracle Management Agent using RPM File.
First, you need to create “/usr/lib/oracle” on OMS server (if there is no such a directory). Login as root user and run the following commands:
1 2 |
[root@cloudcontrol12 ~]# mkdir /usr/lib/oracle [root@cloudcontrol12 ~]# chmod 777 /usr/lib/oracle |
Install the rpm-build package on the OMS host:
1 |
[root@cloudcontrol12 ~]# yum install rpm-build |
Switch to oracle user, and login to OEM using emcli as SYSMAN user:
1 |
[oracle@cloudcontrol12 ~]$ /u01/app/Middleware/oms/bin/emcli login -username=sysman |
List the platforms for which the Management Agent software is available on the OMS host:
1 2 3 4 5 6 7 8 9 10 |
[oracle@cloudcontrol12 ~]$ /u01/app/Middleware/oms/bin/emcli get_supported_platforms Getting list of platforms ... Check the logs at /u01/app/Middleware/gc_inst/em/EMGC_OMS1/sysman/.../agent.log About to access self-update code path to retrieve the platforms list.. Getting Platforms list ... ----------------------------------------------- Version = 12.1.0.2.0 Platform = Linux x86-64 ----------------------------------------------- Platforms list displayed successfully. |
As you see, there’s only Linux x86-64 agent available. Let’s create and download the RPM file for it:
1 2 3 4 5 6 7 |
[oracle@cloudcontrol12 ~]$ /u01/app/Middleware/oms/bin/emcli get_agentimage_rpm \ -destination=/home/oracle -platform="Linux x86-64" -version=12.1.0.2.0 … Agent Image copied successfully... Creation of RPM started... RPM creation successful. Agent image to rpm conversion completed successfully |
Now we can copy the RPM to the target system to deploy the agent. I assume that you have already created a user for agent.
1 2 3 |
$ scp oracle-agt-12.1.0.2.0-1.0.x86_64.rpm oracle@targetsystem:. oracle@targetsystem's password: oracle-agt-12.1.0.2.0-1.0.x86_64.rpm 55% 124MB 14.2MB/s 00:08 ETA |
Login as root to the target system and install the RPM:
1 2 |
[root@targetsystem ~]# cd /home/oracle [root@targetsystem ~]# rpm –i oracle-agt-12.1.0.2.0-1.0.x86_64.rpm |
When it’s done, you need to edit /usr/lib/oracle/agent/agent.properties file, enter the required values:
OMS_HOST=cloudcontrol12.gokhanatil.com
OMS_PORT=7799
AGENT_REGISTRATION_PASSWORD=<registration_password>
AGENT_USERNAME=<user_created_for_agent>
AGENT_GROUP=<group_created_for_agent>
AGENT_PORT=3872
ORACLE_HOSTNAME=targetsystem.gokhanatil.com
Save the file and run /etc/init.d/oracle-agt:
1 |
# /etc/init.d/oracle-agt RESPONSE_FILE=/usr/lib/oracle/agent/agent.properties |
That’s all, now you can check if agent is running:
1 2 3 4 5 6 7 8 9 10 11 |
$ /usr/lib/oracle/agent/core/12.1.0.2.0/bin/emctl status agent Oracle Enterprise Manager Cloud Control 12c Release 2 Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved. --------------------------------------------------------------- Agent Version : 12.1.0.2.0 OMS Version : 12.1.0.2.0 Protocol Version : 12.1.0.1.0 Agent Home : /usr/lib/oracle/agent/agent_inst Agent Binaries : /usr/lib/oracle/agent/core/12.1.0.2.0 Agent Process ID : 5323 Parent Process ID : 5283 |