top of page

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.

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 script from OMS. Make sure to replace your OEM console IP address in the below link

curl -sk > /tmp/

Give execute permissions

chmod 775 /tmp/

Install agent

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

Execute the 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=\"\" -properties=\"LsnrName:LISTENER;ListenerOraDir:/u01/app/oracle/product/;Port:1521;OracleHome:/u01/app/oracle/product/;;\"" >> "/tmp/emcli/emclicommands.txt"
echo "add_target -name=\"dev.dbagenesis.com_test\" -type=\"oracle_database\" -host=\"\" -credentials=\"UserName:dbsnmp;password:ORACLE;Role:Normal\" -properties=\"SID:devdb;Port:1521;OracleHome:/u01/app/oracle/product/;;\"" >> "/tmp/emcli/emclicommands.txt"

Execute the command file

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

Related Posts

Heading 2

Add paragraph text. Click “Edit Text” to customize this theme across your site. You can update and reuse text themes.

bottom of page