• Arun Kumar

Add Linux Target to OEM via Pull Method

This article describes the steps to add Linux target (OEL 7) to Oracle Enterprise Manager 13c via Pull Method.

Note: There are two methods to deploy agents: Pull and Push method.

Also Read: Add Linux Target to OEM 13c via Push Method

Environment Setup

For this activity, I setup an OEL 7.6 vm with 4 GB RAM and 100 GB hard disk. You can setup same OEL 7.6 vm via below article.

Install Oracle Linux on VirtualBox (OEL 7.7)

Next, you will have to install Oracle 12cR2. I have used below articles to install Oracle 12cR2 and create a database

Oracle 12cR2 silent installation on Oracle Linux 7

Create 12cR2 database in silent mode

Install below packages as they are required by OEM to install Agent on this target machine

yum install make -y
yum install binutils -y
yum install gcc -y
yum install libaio -y
yum install glibc-common -y
yum install libstdc++ -y
yum install sysstat -y
yum install glibc -y
yum install glibc-devel.i686 -y
yum install glibc-devel -y
yum install libXtst -y

Pull OEM Agent

Create agent home directory

su - oracle

mkdir -p /u01/app/oracle/agent

Create response file for the agent installation

vi /tmp/em_agent.rsp

PLATFORM="Linux x86-64"

Download the “AgentPull.sh” script from OMS. Make sure to replace your OEM console IP address in the below link

curl -sk > /tmp/AgentPull.sh

Give execute permissions

chmod 775 /tmp/AgentPull.sh

Install agent

/tmp/AgentPull.sh -ignorePrereqs RSPFILE_LOC=/tmp/em_agent.rsp

Execute the root.sh scripts

As root user

Add database instance and listener to agent monitoring. First we will download and install emcli. In case wget is not installed, you can install it “yum -y install wget” command

export JAVA_HOME=/u01/app/oracle/agent/agent_13.

wget -P /tmp/emcli --quiet --no-check-certificate

${JAVA_HOME}/bin/java -jar /tmp/emcli/emclikit.jar -install_dir=/tmp/emcli

Configure emcli client

/tmp/emcli/emcli setup -url= -username="sysman" -dir="/tmp/emcli/conf" -trustall -noregister -noautologin

Create a “commands file” for emcli

echo "add_target -name=\"dev.dbagenesis.com_listener\" -type=\"oracle_listener\" -host=\"dev.dbagenesis.com\" -properties=\"LsnrName:LISTENER;ListenerOraDir:/u01/app/oracle/product/;Port:1521;OracleHome:/u01/app/oracle/product/;Machine:dev.dbagenesis.com;\"" >> "/tmp/emcli/emclicommands.txt"

echo "add_target -name=\"dev.dbagenesis.com_test\" -type=\"oracle_database\" -host=\"dev.dbagenesis.com\" -credentials=\"UserName:dbsnmp;password:ORACLE;Role:Normal\" -properties=\"SID:devdb;Port:1521;OracleHome:/u01/app/oracle/product/;MachineName:dev.dbagenesis.com;\"" >> "/tmp/emcli/emclicommands.txt"

Execute the command file

/tmp/emcli/emcli sync
/tmp/emcli/emcli argfile /tmp/emcli/emclicommands.txt

Recent Posts

See All

MySQL Installation on Linux

This article demonstrates MySQL installation on Oracle Enterprise Linux 6.5 version. Installation of MySQL Make sure you are able to connect internet via virtual machine. Try to ping google.com and pr

Add ISO image storage repository on XenServer

If you have used VMware ESXI, its very easy to upload ISO files to the data store and create VMs. With XenServer, you must create your own ISO repository to upload ISO files. Create ISO directory Acce

Automate RMAN Backups using Shell Scripts

In a real environment, off course you will not manually trigger all the Oracle database backups. You need an automated mechanism to trigger RMAN backups. In this article we will look at RMAN backup au

  • Facebook
  • Twitter
  • YouTube
  • Instagram

© 2020 by DBA Genesis