• 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


LOGIN_USER=SYSMAN
LOGIN_PASSWORD=Timepass$123
PLATFORM="Linux x86-64"
VERSION=13.3.0.0.0
AGENT_REGISTRATION_PASSWORD=Timepass$123
AGENT_BASE_DIR=/u01/app/oracle/agent
AGENT_INSTANCE_HOME=/u01/app/oracle/agent/agent_inst
AGENT_PORT=3872
EM_UPLOAD_PORT=4903
OMS_HOST=test.dbagenesis.com
ORACLE_HOSTNAME=dev.dbagenesis.com

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


curl -sk https://192.168.0.171:7803/em/install/getAgentImage > /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
============
/u01/app/oracle/agent/agent_13.3.0.0.0/root.sh

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.3.0.0.0/oracle_common/jdk/jre


wget -P /tmp/emcli --quiet --no-check-certificate https://192.168.0.171:7803/em/public_lib_download/emcli/kit/emclikit.jar


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

Configure emcli client


/tmp/emcli/emcli setup -url=https://192.168.0.171:7803/em -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/12.2.0.1/network/admin;Port:1521;OracleHome:/u01/app/oracle/product/12.2.0.1/;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/12.2.0.1/;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 Backup using Shell Script

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