Enterprise Manager 12C Installation and Agent Deployment

Posted: May 16, 2014 in OEM12c
Tags:

Happy Friday, Oracle Athletes!! In my knowledge transfer session at work, I was tasked by the incoming DBA with documenting the installation of OEM12c. I decided to include this document in my blog so I have a record of it and so you, the Oracle enthusiast, can read and comment.

When I installed this awesome tool, I had some issues that caused the first install to fail. I recommend purchasing Expert Oracle Enterprise Manager 12c, coauthored by Kellyn Pot’vin(@dbakevlar) and Gokhan Atil among others. Prior to following the details in this book, I did some manual set up steps, including creating the agent.

You will have difficulties if you attempt to create the agent prior to running the GUI version. The created agent will cause the install to fail. The below steps are an abbreviated version of the book. The book also covers a vast array of OEM12c goodies and it is a must read for new users of this version of OEM.

 

Enterprise Manager 12C Installation and Agent Deployment

  1. Introduction
  2. Installing Management Repository
    1. Using Oracle Validated RPM Package and YUM
    2. Creating Required Directories
    3. Installing the Oracle Database Software (11 steps)
    4. Creating the Repository Database with DBCA (13 steps)
  3. Installing Oracle Enterprise Manager 12C
    1. Creating the Oracle User and Groups
    2. Creating required directories
    3. Installing OEM (15 steps)
  4. Deploying Management Agents
    1. Using the Add Host Targets Wizard (7 steps)

 

Introduction

The purpose of this document is to create a repository database and install OEM Cloud Control 12c. EM12c consists of three components:

  • Oracle Management Service (OMS)
  • Oracle Management Agents
  • Oracle Management Repository

This documentation of the agent deployment and agent deployment uses three servers:

  • Cloudcontrol12.testdomain.com: Oracle Management Service will be installed to this server
  • Repositorydb.testdomain.com: This database server will host the management repository.
  • Target.testdomain.com: Management agents will be deployed to this target server.

All of these servers are running Oracle Linux 5.8 (64-bit) as well as the GNOME desktop environment and the X Window system.

Hints:

  • If you utilize the wizard to install OEM 12c and the agent, do not create an agent prior to installing. This will cause the installation to fail.
  • The authors prefer to install the management repository and OMS on separate servers. If you install both on the same server, you should accommodate the requirements for both installations.
  • Use a DNS server to solve the hostnames of the servers.
  • Use fully qualified hostnames. For example, cloudcontrol12.testdomain.com is a fully qualified hostname.

Each agent deployment requires approximately 1GB of free hard disk space. Deploying agents to systems with less than 512 MB of RAM is not recommended.

Installing Management Repository

In this section, you’ll download and install Oracle 11gR2 on the server named repostiorydb.testdomain.com (10.2.0.5, 11.1.0.7, 11.2.0.1, 11.2.0.2, 11.2.0.3, 11.2.0.4). If you already have a database server for the repository database, you can skip to the installation of OEM12c.

  1. Using Oracle Validated RPM Package and YUM

The purpose of using this package is to meet the Oracle prerequisites on Oracle Linux. You can either download the RPM package from the Oracle web site or you can use the YUM package manager.

Using the Oracle public YUM server:

  • Download and copy the appropriate yum configuration file by running the following commands as ROOT:
         o        Oracle Linux 6
  • [root@repositorydb ~]# cd /etc/yum.repos.d
  • [root@repositorydb ~]# wget http://public-yum.oracle.com/public-yum.o16.repo
         o        Oracle Linux 5
  • [root@repositorydb ~]# cd /etc/yum.repos.d
  • [root@repositorydb ~]# wget http://public-yum.oracle.com/public-yum.e14.repo

Open the yum public-yum*.repo configuration file in a text editor. Locate the section in the file for the repository you plan to update from—for instance, [e15_base]—and change enabled=0 to enabled=1. Save the file and start using yum:

 

 

[root@repositorydb ~]# yum install oracle-validated

 

For Oracle Linux 6, you need to install the oracle-rdbms-server-11gR2-preinstall package instead of the oracle-validated package:

[root@repositorydb ~]# yum install oracle-rdbms_server-11gR2-preinstall

 

You can also manually download the oracle-validated package for Red Hat Enterprise Linux 5 from the following link: https://oss.oracle.com/el5/oracle-validated/. Next, you need to set the password for the ORACLE user. Make sure you also set up YUM and install the oracle-validated package for the OMS server.

Creating Required Directories:

The Oracle base directory must have at least 5GB of free disk space.

              [root@repositorydb ~]# mkdir –p /u01/app/
              [root@repositorydb ~]# chown –R oracle_oinstall /u01/app/
              [root@repositorydb ~]# chmod –R 775 /u01/app/

Installing the Oracle Database Software

Download the Oracle database software from the Oracle Technology Network (OTN). The software is available in zip files.

www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

It is also recommended to download and install the latest patch set from My Oracle Support.

After downloading the installation files, copy them to a directory that the ORACLE user can access, and switch to the ORACLE user to unzip them.

[oracle@repositorydb ~]$ unzip linux_11gR2_database_1of2.zip
[oracle@repositorydb ~]$ unzip linux_11gR2_database_2of2.zip

You will see a newly created directory named database. CD to this directory and run the installer:

[oracle@repositorydb ~]$ cd database
[oracle@repositorydb ~]$ ./runInstaller
Now you can complete the installation steps: This will take you to the GUI. The below steps will guide you through it but you can choose to just follow the GUI prompts.

1)      Configure Security Updates. I recommend you deselect the “I wish to Receive Security Updates Option” and click next. Ignore the warning.

2)      The Download Software Updates step appears. Enter your My Oracle Support credentials to download and apply the latest patches. Optionally, you can skip this step and apply critical patch set updates manually. Click next.

3)      For the Select Installation Option step, select Install Database Software Only. Click next.

4)      In the Grid Installation Options step, select Single Instance Database Installation. Click next.

5)      Select English for the default language.

6)      Select a database edition. This server will be used only as the repository database of OEM Cloud Control so there is no additional license fee. Select Enterprise Edition and click next.

7)      The Specify Installation Location Step appears. Enter /u01/app/oracle for the Oracle base Directory. **When I installed, I had very little space in u01 so I used u02.**

8)      Enter or accept the Inventory Directory and click next.

9)      For the Privileged Operating System Groups step, accept the defaults and click next. Oracle checks the prerequisites. If it doesn’t find any errors, the installed advances to the Summary step.

10)   Review the summary screen. If the information on the screen seems okay, click the install button.

11)   At the end of the installation, Log in as ROOT to the server in another terminal session and run the scripts. Click OK to finish the installation.

 

 Creating the Repository Database with DBCA

Connect to the repository server, set the Oracle home, and run dbca:

[oracle@repositorydb ~]$ . oraenv
ORACLE_SID = [oracle] ? oracle
ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/11.2.0/dbhome_1
The Oracle base has been set to /u01/app/oracle
[oracle@repositorydb ~]$ dbca

When you run dbca, the DBCA Welcome screen appears. Click next and follow the next 13 steps or just follow the GUI prompts.

1)      For the Operations step, select Create a Database and click next.

2)      For the Database Templates step, select General Purpose or Custom Database. It is recommended to select Custom Database because it will prevent the installation of some SYSMAN objects in the database that will cause problems when using the database as a management repository database. Click next.

3)      For the Database Identification step, enter the global database name and the installer will set the SID according to that name. Click next.

4)      The Management Option step appears. Deselect configure Enterprise Manager and click next.

5)      Enter passwords for SYS and SYSTEM users in the Database Credentials step and click next.

6)      Accept the defaults for database file locations and click next.

7)      Enable archiving in the Recovery Configuration step. Set the FRA destination and size and click next.

8)      For the Database Content step, deselect all components (not needed for a repository database). Click the Standard Database Components Button.

9)      In the Standard Database Components dialog box, deselect Oracle Multimedia and Oracle Application Express. Click OK to close the dialog box and click next.

10)   The Initialization Parameters screen appears. Ehile setting memory, ensure that total memory (SGA_max_size + PGA_aggregrate_target) set for the database will not exceed 75% of the total physical memory of the system. Do not use the memory_target parameter with Enterprise Manager. Next, click the Character Sets tab.

11)   For Character Sets, select Use Unicode (AL32UTF8). Set the National Character Set option to any UTF-supported character set. Then click next.

12)   For the Database Storage step, the management repository’s redo log file size should be a minimum of 300MB. Set the File Size option to 300MB for all three redo log groups and click next.

13)   Click the finish button to review the configuration and create the database.

After creating the database, connect to it with SQL*PLUS, run the following commands, and restart the database:

ALTER SYSTEM SET pga_aggregate_target=1G SCOPE=SPFILE;
ALTER SYSTEM SET shared_pool_size=600M SCOPE=SPFILE;
ALTER SYSTEM SET job_queue_processes=20 SCOPE=SPFILE;
ALTER SYSTEM SET log_buffer=10485760 SCOPE=SPFILE;
ALTER SYSTEM SET open_cursors=300 SCOPE=SPFILE;
ALTER SYSTEM SET processes=500 SCOPE=SPFILE;
ALTER SYSTEM SET session_cached_cursors=200 SCOPE=SPFILE;
EXEC dbms_auto_task_admin.disable(‘auto optimizer stats collection’ ,null,null);
Installing Oracle Enterprise Manager

You can download the Enterprise Manager Cloud Control Software from OTN. Here’s the link:

www.oracle.com/technetwork/oem/enterprise-manager/overview/index.html

After downloading the installation files, copy them to a directory the ORACLE user can access and swith to the ORACLE user to unzip them:

[oracle@cloudcontrol12 ~]$ unzip em12_linux64_disk1of2.zip –d cloudsetup
[oracle@cloudcontrol12 ~]$ unzip em12_linux64_disk2of2.zip –d cloudsetup

**Ensure no environment variable related to the database is set prior to the installation. Oracle also recommends to set umask to 022. CD to cloudsetup and run the installer:

[oracle@cloudcontrol12 ~]$ umask 022
[oracle@cloudcontrol12 ~]$ cd cloudsetup
[oracle@cloudcontrol12 ~]$ ./runInstaller
When the Enterprise Manager Screen appears, follow these steps:

1)      For the My Oracle Support Details step, enter your credentials if you want to receive security updates. Click next.

2)      Enter your My Oracle Support credentials (again) and click Search for Updates. Click next and then click OK to accept the warning about restarting the installer.

3)      After the installer restarts, continue to the next step. Enter a directory for Inventory Location and select the group you created for the ORACLE user. Click next and the installer will check the prerequisites.

4)      If all prerequisite checks have the status “Succeeded”, click next.

5)      Select Create a New Enterprise Manager System and select Advanced. Click next.

6)      When the Installation Details step appears, enter the Middleware Home Location as /u01/app/Middleware, the Agent Base Directory as /u01/app/agent, and your fully qualified Host Name. **I had to use /u02 due to space limitations on /u01** Then click next.

7)      For the Plug-in Deployment step, slect the management plug-ins you want to configure. **You can add or remove the management plug-ins after installation** Click next.

8)      The OMS is the main application of the Enterprise Manager and it needs a WebLogic application server to run. In the next step, choose a username and password for the WebLogic server and a password for the node manager. I chose to use the same password as SYSMAN so I would not forget it. The password will be required to troubleshoot problems related to WebLogic. Click next.

9)      Enter connection information of the repository database and select the deployment size. The installer checks the database settings according to the deployment size. Click next.

10)   The installer will create the required database user and the tablespaces in the repository database. For the Repository Configuration Details step, enter a password for the SYSMAN user, modify the directory locations (if needed), and enter a registration password that will be used for securing agent communications. ** Note ** When configuring the management repository n a database that uses ASM for storage, when you specify the data file location, only the disk group I used for creating the tablespaces. Click next.

11)   Check the ports that will be allocated for the OEM.

12)   Review the configuration. Click Install to start the installation.

13)   Following installation, Log in as ROOT in another terminal session and execute the scripts that appear in the dialog box.

14)   Review the information and click Close to complete the EM12c installation.

15)   You can now log in to the Enterprise Manager Cloud Control!

Deploying Management Agents

There are several ways to deploy agents: due to time constraints, I will only explain the first one.

  • Using the Add Host Targets Wizard
  • Using an RPM file
  • Using the AgentPull script
  • Using the agentDeploy script
    Using the Add Host Targets Wizard

1)      Log in to the EM12c console.

2)      On the top right side of the screen, click SetupàAdd Targets Manually

3)      Select the Add Host Targets radio button and then click the Add Host button.

4)      In order to monitor the repository database, dploy a management agent to the repositorydb.testdomain.com server. Click the Add button with the plus sign, enter the hostname, and then select the OS of the target server. Click next.

5)      Enter the directory where the agent software can be installed. Click the blue plus sign next to the Named Credential option to add a credential for the host. In the Create New Named Credential dialog box, choose a meaningful name and click OK to save it.

6)      Click next to review the configuration details. Oracle recommends configuring privilege delegations (i.e., giving SUDO to the management agent user).

7)      Click the Deploy Agent button to start the deployment process.

Once Agent deployment is completed, you may discover targets using the guided process. For additional hosts, repeat steps one through seven.

This is the abbreviated version but it should work without a hitch as a fresh install. For a more detailed version, purchase the book #ExpertOracleEnterpriseManager12c coauthored by Kellyn Pot’vin and Gokhan Atil among others. It is a great read!!

Along with Kellyn and Gokhan, I would like to thank Tim Gorman who provided a great deal of assistance as a consultant.

~Jason

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s