Oracle Enterprise Manager 12c Agent Installation Guide

  • Upload
    koszuf

  • View
    47

  • Download
    0

Embed Size (px)

DESCRIPTION

Oracle Enterprise Manager 12c Agent Installation Guide - Tips & Tricks

Citation preview

  • Copyright 2015 Mokum Solutions, Inc. All rights reserved.Distribution of the Oracle Cloud Cookbook or derivative of the work in any form is prohibited unless prior permission is obtained from the Copyright holder.

    About Mokum Solutions, Inc.Founded in March 2011, Mokum Solutions, Inc. specializes in the implementation, delivery and support of Oracle technologies in private and public clouds. Mokum corporate headquarters are located in San Francisco, CA http://mokumsolutions.comor call 1 415 252 9164

    About the AuthorThe author of the Oracle Cloud Cookbook is none other than the owner of Mokum Solutions, Inc., Roddy Rodstein. Roddy is one of the most respected Oracle Cloud Computing experts, having designed and managed many of the worlds largest and most complex Oracle private clouds. Before establishing Mokum in March 2011, Roddy spent three years at Oracle on the Oracle VMand Oracle Linux team designing and supporting Oracle's largest and most complex customer environments. Before Oracle, Roddy spent six years at Citrix,designing and supporting Citrix's largest and most complex customer environments,Including Oracle's. With Mr. Rodsteins rich background and knowledge, there can be no better resource for revealing the Oracle Cloud recipe.

    AudienceThe Oracle Cloud Cookbook is a comprehensive, field tested reference design thatguides you through each step to move to your Oracle software portfolio to an elasticOracle cloud using the Oracle VM product line, Oracle Linux, Oracle Engineered Systems managed by Oracle Enterprise Manager 12c, with total control over Oracle processor licensing.

    Mokum is the only full-time Oracle virtualization integrator with the expertise to help you virtualize your Production, Test and DR Oracle workloads.

    [email protected]

  • Last update: 11/24/14This document applies to Oracle Enterprise Manager 12c Release 1 and above, with Oracle Linux andRed Hat Enterprise Linux 5 and 6 host targets.

    Table of ContentsOracle Management Agent Installation OptionsLinux Prerequisites for the Oracle Management Agent installationSetup the Named Credentials for the Oracle Management Agent Installing UserOracle Management Agent Install using the Add Host Targets WizardOracle Management Agent Post Installation PrerequisitesSetup Host Privileged DelegationSetup Preferred CredentialsOracle Management Agent Deinstallaion OptionsDeinstall Oracle Management Agent 12.1.0.4.0Deinstall Oracle Management Agent 12.1.0.3.0Deinstall Oracle Management Agent 12.1.0.2.0Change LogRevision Change Description Updated By Date1 Document Creation Roddy Rodstein 01/14/142 Document Update with 12c R4 information Roddy Rodstein 11/24/14

    Oracle Management Agent Installation OptionsThe Oracle Enterprise Manager client side agent is named the Oracle Management Agent or OMA.Oracle Management Agents can be installed on unmanaged Linux hosts to convert them to managedhosts which are managed via Cloud Control.With Oracle Enterprise Manager 12c there are three Oracle Management Agent installation options. Thischapter of the Oracle Cloud Cookbook covers Oracle's recommended option, the Add Host TargetsWizard.Table 1 shows the three Oracle Management Agent installation options.Agent InstallationOption Explanation

    The Add HostTargets Wizard

    The Add Host Targets Wizard automatically installs the agent from Cloud Controlwithout any post installation steps.Note: Oracle recommends using the Add Host Targets Wizard.

    Silent AgentInstallation MOS ID1360083.1

    The silent agent installation uses a response le installation which automates theagent installation with two manual post installation steps. The manual postinstallation steps include running the root.sh scripts along with emctl secureagent.

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 4 of 41

  • RPM InstallationMOS ID 1363031.1

    The agent RPM installation is a single agent RPM installation with two manualpost installation steps. The manual post installation steps include editing theproperties le: /usr/lib/oracle/agent/agent.properties with the correct values,then executing the /etc/init.d/cong.pl command.

    Linux Prerequisites for the Oracle Management AgentinstallationThe Oracle Management Agent (OMA) is a core Oracle Enterprise Manager component. The OracleManagement Agent can be installed on unmanaged Oracle Linux, Red Hat Enterprise Linux and SuSELinux hosts to convert them to managed hosts that are centrally managed via Cloud Control. There arenumerous prerequisites that must be met before an Oracle Management Agent can be installed on anunmanaged Linux host. Each of the prerequisites in Table 2 must be completed before the OracleManagement agent is installed.Table 2 shows the Oracle Management Agent installation prerequisites.Prerequisite Description1- Sudo as root must becongured for severalcommands for theOracle ManagementAgent installing user inthe /etc/sudoers le.Oracle EnterpriseManager uses atrust-based securitymodel to executetrusted, elevated jobsusing sudo. The OracleManagement Agentuses the nmosudoexecutable to runtrusted/elevated jobs. Ifthe Job credentials donot have sudo settings,then the Job is executedwithout the nmosudo.

    Pre-installation Sudo Prerequisites:Option A:1) As root type "visudo", or edit the /etc/sudoers le using your favorite text editor to add anentry for the Oracle Management Agent installing user. The next example shows therequired entry for the Oracle Management Agent installing user:oma ALL = NOPASSWD: ALL

    In the above example, oma is the installing user. Change "oma" with yourinstaller user account name.In the above example, the agent home ($AGENT_HOME) is /u01/app/oracle/product/agent_inst. Change the above $AGENT_HOME with your$AGENT_HOME.In the above example, the agent base ($AGENT_BASE) is /u01/app/oracle/product/core/12.1.0.2.0/. Change the above $AGENT_BASE with your$AGENT_BASE.

    2) Next, change the following two /etc/sudoers entries: 1) Change: Defaults !visiblepw to: Defaults visiblepw

    Next: 2) Comment out the following line: Defaults requiretty to #Defaults requiretty

    Save the changes.

    Option B:1) Add the Oracle Management Agent installing user to the wheel group anduncomment the "wheel ALL=(ALL) NOPASSWD: ALL" line in the/etc/sudoer le.

    To add the Oracle Management Agent installing user to the the wheel

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 5 of 41

  • group, as root, type: # useradd -G wheel oma

    In the above example, oma is the installing user. Change "oma" with yourinstaller user account name.As root type "visudo", or edit the /etc/sudoers le using your favorite texteditor, and uncomment the the following line:Change:

    # wheel ALL=(ALL) NOPASSWD: ALLto

    wheel ALL=(ALL) NOPASSWD: ALL

    2) Next, change the following two /etc/sudoers entries: 1) Change: Defaults !visiblepw to: Defaults visiblepw

    Next: 2) Comment out the following line: Defaults requiretty to #Defaults requiretty

    Save the changes.

    Tip: With Oracle Linux and Red Hat Enterprise Linux 5 hosts, make the following modicationsto allow sudo with NOPASSWD to work with up2date:

    rm -fr /usr/bin/up2dateln -s /usr/sbin/up2date /usr/bin/up2date

    Oracle Management Service and /etc/sudoers Prerequisites:On the OMS host(s) set the oracle.sysman.prov.agentpush.enablePty propertyto true in the $/sysman/prov/agentpush/agentpush.propertiesle. If your unable to set the oracle.sysman.prov.agentpush.enablePty propertyto true in the $/sysman/prov/agentpush/agentpush.propertiesle, the following two settings must be made in each linux host's /etc/sudoersle.

    2- $ORACLE_BASE and$AGENT_HOMEDirectories:

    The Oracle basedirectory($ORACLE_BASE)is the top-leveldirectory forOracle softwareinstallations.The agent homedirectory

    $ORACLE_BASE and $AGENT_HOME Requirements:The agent home directory must be empty and should have 4GB of space.1.The agent home directory name cannot contain any spaces.2.The installing user must own the agent home directory.3.The installing user or the root user must own all the parent directories.4.The root user must own the root directory.5.

    If the $AGENT_HOME is /u01/app/oracle/product/agent_inst, and oma is theinstalling user, then the /u01/app/oracle/product/agent_inst directory must beowned by oma.If the $ORACLE_BASE is /u01/app/oracle/product/, and oma is the installinguser, then the /u01/app/oracle/product/ directory must be owned by the oma

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 6 of 41

  • ($ORACLE_HOME)is the directorywhere the OracleManagementAgent software isinstalled.

    The Optimal FlexibleArchitecture (OFA) standardis a set of le namingrecommendations formanaging Oracleinstallations. The OptimalFlexible Architecturestandard oers mount point,directory, and le-namingconventions that work withthe Oracle UniversalInstaller. The OptimalFlexible Architectureincludes where to installeach part of each Oracleproduct including thestorage of the applicationsand the data.To create the directories forOracle software installationusing the Optimal FlexibleArchitecture standard, asroot, type the followingcommands.# mkdir -p /u01/app/oracle/product/# chown oma:dba /u01/app/oracle/product

    user, and the root directory /u01 must be owned by the root user.Note: When installing the Oracle Management Agent using Cloud Control'sAdd Host Targets Wizard, the Wizard automatically creates the$AGENT_HOME directory.As root, create and chown the $ORACLE_BASE directory, i.e. /u01/app/oracle/product/. For example:# mkdir /u01/app/oracle/product/# chown oma:dba /u01/app/oracle/product

    3- This section lists theOracle ManagementAgent RPM packageprerequisites for Oracleand Red Hat EnterpriseLinux 5.x and 6.x.Tip: The oracle-em-agent-12cR1-preinstall (use for OracleManagement Agent R1 throughR3), and oracle-em-agent-12cR4-preinstall (use for OracleManagement Agent R4) RPMssimplifies meeting the softwareand system configurationprerequisites for installing theEnterprise Manager agent (OracleManagement Agent (OMA)) onOracle Linux 5, 6, and 7. Installingthe oracle-em-agent preinstall RPMautomatically installs all of thesoftware RPM prerequisites for theOracle Management Agent, aswell as meeting the systemconfiguration prerequisites, suchas creating an oracle user and theoinstall and dba groups,configuring the sysctl.conf

    To install the oracle-em-agent preinstall RPM from the Oracle public yum repository, as root type thefollowing commands:# cd /etc/yum.repos.d# wget http://public-yum.oracle.com/public-yum-ol6.repoNext, using you favorite text editor edit the public-yum-ol6.repo file and enable the addonschannel. Change the following line from:[ol6_addons]name=Oracle Linux $releasever Add ons ($basearch)baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oraclegpgcheck=1enabled=0to:[ol6_addons]name=Oracle Linux $releasever Add ons ($basearch)baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oraclegpgcheck=1enabled=1Note: If you allready installed the oracle-rdbms-server preinstall RPM, there is no need to installthe oracle-em-agent preinstall RPMNow we can install the oracle-ebs-server-R12-preinstall RPM as shown in the next example.

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 7 of 41

  • settings, system startupparameters, user limits, and driverparameters. The OracleManagement Agent RPM isavailable in the OracleUnbreakable Linux Networkaddons channel and from theOracle public yum repositoryaddons channel.

    Install the oracle-em-agent-12cR4-preinstall RPM package for Oracle Management Agent R4:# yum install oracle-em-agent-12cR4-preinstall -yInstall the oracle-em-agent-12cR1-preinstall RPM package for Oracle Management Agent R1through R3:# yum install oracle-em-agent-12cR1-preinstall -y

    If you elect not to use the oracle-em-agent preinstall RPM to meetthe RPM prerequisites, conrm if the prerequisite RPM packages are already installed. As root,type the following command:Oracle & Red Hat Linux 5.x 64-bit:# rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" make binutils gcc libaio glibclibstdc++ setarch rng-utils libXtstOracle & Red Hat Linux 6.x 64-bit# rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" make binutils gcc libaio glibc-common libstdc++ sysstat glibc-devel

    The above commands lists each of the queried RPM packages installed on thesystem. The 32-bit RPMs are appended with (i386) or (i686), and the 64-bitRPMs are appended with (x86_64). From any ULN registered Linux host,install any of the missing RPMs by typing "yum install package-name". Toinstall the RPM Package Prerequisites from the Oracle public yum repository,as root type the following commands:Oracle & Red Hat Linux 6:# cd /etc/yum.repos.d/# wget http://public-yum.oracle.com/public-yum-ol6.repo# yum install package-nameOracle & Red Hat Linux 5:# cd /etc/yum.repos.d/# wget http://public-yum.oracle.com/public-yum-el5.repo# yum install package-name

    Oracle & Red Hat Linux 5.x 64-bit Oracle & Red Hat Linux 6.x 64-bit

    make-3.81binutils-2.17.50.0.6gcc -4.1.1libaio-0.3.106glibc-common-2.3.4libstdc++ -4.1.1setarch-1.6sysstat-5.0.5rng-utils-2.0libXtst-1.0.1-3.1(x86_64)xorg-x11-utils (Required only forGUI installations)

    make-3.81binutils-2.17.50.0.6gcc-4.1.1libaio-0.3.106glibc-common-2.3.4libstdc++-4.1.1sysstat-5.0.5glibc-devel-2.5-49-i686 (This is a32-bit package)glibc-devel-2.5-49-x86_64 (This isa 64-bit package)(Only for Oracle Linux 6.2) glibc-2.12-1.47.0.2

    Oracle & Red Hat Linux 5.x 32-bit Oracle & Red Hat Linux 6.x 32-bit

    make-3.81binutils-2.17.50.0.6gcc-4.1.1libaio-0.3.106glibc-common-2.3.4compat-libstdc++296-2.96libstdc++ 4.1.1

    make-3.81binutils-2.17.50.0.6gcc-4.1.1libaio-0.3.106glibc-common-2.3.4compat-libstdc++296-2.96libstdc++ 4.1.1

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 8 of 41

  • libstdc++devel-4.1.0setarch-1.6sysstat-5.0.5compat-db 4.1.25rng-utils-2.0libXtst-1.0.1-3.1(i386)xorg-x11-utils (Required only forGUI installations)

    libstdc++devel-4.1.0setarch-1.6sysstat-5.0.5compat-db 4.1.25xorg-x11-utils (Required only forGUI installations)

    4- /etc/hostsrequirementsOracle technologyproducts, includingOracle EnterpriseManager, rely on aproperly formatted/etc/hosts le whichallows the host to bepingable, with long andshort host names. Thehost name in the/etc/hosts le must beassociated with theserver's public IPaddress.

    The next example shows the proper syntax from a /etc/hosts le. Note that thelocalhost entries are on one line, and the IP address with the long and shortnames are on the next line.127.0.0.1 localhost.localdomain localhost192.168.4.8 servername.com servernameThe /etc/hosts le can be edited by the root user by typing vi /etc/hosts.Tip: The following IPv6 entries in Oracle Linux 5 & 6 /etc/hosts les should beremoved to avoid "Bug 13652664 : AGENT DEPLOY FAILS WITH AGENT PORTPASSED BY USER IS BUSY" with Oracle Management Agent installations:::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

    5- The Secure Shell(SSH) provides theconnectivity betweenthe Oracle ManagementService (OMS) andOracle ManagementAgents for jobs anddeploymentprocedures.

    All of the Linuxhosts targets mustuse the same SSHport.

    If the SSH daemon is not running on the default port (22), the SSH_PORTproperty in $/oui/prov/resources/Paths.properties on onthe OMS host must be edited with the port.

    6- It is important thatEnterprise Managerobtains the correct timezone for each OracleManagement Agent.

    To set the time zone, as root, type:# export TZ='America/Los_Angeles'Note: Substitute 'America/Los_Angeles' with your time zone. Time zone detailsare located in the /usr/share/zoneinfo directory. For example, the time zoneexample above 'America/Los_Angeles' correspond to the /usr/share/zoneinf/America/Los_Angeles le, i.e. 'America/Los_Angeles'.The continental United States is divided into 4 time zones:Eastern Standard Time ( EST ) is the New York time zone, i.e. exportTZ='America/New_York'Central Standard Time ( CST ) is the Chicago time zone, i.e. export

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 9 of 41

  • TZ='America/Chicago'Mountain Standard Time ( MST ) is the Denver time zone, i.e. exportTZ='America/Denver'Pacic Standard Time ( PST ) is the Los Angeles time zone, i.e. exportTZ='America/Los_Angeles'

    7- /tmp directoryrequirements The /tmp directory must have 400 MB of free space.8- oraInventorydirectory requirements

    If any Oracle technologies are already installed on the host, conrm that theoraInventory directory is read write (rw) by the dba group.

    Once all of the above prerequisites have been met the Oracle Management agent can be installed.

    Setup the Named Credentials for the Oracle Management AgentInstalling UserA Named Credential with a user name and password for the Oracle Management Agent installing user isa Linux Host Patching prerequisite for the yum server RPM repository setup job, the Oracle ManagementAgent installation and for Linux patch jobs. A named credential is a target's user account authenticationinformation that is stored in Enterprise Manager and used in Cloud Control for running jobs. Once anamed credential is saved, Enterprise Manager users can run jobs using a named credential and neversee the named credential username and password. Named credentials can be created with a user nameand password and/or SSH keys. For Linux patch job, a named credentials with a user name and passwordis the minimum requirement.A named credential for the yum server RPM repository setup job as well as the Oracle ManagementAgent installation can be created in advance and selected while executing a job, or created on the ywhile executing a job. A best practice is to create named credentials in advance to limit and control thenumber of named credentials stored in Enterprise Manager. For example, a named credential created inadvance for the the Oracle Management Agent installing user can be reused an unlimited number of timefor patch jobs and agent deployments. Each time a named credential for the Oracle Management Agentinstalling user is created on the y, a new named credential is created and stored in Enterprise Manager.Note: The Oracle Management agent can be installed using a named credential with SSH Keys, althoughSSH Keys are not supported for patch jobs.To create a named credential, click Setup => Security => Named Credentials, as shown in Figure 1.

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 10 of 41

  • From the Named Credentials page, create a named credential for the Oracle Management Agentinstalling user. As shown in Figure 2, click the Create to access the Create Credential screen.

    As shown in Figure 3, from the Create Credential page, select the Global Scope option, and enter the followingproperties.General Properties:Credential name: Enter the user name of the Oracle Management Agent installing user. This is thename that is displayed in Cloud Control.Credential description: Enter an optional description.Authentication Target Type: Select Host from the drop down menu.Credential type: Select Host Credentials from the drop down menu.Scope: Select Global.Credentials Properties:UserName: Enter the user name of the Oracle Management Agent installing user.Password: Enter the password for the Oracle Management Agent installing user.Conrm Password: Enter the password for the Oracle Management Agent installing user.Run Privilege: Select Sudo and in the Run As text box enter root.

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 11 of 41

  • Click Test and Save.Figure 3

    From the Test options page, with Host selected in the Test Target Type click the search icon to accessthe Select Targets window.Figure 4

    From the Select Targets window, Search for a Linux host target by entering a host name in the TargetName or On Host text box and click Search, or select a Linux host from list. Once a Linux host isselected, click the Select button to proceed.Figure 5

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 12 of 41

  • From the Test options page shown in Figure 6, click the Click Test and Save button to test and save thenamed credential.Figure 6

    The named credential is now listed on the Named Credentials page.Figure 7

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 13 of 41

  • Oracle Management Agent Install using the Add Host TargetsWizardTo install the Management Agent on an unmanaged Linux host using the Add Host Targets Wizard,follow these steps:1. Log into Cloud Control as an EM_CLOUD_ADMINISTRATOR user.2. Click Setup => Add Target => Add Target Manually to navigate to the Add Targets Manuallypage.Figure 8

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 14 of 41

  • 3. From the Add Target Manually page, select the Add Host Targets option and click Add Host.Figure 9

    4. From the Add Host Targets: Host and Platform page, click + Add and + Manually to add a host.Tip: The DNS name entered in the Host texteld will be displayed in Cloud Control. The Host namecannot be edited after the Oracle Management Agent installation. The DNS long or short name can beentered in the Host texteld. If you have multiple domain names, consider using the long name to be ableto quickly identify hosts in Cloud Control by the domain name.Figure 10

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 15 of 41

  • 5. Next, enter the DNS long or short host name and select the platform from the dropdown list, i.e. Linuxx86-64. Repeat the process for each additional Linux host. Once all of the hosts are added to the AddTarget page, click Next to proceed.Figure 11

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 16 of 41

  • 6. From the Add Host Targets: Installation Details page enter the Installation Base Directory path(i.e. the $AGENT_HOME), click in the Instance directory text eld to auto-generate the InstanceDirectory path, select the Named Credential from the drop down list, or create a new NamedCredential on the y by clicking the + icon, accept the default port 3872, or clear the port led toenable automatic port selection. Click Next to proceed.Figure 12 shows the creation of a Named Credential.Figure 12

    Figure 13 shows selecting Named Credential.Figure 13

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 17 of 41

  • 7. Once all mandatory inputs have been entered correctly, click Next to proceed.Tip: The Mandatory Inputs icon will turn green once all of the details have been successfully entered.Figure 14

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 18 of 41

  • 8. From the Add Host Targets: Review screen, review entries and click Deploy Agent to proceed.Figure 15

    9. The Add Host Status window shows the progress of agent deployments. The agent deployment takesbetween 5 to 10 minutes.There are three agent deployment segments: Initialization details, Remote Prerequisite Check detailsand Agent Deployment details. Each segment can be tracked by clicking the Link under AgentDeployment Details. If any of the agent deployment segments fail, the failed segment will be displayedin the GUI. Resolve the problem and click Retry to rerun that segment.Figure 16

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 19 of 41

  • Click the Initialization Details link to view the Initialization Details.Figure 17 shows the Initialization Details.Figure 17

    Click the Remote Prerequisite Check Details link to view the Remote Prerequisite Check Details.Figure 18 shows the Remote Prerequisite Check Details.Figure 18

    Click the Agent Deployment Details link to view the Agent Deployment Details.Figure 19 shows the Agent Deployment Details.Figure 19

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 20 of 41

  • 10. Figure 20 shows the Agent Deployment Succeeded. Click Done.Figure 20

    11. Next, click Targets => Hosts to navigate to the Hosts page. Conrm that the hosts are listed on thepage.Figure xx shows the host was added.Figure 21

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 21 of 41

  • Oracle Management Agent Post Installation PrerequisitesNormal Host Credentials and Privileged Host Credentials for the Oracle Management Agent installinguser, and Privileged Delegation is a Linux Host Patching prerequisite. Once the Oracle ManagementAgent is installed on a Linux host, its Normal Host Credentials, Privileged Host Credentials and PrivilegeDelegation settings must be setup in Cloud Control for patch jobs.

    Setup Host Privileged DelegationCloud Control supports running Deployment Procedures such as Patch Linux Hosts and Linux RPMRepository server setup with elevated administrator privileges using sudo and PowerBroker. Withoutelevated administrator privileges, Deployment Procedure jobs will fail.Privilege Delegation is the Enterprise Manager framework that supports running Deployment Proceduresusing sudo and PowerBroker. All Enterprise Manager Deployment Procedures require administratorprivileges to run. Many of the Deployment Procedure steps can be run as a normal user, although thereare steps that require elevated administrator privileges.

    To setup Privileged Delegation for Linux host targets click Setup => Security => PrivilegedDelegation to access the Manage Privileged Delegation Settings page.Figure 22

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 22 of 41

  • From the Manage Privileged Delegation Settings page we can congure the Yum server and eachLinux host target by clicking the Edit icon, but we will use another method.Tip: Only one target can be congure at a time, however, a template can be created and applied tomultiple hosts.Figure 23

    From the Manage Privilege Delegation screen, click the Template tab and click Create.Figure 24

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 23 of 41

  • From the Create Template screen, select Type: Sudo from the dropdown and enter /usr/bin/sudo -u%RUNAS% %COMMAND% in the Sudo Command text box. Select Linux for the Default forPlatforms dropdown. Click Create to proceed.Figure 25

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 24 of 41

  • From the Conrmation screen, verify the new template creation.Figure 26

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 25 of 41

  • From the Manage Priviledge Delegation screen, select all the hosts you wish to apply the newtemplate to. Click Apply Template to proceed.Figure 27

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 26 of 41

  • From the Apply Template screen, Select the Template Name from the dropdown. Click OK to proceed.Figure 28

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 27 of 41

  • From the Conrmation screen, validate the template has been applied to selected hosts.Figure 29

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 28 of 41

  • Once you refresh the screen, you will see the Command column updated for the hosts for which thetemplate was applied.Figure 30

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 29 of 41

  • Setup Preferred CredentialsPreferred credentials simplify access to targets by saving login credentials in Enterprise Manager. Oncepreferred credentials are saved, administrators can run jobs using preferred credentials without havingto enter login credentials. Both Normal Host Credentials and Privileged Host Credentials for the OracleManagement Agent installing user account must be setup for Linux Host Patching.Tip: Preferred credentials are congured on a per user basis.Setup => Security => Preferred CredentialsFigure 31

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 30 of 41

  • From the Preferred Credentials page click the Host Target Type, then click Manage Preferred Credentialsto access the Host Preferred Credentials page.Figure 32

    From the Host Preferred Credentials page select one or more Linux host target and click Set.Figure 33

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 31 of 41

  • From the Select Named Credential window, select the Oracle Management Agent installing useraccount from the drop down menu, then click Save.Note: In the example, the Named Credential was created in advance using the Oracle Management Agent installing useroma. Change "oma" with your installer user account Named Credential.Figure 34

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 32 of 41

  • From the Host Preferred Credentials page confirm that the Linux host targets Normal Host Credentials andPrivileged Host Credentials are set.Figure 35

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 33 of 41

  • Oracle Management Agent Deinstallation OptionsThe ability to quickly and cleanly remove the Oracle Management Agent is an essential EnterpriseManager lifecycle operation. There are ve Oracle Management Agent deinstallation options. This sectionof the Oracle Cloud Cookbook covers the AgentDeinstall.pl option.The AgentDeinstall.pl script is a quick and ecient way to remove the Oracle Management Agent. TheAgentDeinstall.pl script removes the Oracle Management Agent from the host, but does not delete thetarget in Cloud Control. If the intent is to decommission a target, after a successful Oracle ManagementAgent deinstallation, delete the agent then the target manually from Cloud Control. If the target wasdeinstalled with the intent to reinstall, its not necessary to delete the agent or target from Cloud Control.

    Agent DeinstallationMethod Description

    Graphical mode using theInstaller

    Invoke the installer from the Management Agent home and deinstall theagent using the GUI.Note: Oracle Support recommends deinstalling the agent using graphicalmode. Graphical mode is error prone and only an option if no other Oracleproducts are installed on the host.

    Silent Mode using theInstaller

    The silent agent deinstallation using the Installer is a multi step process. Itsnecessary to run the Installer against the $AGENT_HOME, $SBIN_HOME,$AGENT_HOME, followed by deleting the base directory.

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 34 of 41

  • Silent Mode using theAgentDeinstall.pl script

    The silent agent deinstallation using the AgentDeinstall.pl script is a simpleone step one line command.

    RPM le Removing the agent with the RPM le is a snap rpm -e

    Brute ForceStop the Agent and delete the agent home.Note: If there are multiple Oracle products installed on the host, theinventory.xml le will need to be edited and all agent entries must beremoved.

    Deinstall Oracle Management Agent 12.1.0.4.0

    Before deinstalling the Oracle Management Agent, complete tasks 1 and 2 below:

    1. As the Oracle Management Agent installing user, check the status of the Oracle Management Agent by typing/bin/emctl status agent. If the agent is running, the Agent Home and Agent Binaries paths will be listed in theoutput. The Agent Home and the Agent Binaries paths must be known to deinstall the agent. If you need help locating the emctllocation, use the which or locate commands.

    $ which emctl/u01/app/oracle/product/agent_inst/bin/emct.l[oma@sgd-uhura ~]$ /u01/app/oracle/product/agent_inst/bin/emctl status agentOracle Enterprise Manager Cloud Control 12c Release 4Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.---------------------------------------------------------------Agent Version : 12.1.0.4.0OMS Version : 12.1.0.4.0Protocol Version : 12.1.0.1.0Agent Home : /u01/app/oracle/product/agent_instAgent Log Directory : /u01/app/oracle/product/agent_inst/sysman/logAgent Binaries : /u01/app/oracle/product/core/12.1.0.4.0Agent Process ID : 2998Parent Process ID : 2949Agent URL : https://sgd-uhura:3872/emd/main/Local Agent URL in NAT : https://sgd-uhura:3872/emd/main/Repository URL : https://oem-sarek.local.mokumsolutions.com:4903/empbs/uploadStarted at : 2014-06-23 09:34:53Started by user : omaOperating System : Linux version 2.6.39-400.109.6.el6uek.x86_64 (amd64)Last Reload : (none)Last successful upload : 2014-06-27 11:27:48Last attempted upload : 2014-06-27 11:27:48Total Megabytes of XML les uploaded so far : 1.9Number of XML les pending upload : 0Size of XML les pending upload(MB) : 0Available disk space on upload lesystem : 64.25%Collection Status : Collections enabledHeartbeat Status : OkLast attempted heartbeat to OMS : 2014-06-27 11:32:54Last successful heartbeat to OMS : 2014-06-27 11:32:54Next scheduled heartbeat to OMS : 2014-06-27 11:33:54

    ---------------------------------------------------------------Agent is Running and Ready

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 35 of 41

  • The Agent Home path is : /u01/app/oracle/product/agent_inst and the Agent Binaries path is /u01/app/oracle/product/core/12.1.0.4.0.2. As the Oracle Management Agent installing user, shut down Oracle Management Agent by typing /bin/emctlstop agent$ /u01/app/oracle/product/core/12.1.0.4.0/bin/emctl stop agentOracle Enterprise Manager Cloud Control 12c Release 4 Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved.Stopping agent ..... stopped.

    In the above example, oma is the installing user. Change "oma" with your installer user account name.In the above example, the agent home ($AGENT_HOME) is /u01/app/oracle/product/agent_inst. Change the above$AGENT_HOME with your $AGENT_HOME.

    We can now deinstall the Oracle Management Agent.Deinstall the Oracle Management Agent in Silent Mode Using AgentDeinstall.pl script. /perl/bin/perl/sysman/install/AgentDeinstall.pl -agentHome

    For example, as the Oracle Management Agent installing user type the following command to deinstall the Oracle ManagementAgent:$ /u01/app/oracle/product/core/12.1.0.4.0/perl/bin/perl /u01/app/oracle/product/core/12.1.0.4.0/sysman/install/AgentDeinstall.pl-agentHome /u01/app/oracle/product/core/12.1.0.4.0/

    Agent Oracle Home: /u01/app/oracle/product/core/12.1.0.4.0

    agentHome = /u01/app/oracle/product/core/12.1.0.4.0

    NOTE: The agent base directory: /u01/app/oracle/product will be removed after successful deinstallation of agent home.

    DetachHome Command executed:/u01/app/oracle/product/core/12.1.0.4.0/oui/bin/runInstaller -detachHome -force -depHomesOnly-silent ORACLE_HOME=/u01/app/oracle/product/core/12.1.0.4.0 -waitForCompletion -invPtrLoc /u01/app/oracle/product/core/12.1.0.4.0/oraInst.locStarting Oracle Universal Installer...

    Checking swap space: must be greater than 500 MB. Actual 3600 MB PassedThe inventory pointer is located at /u01/app/oracle/product/core/12.1.0.4.0/oraInst.loc'DetachHome' was successful.Starting Oracle Universal Installer...

    Checking swap space: must be greater than 500 MB. Actual 3600 MB PassedThe inventory pointer is located at /u01/app/oracle/product/core/12.1.0.4.0/oraInst.locThe Oracle home '/u01/app/oracle/product/sbin' could not be updated as it does not exist.

    Deinstall Command executed:/u01/app/oracle/product/core/12.1.0.4.0/oui/bin/runInstaller -deinstall -silent"REMOVE_HOMES={/u01/app/oracle/product/core/12.1.0.4.0}" -waitForCompletion -removeAllFiles -invPtrLoc /u01/app/oracle/product/core/12.1.0.4.0/oraInst.locStarting Oracle Universal Installer...

    Checking swap space: must be greater than 500 MB. Actual 3600 MB PassedPreparing to launch Oracle Universal Installer from /tmp/OraInstall2014-06-27_11-38-54AM. Please wait ...Oracle UniversalInstaller, Version 11.1.0.12.0ProductionCopyright (C) 1999, 2014, Oracle. All rights reserved.

    Starting deinstall

    Deinstall in progress (Friday, June 27, 2014 11:39:00 AM PDT)Conguration assistant "Agent Deinstall Assistant" succeeded

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 36 of 41

  • ............................................................... 100% Done.

    Deinstall successful

    End of install phases.(Friday, June 27, 2014 11:39:08 AM PDT)End of deinstallationsPlease check '/u01/app/oraInventory/logs/silentInstall2014-06-27_11-38-54AM.log' for more details.NOTE: The targets monitored by this Management Agent will not be deleted in the Enterprise Manager Repository by this deinstallscript. Make sure to delete the targets manually from the Cloud Control Console for a successful deinstallation.

    Deinstall Oracle Management Agent 12.1.0.3.0Before deinstalling the Oracle Management Agent, complete the following tasks:1. As the Oracle Management Agent installing user, check the status of the Oracle Management Agent bytyping $/bin/emctl status agent. If the agent is running, "emctl status agent" will listthe Agent Home and the Agent Binaries paths. The Agent Home and the Agent Binaries paths mustbe known to deinstall the agent.

    In the example, oma is the installing user. Change "oma" with your installer user account name.In the example, the agent home ($AGENT_HOME) is /u01/app/oracle/product/agent_inst. Change theabove $AGENT_HOME with your $AGENT_HOME.

    $ /u01/app/oracle/product/agent_inst/bin/emctl status agentOracle Enterprise Manager Cloud Control 12c Release 3 Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.---------------------------------------------------------------Agent Version : 12.1.0.3.0OMS Version : 12.1.0.3.0Protocol Version : 12.1.0.1.0Agent Home : /u01/app/oracle/product/agent/agent_instAgent Binaries : /u01/app/oracle/product/agent/core/12.1.0.3.0Agent Process ID : 10367Parent Process ID : 10218Agent URL : https://snort-vash.sf.mokum.com:3872/emd/main/Repository URL : https://oem-tuvok.sf.mokum:4903/empbs/uploadStarted at : 2014-01-22 05:40:55Started by user : oraagentLast Reload : (none)Last successful upload : 2014-01-22 10:02:57Last attempted upload : 2014-01-22 10:02:57Total Megabytes of XML les uploaded so far : 0.34Number of XML les pending upload : 0Size of XML les pending upload(MB) : 0Available disk space on upload lesystem : 99.22%Collection Status : Collections enabledHeartbeat Status : OkLast attempted heartbeat to OMS : 2014-01-22 10:06:04Last successful heartbeat to OMS : 2014-01-22 10:06:04Next scheduled heartbeat to OMS : 2014-01-22 10:07:04---------------------------------------------------------------Agent is Running and ReadyThe Agent Home path is /u01/app/oracle/product/agent_inst and the Agent Binaries path is /u01/app/oracle/product/core/12.1.0.2.0.2. As the Oracle Management Agent installing user, shut down Oracle Management Agent by typing

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 37 of 41

  • $/bin/emctl stop agent.$ ./emctl stop agentOracle Enterprise Manager Cloud Control 12c Release 3 Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.Stopping agent ..... stopped.

    In the above example, oma is the installing user. Change "oma" with your installer user accountname.In the above example, the agent home ($AGENT_HOME) is /u01/app/oracle/product/agent_inst.Change the above $AGENT_HOME with your $AGENT_HOME.

    3. Next, deinstall the Oracle Management Agent in Silent Mode Using AgentDeinstall.pl Script byinvoking the AgentDeinstall.pl script:$/perl/bin/perl /sysman/install/AgentDeinstall.pl -agentHome For example, as the Oracle Management Agent installing user type the following command to deinstallthe Oracle Management Agent:$ /u01/app/oracle/product/agent/core/12.1.0.3.0/perl/bin/perl /u01/app/oracle/product/agent/core/12.1.0.3.0/sysman/install/AgentDeinstall.pl -agentHome /u01/app/oracle/product/agent/core/12.1.0.3.0

    Agent Oracle Home: /u01/app/oracle/product/agent/core/12.1.0.3.0

    NOTE: The agent base directory: /u01/app/oracle/product/agent will be removed after successfuldeinstallation of agent home.

    DetachHome Command executed:/u01/app/oracle/product/agent/core/12.1.0.3.0/oui/bin/runInstaller-detachHome -force -depHomesOnly -silent ORACLE_HOME=/u01/app/oracle/product/agent/core/12.1.0.3.0 -waitForCompletion -invPtrLoc /u01/app/oracle/product/agent/core/12.1.0.3.0/oraInst.locStarting Oracle Universal Installer...Checking swap space: must be greater than 500 MB. Actual 1027 MB PassedThe inventory pointer is located at /u01/app/oracle/product/agent/core/12.1.0.3.0/oraInst.loc'DetachHome' was successful.Starting Oracle Universal Installer...Checking swap space: must be greater than 500 MB. Actual 1027 MB PassedThe inventory pointer is located at /u01/app/oracle/product/agent/core/12.1.0.3.0/oraInst.locThe Oracle home '/u01/app/oracle/product/agent/sbin' could not be updated as it does not exist.

    Deinstall Command executed:/u01/app/oracle/product/agent/core/12.1.0.3.0/oui/bin/runInstaller -deinstall-silent "REMOVE_HOMES={/u01/app/oracle/product/agent/core/12.1.0.3.0}" -waitForCompletion-removeAllFiles -invPtrLoc /u01/app/oracle/product/agent/core/12.1.0.3.0/oraInst.locStarting Oracle Universal Installer...Checking swap space: must be greater than 500 MB. Actual 1027 MB PassedPreparing to launch Oracle Universal Installer from /tmp/OraInstall2014-01-22_10-07-57AM. Please wait...Oracle Universal Installer, Version 11.1.0.11.0 ProductionCopyright (C) 1999, 2013, Oracle. All rights reserved.Starting deinstall

    Deinstall in progress (Wednesday, January 22, 2014 10:08:01 AM CST)Conguration assistant "Agent Deinstall Assistant" succeeded

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 38 of 41

  • ............................................................... 100% Done.Deinstall successfulEnd of install phases.(Wednesday, January 22, 2014 10:08:30 AM CST)End of deinstallationsPlease check '/u01/app/oraInventory/logs/silentInstall2014-01-22_10-07-57AM.log' for more details.Do you want us to delete the old oracle home [yes/no] :yesNOTE: The targets monitored by this Management Agent will not be deleted in the Enterprise ManagerRepository by this deinstall script. Make sure to delete the targets manually from the Cloud ControlConsole for a successful deinstallation.

    Deinstall Oracle Management Agent 12.1.0.2.0

    Before deinstalling the Oracle Management Agent, complete the following tasks:1. As the Oracle Management Agent installing user, check the status of the Oracle Management Agent bytyping $/bin/emctl status agent. If the agent is running, "emctl status agent" will listthe Agent Home and the Agent Binaries paths. The Agent Home and the Agent Binaries paths mustbe known to deinstall the agent.

    In the example, oma is the installing user. Change "oma" with your installer user account name.In the example, the agent home ($AGENT_HOME) is /u01/app/oracle/product/agent_inst. Change theabove $AGENT_HOME with your $AGENT_HOME.

    $ /u01/app/oracle/product/agent_inst/bin/emctl status agentOracle Enterprise Manager Cloud Control 12c Release 2 Copyright (c) 1996, 2012 Oracle Corporation. All rights reserved.---------------------------------------------------------------Agent Version : 12.1.0.2.0OMS Version : 12.1.0.2.0Protocol Version : 12.1.0.1.0Agent Home : /u01/app/oracle/product/agent_instAgent Binaries : /u01/app/oracle/product/core/12.1.0.2.0Agent Process ID : 1437Parent Process ID : 1397Agent URL : https://snort-vash.sf.mokum.com:3872/emd/main/Repository URL : https://oem-tuvok.sf.mokum.com:4900/empbs/uploadStarted at : 2012-12-01 07:22:39Started by user : oracleLast Reload : (none)Last successful upload : 2012-12-01 08:03:09Last attempted upload : 2012-12-01 08:03:09Total Megabytes of XML les uploaded so far : 0.03Number of XML les pending upload : 0Size of XML les pending upload(MB) : 0Available disk space on upload lesystem : 79.03%Collection Status : Collections enabledHeartbeat Status : OkLast attempted heartbeat to OMS : 2012-12-01 08:03:06Last successful heartbeat to OMS : 2012-12-01 08:03:06Next scheduled heartbeat to OMS : 2012-12-01 08:04:06

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 39 of 41

  • ---------------------------------------------------------------Agent is Running and Ready

    The Agent Home path is /u01/app/oracle/product/agent_inst and the Agent Binaries path is /u01/app/oracle/product/core/12.1.0.2.0.

    2. As the Oracle Management Agent installing user, shut down Oracle Management Agent by typing $/bin/emctlstop agent.i.e. /u01/app/oracle/product/agent_inst/bin/emctl stop agent

    In the above example, oma is the installing user. Change "oma" with your installer user accountname.In the above example, the agent home ($AGENT_HOME) is /u01/app/oracle/product/agent_inst.Change the above $AGENT_HOME with your $AGENT_HOME.

    3. Next, deinstall the Oracle Management Agent in Silent Mode Using AgentDeinstall.pl Script by invoking the AgentDeinstall.plscript:$/perl/bin/perl /sysman/install/AgentDeinstall.pl -agentHome

    For example, as the Oracle Management Agent installing user type the following command to deinstall the Oracle ManagementAgent:$ /u01/app/oracle/product/core/12.1.0.2.0/perl/bin/perl /u01/app/oracle/product/core/12.1.0.2.0/sysman/install/AgentDeinstall.pl-agentHome /u01/app/oracle/product/core/12.1.0.2.0

    Agent Oracle Home: /u01/app/oracle/product/core/12.1.0.2.0

    NOTE: The agent base directory: /u01/app/oracle/product will be removed after successful deinstallation of agent home.

    DetachHome Command executed:/u01/app/oracle/product/core/12.1.0.2.0/oui/bin/runInstaller -detachHome -force -depHomesOnly-silent ORACLE_HOME=/u01/app/oracle/product/core/12.1.0.2.0 -waitForCompletion -invPtrLoc /u01/app/oracle/product/core/12.1.0.2.0/oraInst.locStarting Oracle Universal Installer...

    Checking swap space: must be greater than 500 MB. Actual 2376 MB PassedThe inventory pointer is located at /u01/app/oracle/product/core/12.1.0.2.0/oraInst.locThe inventory is located at /u01/app/oraInventory'DetachHome' was successful.Starting Oracle Universal Installer...

    Checking swap space: must be greater than 500 MB. Actual 2376 MB PassedThe inventory pointer is located at /u01/app/oracle/product/core/12.1.0.2.0/oraInst.locThe inventory is located at /u01/app/oraInventory'DetachHome' failed.

    Deinstall Command executed:/u01/app/oracle/product/core/12.1.0.2.0/oui/bin/runInstaller -deinstall -silent "REMOVE_HOMES={/u01/app/oracle/product/core/12.1.0.2.0}" -waitForCompletion -removeAllFiles -invPtrLoc /u01/app/oracle/product/core/12.1.0.2.0/oraInst.locStarting Oracle Universal Installer...

    Checking swap space: must be greater than 500 MB. Actual 2376 MB PassedPreparing to launch Oracle Universal Installer from /tmp/OraInstall2012-12-01_07-45-42AM. Please wait ...Oracle UniversalInstaller, Version 11.1.0.9.0 ProductionCopyright (C) 1999, 2012, Oracle. All rights reserved.

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 40 of 41

  • Starting deinstall

    Deinstall in progress (Saturday, December 1, 2012 7:46:16 AM PST)Conguration assistant "Agent Deinstall Assistant" succeeded............................................................... 100% Done.

    Deinstall successful

    End of install phases.(Saturday, December 1, 2012 7:47:01 AM PST)End of deinstallationsPlease check '/u01/app/oraInventory/logs/silentInstall2012-12-01_07-45-42AM.log' for more details.

    NOTE: The targets monitored by this Management Agent will not be deleted in the Enterprise Manager Repository by this deinstallscript. Make sure to delete the targets manually from the Cloud Control Console for a successful deinstallation.

    http://mokumsolutions.com

    Mokum Solutions, Inc. +1 415 252-9164 41 of 41