Preview only show first 10 pages with watermark. For full document please download

Oracle Enterprise Manager 12c Agent Installation Guide

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

   EMBED

  • Rating

  • Date

    December 1969
  • Size

    1.6MB
  • Views

    729
  • Categories


Share

Transcript

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] 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.com or call 1 415 252 9164 About the Author The 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 world’s largest and most complex Oracle private clouds. Before establishing Mokum in March 2011, Roddy spent three years at Oracle on the Oracle VM and 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. Rodstein’s rich background and knowledge, there can be no better resource for revealing the Oracle Cloud recipe. Audience The Oracle Cloud Cookbook is a comprehensive, field tested reference design that guides you through each step to move to your Oracle software portfolio to an elastic Oracle 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. http://mokumsolutions.com Last update: 11/24/14 This document applies to Oracle Enterprise Manager 12c Release 1 and above, with Oracle Linux and Red Hat Enterprise Linux 5 and 6 host targets. Table of Contents Oracle Management Agent Installation Options Linux Prerequisites for the Oracle Management Agent installation Setup the Named Credentials for the Oracle Management Agent Installing User Oracle Management Agent Install using the Add Host Targets Wizard Oracle Management Agent Post Installation Prerequisites Setup Host Privileged Delegation Setup Preferred Credentials Oracle Management Agent Deinstallaion Options Deinstall Oracle Management Agent 12.1.0.4.0 Deinstall Oracle Management Agent 12.1.0.3.0 Deinstall Oracle Management Agent 12.1.0.2.0 Change Log Revision Change Description Updated By Date 1 Document Creation Roddy Rodstein 01/14/14 2 Document Update with 12c R4 information Roddy Rodstein 11/24/14 Oracle Management Agent Installation Options The 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 managed hosts which are managed via Cloud Control. With Oracle Enterprise Manager 12c there are three Oracle Management Agent installation options. This chapter of the Oracle Cloud Cookbook covers Oracle's recommended option, the Add Host Targets Wizard. Table 1 shows the three Oracle Management Agent installation options. Agent Installation Option The Add Host Targets Wizard Explanation The Add Host Targets Wizard automatically installs the agent from Cloud Control without any post installation steps. Note: Oracle recommends using the Add Host Targets Wizard. Silent Agent Installation MOS ID 1360083.1 The silent agent installation uses a response file installation which automates the agent installation with two manual post installation steps. The manual post installation steps include running the root.sh scripts along with “emctl secure agent”. Mokum Solutions, Inc. +1 415 252-9164 4 of 41 http://mokumsolutions.com RPM Installation MOS ID 1363031.1 The agent RPM installation is a single agent RPM installation with two manual post installation steps. The manual post installation steps include editing the properties file: /usr/lib/oracle/agent/agent.properties with the correct values, then executing the /etc/init.d/config.pl command. Linux Prerequisites for the Oracle Management Agent installation The Oracle Management Agent (OMA) is a core Oracle Enterprise Manager component. The Oracle Management Agent can be installed on unmanaged Oracle Linux, Red Hat Enterprise Linux and SuSE Linux hosts to convert them to managed hosts that are centrally managed via Cloud Control. There are numerous prerequisites that must be met before an Oracle Management Agent can be installed on an unmanaged Linux host. Each of the prerequisites in Table 2 must be completed before the Oracle Management agent is installed. Table 2 shows the Oracle Management Agent installation prerequisites. Prerequisite Description 1- Sudo as root must be configured for several commands for the Oracle Management Agent installing user in the /etc/sudoers file. Pre-installation Sudo Prerequisites: Option A: 1) As root type "visudo", or edit the /etc/sudoers file using your favorite text editor to a dd an entry for the Oracle Management Agent installing user. The next example shows the required entry for the Oracle Management Agent installing user: oma ALL = NOPASSWD: ALL In the above example, oma is the installing user. Change "oma" with your Oracle Enterprise installer user account name. Manager uses a In the above example, the agent home ($AGENT_HOME) is /u01/app trust-based security /oracle/product/agent_inst. Change the above $AGENT_HOME with your model to execute $AGENT_HOME. trusted, elevated jobs In the above example, the agent base ($AGENT_BASE) is /u01/app/oracle using sudo. The Oracle /product/core/12.1.0.2.0/. Change the above $AGENT_BASE with your Management Agent $AGENT_BASE. uses the nmosudo executable to run trusted/elevated jobs. If 2) Next, change the following two /etc/sudoers entries: the Job credentials do 1) Change: not have sudo settings, Defaults !visiblepw then the Job is executed to: without the nmosudo. 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 and uncomment the "wheel ALL=(ALL) NOPASSWD: ALL" line in the /etc/sudoer file. To add the Oracle Management Agent installing user to the the wheel Mokum Solutions, Inc. +1 415 252-9164 5 of 41 http://mokumsolutions.com group, as root, type: # useradd -G wheel oma In the above example, oma is the installing user. Change "oma" with your installer user account name. As root type "visudo", or edit the /etc/sudoers file using your favorite text editor, and uncomment the the following line: Change: # wheel ALL=(ALL) NOPASSWD: ALL to 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 modifications to allow sudo with NOPASSWD to work with up2date: rm -fr /usr/bin/up2date ln -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 property to true in the $/sysman/prov/agentpush/agentpush.properties file. If your unable to set the oracle.sysman.prov.agentpush.enablePty property to true in the $/sysman/prov/agentpush/agentpush.properties file, the following two settings must be made in each linux host's /etc/sudoers file. 2- $ORACLE_BASE and $AGENT_HOME Directories: The Oracle base directory ($ORACLE_BASE) is the top-level directory for Oracle software installations. The agent home directory $ORACLE_BASE and $AGENT_HOME Requirements: 1. 2. 3. 4. 5. The The The The The agent home directory must be empty and should have 4GB of space. agent home directory name cannot contain any spaces. installing user must own the agent home directory. installing user or the root user must own all the parent directories. root user must own the root directory. If the $AGENT_HOME is /u01/app/oracle/product/agent_inst, and oma is the installing user, then the /u01/app/oracle/product/agent_inst directory must be owned by oma. If the $ORACLE_BASE is /u01/app/oracle/product/, and oma is the installing user, then the /u01/app/oracle/product/ directory must be owned by the oma Mokum Solutions, Inc. +1 415 252-9164 6 of 41 http://mokumsolutions.com ($ORACLE_HOME) is the directory where the Oracle Management Agent software is installed. The Optimal Flexible Architecture (OFA) standard is a set of file naming recommendations for managing Oracle installations. The Optimal Flexible Architecture standard offers mount point, directory, and file-naming conventions that work with the Oracle Universal Installer. The Optimal Flexible Architecture includes where to install each part of each Oracle product including the storage of the applications and the data. user, and the root directory /u01 must be owned by the root user. Note: When installing the Oracle Management Agent using Cloud Control's Add 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 To create the directories for Oracle software installation using the Optimal Flexible Architecture standard, as root, type the following commands. # mkdir -p /u01/app/oracle /product/ # chown oma:dba /u01/app /oracle/product 3- This section lists the Oracle Management Agent RPM package prerequisites for Oracle and Red Hat Enterprise Linux 5.x and 6.x. Tip: The oracle-em-agent12cR1-preinstall (use for Oracle Management Agent R1 through R3), and oracle-em-agent-12cR4preinstall (use for Oracle Management Agent R4) RPMs simplifies meeting the software and system configuration prerequisites for installing the Enterprise Manager agent (Oracle Management Agent (OMA)) on Oracle Linux 5, 6, and 7. Installing the oracleem-agent preinstall RPM automatically installs all of the software RPM prerequisites for the Oracle Management Agent, as well as meeting the system configuration prerequisites, such as creating an oracle user and the oinstall and dba groups, configuring the sysctl.conf To install the oracle-em-agent preinstall RPM from the Oracle public yum repository, as root type the following commands: # cd /etc/yum.repos.d # wget http://public-yum.oracle.com/public-yum-ol6.repo Next, using you favorite text editor edit the public-yum-ol6.repo file and enable the addons channel. 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-oracle gpgcheck=1 enabled=0 to: [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-oracle gpgcheck=1 enabled=1 Note: If you allready installed the oracle-rdbms-server preinstall RPM, there is no need to install the oracle-em-agent preinstall RPM Now we can install the oracle-ebs-server-R12-preinstall RPM as shown in the next example. Mokum Solutions, Inc. +1 415 252-9164 7 of 41 http://mokumsolutions.com settings, system startup parameters, user limits, and driver parameters. The Oracle Management Agent RPM is available in the Oracle Unbreakable Linux Network addons channel and from the Oracle public yum repository addons channel. Install the oracle-em-agent-12cR4-preinstall RPM package for Oracle Management Agent R4: # yum install oracle-em-agent-12cR4-preinstall -y Install the oracle-em-agent-12cR1-preinstall RPM package for Oracle Management Agent R1 through R3: # yum install oracle-em-agent-12cR1-preinstall -y If you elect not to use the oracle-em-agent preinstall RPM to meet the RPM prerequisites, confirm 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 glibc libstdc++ setarch rng-utils libXtst Oracle & Red Hat Linux 6.x 64-bit # rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" make binutils gcc libaio glibccommon libstdc++ sysstat glibc-devel The above commands lists each of the queried RPM packages installed on the system. The 32-bit RPMs are appended with (i386) or (i686), and the 64-bit RPMs are appended with (x86_64). From any ULN registered Linux host, install any of the missing RPMs by typing "yum install package-name". To install 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-name Oracle & 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 make-3.81 binutils-2.17.50.0.6 gcc -4.1.1 libaio-0.3.106 glibc-common-2.3.4 libstdc++ -4.1.1 setarch-1.6 sysstat-5.0.5 rng-utils-2.0 libXtst-1.0.1-3.1(x86_64) xorg-x11-utils (Required only for GUI installations) Oracle & Red Hat Linux 6.x 64-bit make-3.81 binutils-2.17.50.0.6 gcc-4.1.1 libaio-0.3.106 glibc-common-2.3.4 libstdc++-4.1.1 sysstat-5.0.5 glibc-devel-2.5-49-i686 (This is a 32-bit package) glibc-devel-2.5-49-x86_64 (This is a 64-bit package) (Only for Oracle Linux 6.2) glibc2.12-1.47.0.2 Oracle & Red Hat Linux 5.x 32-bit Oracle & Red Hat Linux 6.x 32-bit make-3.81 binutils-2.17.50.0.6 gcc-4.1.1 libaio-0.3.106 glibc-common-2.3.4 compat-libstdc++296-2.96 libstdc++ 4.1.1 make-3.81 binutils-2.17.50.0.6 gcc-4.1.1 libaio-0.3.106 glibc-common-2.3.4 compat-libstdc++296-2.96 libstdc++ 4.1.1 Mokum Solutions, Inc. +1 415 252-9164 8 of 41 http://mokumsolutions.com libstdc++devel-4.1.0 setarch-1.6 sysstat-5.0.5 compat-db 4.1.25 rng-utils-2.0 libXtst-1.0.1-3.1(i386) xorg-x11-utils (Required only for GUI installations) 4- /etc/hosts requirements Oracle technology products, including Oracle Enterprise Manager, rely on a properly formatted /etc/hosts file which allows the host to be pingable, with long and short host names. The host name in the /etc/hosts file must be associated with the server's public IP address. 5- The Secure Shell (SSH) provides the connectivity between the Oracle Management Service (OMS) and Oracle Management Agents for jobs and deployment procedures. libstdc++devel-4.1.0 setarch-1.6 sysstat-5.0.5 compat-db 4.1.25 xorg-x11-utils (Required only for GUI installations) The next example shows the proper syntax from a /etc/hosts file. Note that the localhost entries are on one line, and the IP address with the long and short names are on the next line. 127.0.0.1 localhost.localdomain localhost 192.168.4.8 servername.com servername The /etc/hosts file can be edited by the root user by typing “vi /etc/hosts”. Tip: The following IPv6 entries in Oracle Linux 5 & 6 /etc/hosts files should be removed to avoid "Bug 13652664 : AGENT DEPLOY FAILS WITH AGENT PORT PASSED BY USER IS BUSY" with Oracle Management Agent installations: ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 If the SSH daemon is not running on the default port (22), the SSH_PORT property in $/oui/prov/resources/Paths.properties on on the OMS host must be edited with the port. All of the Linux hosts targets must use the same SSH port. 6- It is important that Enterprise Manager obtains the correct time zone for each Oracle Management 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 details are located in the /usr/share/zoneinfo directory. For example, the time zone example above 'America/Los_Angeles' correspond to the /usr/share/zoneinf /America/Los_Angeles file, 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. export TZ='America/New_York' Central Standard Time ( CST ) is the Chicago time zone, i.e. export Mokum Solutions, Inc. +1 415 252-9164 9 of 41 http://mokumsolutions.com TZ='America/Chicago' Mountain Standard Time ( MST ) is the Denver time zone, i.e. export TZ='America/Denver' Pacific Standard Time ( PST ) is the Los Angeles time zone, i.e. export TZ='America/Los_Angeles' 7- /tmp directory requirements The /tmp directory must have 400 MB of free space. 8- oraInventory directory requirements If any Oracle technologies are already installed on the host, confirm that the oraInventory 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 Agent Installing User A Named Credential with a user name and password for the Oracle Management Agent installing user is a Linux Host Patching prerequisite for the yum server RPM repository setup job, the Oracle Management Agent installation and for Linux patch jobs. A named credential is a target's user account authentication information that is stored in Enterprise Manager and used in Cloud Control for running jobs. Once a named credential is saved, Enterprise Manager users can run jobs using a named credential and never see the named credential username and password. Named credentials can be created with a user name and password and/or SSH keys. For Linux patch job, a named credentials with a user name and password is the minimum requirement. A named credential for the yum server RPM repository setup job as well as the Oracle Management Agent installation can be created in advance and selected while executing a job, or created on the fly while executing a job. A best practice is to create named credentials in advance to limit and control the number of named credentials stored in Enterprise Manager. For example, a named credential created in advance for the the Oracle Management Agent installing user can be reused an unlimited number of time for patch jobs and agent deployments. Each time a named credential for the Oracle Management Agent installing user is created on the fly, 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, although SSH Keys are not supported for patch jobs. To create a named credential, click Setup => Security => Named Credentials, as shown in Figure 1. Mokum Solutions, Inc. +1 415 252-9164 10 of 41 http://mokumsolutions.com From the Named Credentials page, create a named credential for the Oracle Management Agent installing 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 following properties. General Properties: Credential name: Enter the user name of the Oracle Management Agent installing user. This is the name 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. Confirm Password: Enter the password for the Oracle Management Agent installing user. Run Privilege: Select Sudo and in the Run As text box enter root. Mokum Solutions, Inc. +1 415 252-9164 11 of 41 http://mokumsolutions.com Click Test and Save. Figure 3 From the Test options page, with Host selected in the Test Target Type click the search icon to access the Select Targets window. Figure 4 From the Select Targets window, Search for a Linux host target by entering a host name in the Target Name or On Host text box and click Search, or select a Linux host from list. Once a Linux host is selected, click the Select button to proceed. Figure 5 Mokum Solutions, Inc. +1 415 252-9164 12 of 41 http://mokumsolutions.com From the Test options page shown in Figure 6, click the Click Test and Save button to test and save the named credential. Figure 6 The named credential is now listed on the Named Credentials page. Figure 7 Mokum Solutions, Inc. +1 415 252-9164 13 of 41 http://mokumsolutions.com Oracle Management Agent Install using the Add Host Targets Wizard To 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 Manually page. Figure 8 Mokum Solutions, Inc. +1 415 252-9164 14 of 41 http://mokumsolutions.com 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 textfield will be displayed in Cloud Control. The Host name cannot be edited after the Oracle Management Agent installation. The DNS long or short name can be entered in the Host textfield. If you have multiple domain names, consider using the long name to be able to quickly identify hosts in Cloud Control by the domain name. Figure 10 Mokum Solutions, Inc. +1 415 252-9164 15 of 41 http://mokumsolutions.com 5. Next, enter the DNS long or short host name and select the platform from the dropdown list, i.e. Linux x86-64. Repeat the process for each additional Linux host. Once all of the hosts are added to the Add Target page, click Next to proceed. Figure 11 Mokum Solutions, Inc. +1 415 252-9164 16 of 41 http://mokumsolutions.com 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 field to auto-generate the Instance Directory path, select the Named Credential from the drop down list, or create a new Named Credential on the fly by clicking the + icon, accept the default port 3872, or clear the port filed to enable 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 Mokum Solutions, Inc. +1 415 252-9164 17 of 41 http://mokumsolutions.com 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 Mokum Solutions, Inc. +1 415 252-9164 18 of 41 http://mokumsolutions.com 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 takes between 5 to 10 minutes. There are three agent deployment segments: Initialization details, Remote Prerequisite Check details and Agent Deployment details. Each segment can be tracked by clicking the Link under Agent Deployment Details. If any of the agent deployment segments fail, the failed segment will be displayed in the GUI. Resolve the problem and click Retry to rerun that segment. Figure 16 Mokum Solutions, Inc. +1 415 252-9164 19 of 41 http://mokumsolutions.com 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 Mokum Solutions, Inc. +1 415 252-9164 20 of 41 http://mokumsolutions.com 10. Figure 20 shows the Agent Deployment Succeeded. Click Done. Figure 20 11. Next, click Targets => Hosts to navigate to the Hosts page. Confirm that the hosts are listed on the page. Figure xx shows the host was added. Figure 21 Mokum Solutions, Inc. +1 415 252-9164 21 of 41 http://mokumsolutions.com Oracle Management Agent Post Installation Prerequisites Normal Host Credentials and Privileged Host Credentials for the Oracle Management Agent installing user, and Privileged Delegation is a Linux Host Patching prerequisite. Once the Oracle Management Agent is installed on a Linux host, its Normal Host Credentials, Privileged Host Credentials and Privilege Delegation settings must be setup in Cloud Control for patch jobs. Setup Host Privileged Delegation Cloud Control supports running Deployment Procedures such as Patch Linux Hosts and Linux RPM Repository server setup with elevated administrator privileges using sudo and PowerBroker. Without elevated administrator privileges, Deployment Procedure jobs will fail. Privilege Delegation is the Enterprise Manager framework that supports running Deployment Procedures using sudo and PowerBroker. All Enterprise Manager Deployment Procedures require administrator privileges to run. Many of the Deployment Procedure steps can be run as a normal user, although there are steps that require elevated administrator privileges. To setup Privileged Delegation for Linux host targets click Setup => Security => Privileged Delegation to access the Manage Privileged Delegation Settings page. Figure 22 Mokum Solutions, Inc. +1 415 252-9164 22 of 41 http://mokumsolutions.com From the Manage Privileged Delegation Settings page we can configure the Yum server and each Linux host target by clicking the Edit icon, but we will use another method. Tip: Only one target can be configure at a time, however, a template can be created and applied to multiple hosts. Figure 23 From the Manage Privilege Delegation screen, click the Template tab and click Create. Figure 24 Mokum Solutions, Inc. +1 415 252-9164 23 of 41 http://mokumsolutions.com 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 for Platforms dropdown. Click Create to proceed. Figure 25 Mokum Solutions, Inc. +1 415 252-9164 24 of 41 http://mokumsolutions.com From the Confirmation screen, verify the new template creation. Figure 26 Mokum Solutions, Inc. +1 415 252-9164 25 of 41 http://mokumsolutions.com From the Manage Priviledge Delegation screen, select all the hosts you wish to apply the new template to. Click Apply Template to proceed. Figure 27 Mokum Solutions, Inc. +1 415 252-9164 26 of 41 http://mokumsolutions.com From the Apply Template screen, Select the Template Name from the dropdown. Click OK to proceed. Figure 28 Mokum Solutions, Inc. +1 415 252-9164 27 of 41 http://mokumsolutions.com From the Confirmation screen, validate the template has been applied to selected hosts. Figure 29 Mokum Solutions, Inc. +1 415 252-9164 28 of 41 http://mokumsolutions.com Once you refresh the screen, you will see the Command column updated for the hosts for which the template was applied. Figure 30 Mokum Solutions, Inc. +1 415 252-9164 29 of 41 http://mokumsolutions.com Setup Preferred Credentials Preferred credentials simplify access to targets by saving login credentials in Enterprise Manager. Once preferred credentials are saved, administrators can run jobs using preferred credentials without having to enter login credentials. Both Normal Host Credentials and Privileged Host Credentials for the Oracle Management Agent installing user account must be setup for Linux Host Patching. Tip: Preferred credentials are configured on a per user basis. Setup => Security => Preferred Credentials Figure 31 Mokum Solutions, Inc. +1 415 252-9164 30 of 41 http://mokumsolutions.com From the Preferred Credentials page click the Host Target Type, then click Manage Preferred Credentials to 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 Mokum Solutions, Inc. +1 415 252-9164 31 of 41 http://mokumsolutions.com From the Select Named Credential window, select the Oracle Management Agent installing user account 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 user oma. Change "oma" with your installer user account Named Credential. Figure 34 Mokum Solutions, Inc. +1 415 252-9164 32 of 41 http://mokumsolutions.com From the Host Preferred Credentials page confirm that the Linux host targets Normal Host Credentials and Privileged Host Credentials are set. Figure 35 Mokum Solutions, Inc. +1 415 252-9164 33 of 41 http://mokumsolutions.com Oracle Management Agent Deinstallation Options The ability to quickly and cleanly remove the Oracle Management Agent is an essential Enterprise Manager lifecycle operation. There are five Oracle Management Agent deinstallation options. This section of the Oracle Cloud Cookbook covers the AgentDeinstall.pl option. The AgentDeinstall.pl script is a quick and efficient way to remove the Oracle Management Agent. The AgentDeinstall.pl script removes the Oracle Management Agent from the host, but does not delete the target in Cloud Control. If the intent is to decommission a target, after a successful Oracle Management Agent deinstallation, delete the agent then the target manually from Cloud Control. If the target was deinstalled with the intent to reinstall, its not necessary to delete the agent or target from Cloud Control. Agent Deinstallation Method Description Invoke the installer from the Management Agent home and deinstall the agent using the GUI. Graphical mode using the Installer Silent Mode using the Installer Note: Oracle Support recommends deinstalling the agent using graphical mode. Graphical mode is error prone and only an option if no other Oracle products are installed on the host. The silent agent deinstallation using the Installer is a multi step process. Its necessary to run the Installer against the $AGENT_HOME, $SBIN_HOME, $AGENT_HOME, followed by deleting the base directory. Mokum Solutions, Inc. +1 415 252-9164 34 of 41 http://mokumsolutions.com Silent Mode using the AgentDeinstall.pl script The silent agent deinstallation using the AgentDeinstall.pl script is a simple one step one line command. RPM file Removing the agent with the RPM file is a snap “rpm -e Stop the Agent and delete the agent home. Note: If there are multiple Oracle products installed on the host, the inventory.xml file will need to be edited and all agent entries must be removed. Brute Force 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 the output. The Agent Home and the Agent Binaries paths must be known to deinstall the agent. If you need help locating the emctl location, 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 agent Oracle Enterprise Manager Cloud Control 12c Release 4 Copyright (c) 1996, 2014 Oracle Corporation. All rights reserved. --------------------------------------------------------------Agent Version : 12.1.0.4.0 OMS Version : 12.1.0.4.0 Protocol Version : 12.1.0.1.0 Agent Home : /u01/app/oracle/product/agent_inst Agent Log Directory Agent Binaries Agent Process ID Agent URL : /u01/app/oracle/product/agent_inst/sysman/log : /u01/app/oracle/product/core/12.1.0.4.0 : 2998Parent Process ID : 2949 : https://sgd-uhura:3872/emd/main/ Local Agent URL in NAT : https://sgd-uhura:3872/emd/main/ Repository URL Started at Started by user Operating System Last Reload : https://oem-sarek.local.mokumsolutions.com:4903/empbs/upload : 2014-06-23 09:34:53 : oma : Linux version 2.6.39-400.109.6.el6uek.x86_64 (amd64) : (none)Last successful upload Last attempted upload : 2014-06-27 11:27:48 : 2014-06-27 11:27:48 Total Megabytes of XML files uploaded so far : 1.9 Number of XML files pending upload :0 Size of XML files pending upload(MB) :0 Available disk space on upload filesystem : 64.25% Collection Status Heartbeat Status : Collections enabled : Ok Last attempted heartbeat to OMS : 2014-06-27 11:32:54 Last successful heartbeat to OMS : 2014-06-27 11:32:54 Next scheduled heartbeat to OMS : 2014-06-27 11:33:54 --------------------------------------------------------------Agent is Running and Ready Mokum Solutions, Inc. +1 415 252-9164 35 of 41 http://mokumsolutions.com 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/emctl stop agent” $ /u01/app/oracle/product/core/12.1.0.4.0/bin/emctl stop agent Oracle 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 Management Agent: $ /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 Passed The 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 Passed The inventory pointer is located at /u01/app/oracle/product/core/12.1.0.4.0/oraInst.loc The 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.loc Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 3600 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-06-27_11-38-54AM. Please wait ...Oracle Universal Installer, Version 11.1.0.12.0 ProductionCopyright (C) 1999, 2014, Oracle. All rights reserved. Starting deinstall Deinstall in progress (Friday, June 27, 2014 11:39:00 AM PDT) Configuration assistant "Agent Deinstall Assistant" succeeded Mokum Solutions, Inc. +1 415 252-9164 36 of 41 http://mokumsolutions.com ............................................................... 100% Done. Deinstall successful End of install phases.(Friday, June 27, 2014 11:39:08 AM PDT) End of deinstallations Please 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 deinstall script. Make sure to delete the targets manually from the Cloud Control Console for a successful deinstallation. Deinstall Oracle Management Agent 12.1.0.3.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 by typing “$/bin/emctl status agent”. If the agent is running, "emctl status agent" will list the Agent Home and the Agent Binaries paths. The Agent Home and the Agent Binaries paths must be 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 the above $AGENT_HOME with your $AGENT_HOME. $ /u01/app/oracle/product/agent_inst/bin/emctl status agent Oracle Enterprise Manager Cloud Control 12c Release 3 Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved. --------------------------------------------------------------Agent Version : 12.1.0.3.0 OMS Version : 12.1.0.3.0 Protocol Version : 12.1.0.1.0 Agent Home : /u01/app/oracle/product/agent/agent_inst Agent Binaries : /u01/app/oracle/product/agent/core/12.1.0.3.0 Agent Process ID : 10367 Parent Process ID : 10218 Agent URL : https://snort-vash.sf.mokum.com:3872/emd/main/ Repository URL : https://oem-tuvok.sf.mokum:4903/empbs/upload Started at : 2014-01-22 05:40:55 Started by user : oraagent Last Reload : (none) Last successful upload : 2014-01-22 10:02:57 Last attempted upload : 2014-01-22 10:02:57 Total Megabytes of XML files uploaded so far : 0.34 Number of XML files pending upload :0 Size of XML files pending upload(MB) :0 Available disk space on upload filesystem : 99.22% Collection Status : Collections enabled Heartbeat Status : Ok Last attempted heartbeat to OMS : 2014-01-22 10:06:04 Last successful heartbeat to OMS : 2014-01-22 10:06:04 Next scheduled heartbeat to OMS : 2014-01-22 10:07:04 --------------------------------------------------------------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 Mokum Solutions, Inc. +1 415 252-9164 37 of 41 http://mokumsolutions.com “$/bin/emctl stop agent”. $ ./emctl stop agent Oracle 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 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. 3. Next, deinstall the Oracle Management Agent in Silent Mode Using AgentDeinstall.pl Script by invoking 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 deinstall the 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 successful deinstallation 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.loc Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 1027 MB Passed The 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 Passed The inventory pointer is located at /u01/app/oracle/product/agent/core/12.1.0.3.0/oraInst.loc The 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.loc Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 1027 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-01-22_10-07-57AM. Please wait ...Oracle Universal Installer, Version 11.1.0.11.0 Production Copyright (C) 1999, 2013, Oracle. All rights reserved. Starting deinstall Deinstall in progress (Wednesday, January 22, 2014 10:08:01 AM CST) Configuration assistant "Agent Deinstall Assistant" succeeded Mokum Solutions, Inc. +1 415 252-9164 38 of 41 http://mokumsolutions.com ............................................................... 100% Done. Deinstall successful End of install phases.(Wednesday, January 22, 2014 10:08:30 AM CST) End of deinstallations Please 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] :yes NOTE: The targets monitored by this Management Agent will not be deleted in the Enterprise Manager Repository by this deinstall script. Make sure to delete the targets manually from the Cloud Control Console 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 by typing “$/bin/emctl status agent”. If the agent is running, "emctl status agent" will list the Agent Home and the Agent Binaries paths. The Agent Home and the Agent Binaries paths must be 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 the above $AGENT_HOME with your $AGENT_HOME. $ /u01/app/oracle/product/agent_inst/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 : /u01/app/oracle/product/agent_inst Agent Binaries : /u01/app/oracle/product/core/12.1.0.2.0 Agent Process ID : 1437 Parent Process ID : 1397 Agent URL : https://snort-vash.sf.mokum.com:3872/emd/main/ Repository URL Started at : https://oem-tuvok.sf.mokum.com:4900/empbs/upload : 2012-12-01 07:22:39 Started by user : oracle Last Reload : (none) Last successful upload : 2012-12-01 08:03:09 Last attempted upload : 2012-12-01 08:03:09 Total Megabytes of XML files uploaded so far : 0.03 Number of XML files pending upload :0 Size of XML files pending upload(MB) :0 Available disk space on upload filesystem : 79.03% Collection Status Heartbeat Status : Collections enabled : Ok Last attempted heartbeat to OMS : 2012-12-01 08:03:06 Last successful heartbeat to OMS : 2012-12-01 08:03:06 Next scheduled heartbeat to OMS : 2012-12-01 08:04:06 Mokum Solutions, Inc. +1 415 252-9164 39 of 41 http://mokumsolutions.com --------------------------------------------------------------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/emctl stop 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 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. 3. Next, deinstall the Oracle Management Agent in Silent Mode Using AgentDeinstall.pl Script by invoking 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 deinstall the Oracle Management Agent: $ /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.loc Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 2376 MB Passed The inventory pointer is located at /u01/app/oracle/product/core/12.1.0.2.0/oraInst.loc The 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 Passed The inventory pointer is located at /u01/app/oracle/product/core/12.1.0.2.0/oraInst.loc The 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.loc Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 2376 MB Passed Preparing to launch Oracle Universal Installer from /tmp/OraInstall2012-12-01_07-45-42AM. Please wait ...Oracle Universal Installer, Version 11.1.0.9.0 Production Copyright (C) 1999, 2012, Oracle. All rights reserved. Mokum Solutions, Inc. +1 415 252-9164 40 of 41 http://mokumsolutions.com Starting deinstall Deinstall in progress (Saturday, December 1, 2012 7:46:16 AM PST) Configuration assistant "Agent Deinstall Assistant" succeeded ............................................................... 100% Done. Deinstall successful End of install phases.(Saturday, December 1, 2012 7:47:01 AM PST) End of deinstallations Please 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 deinstall script. Make sure to delete the targets manually from the Cloud Control Console for a successful deinstallation. Mokum Solutions, Inc. +1 415 252-9164 41 of 41