Monday, 19 February 2018

Oracle Enterprise Manager Cloud Control 13c Release 2 (13.2.0.0) Installation on Oracle Linux 6 and 7

This article describes the installation of Oracle Enterprise Manager Cloud Control 13c Release 2 (13.2.0.0) on Oracle Linux 6 and 7. (x86_64).

◈ Software


Download the following software:

◈ Oracle Linux 6 or 7 (x86_64)
◈ Oracle Database (x86_64) 12.1.0.2 Enterprise Edition
◈ Enterprise Manager Cloud Control 13c Release 2 (13.2.0.0) (x86_64)
◈ 12.1.0.2 DB Template with CDB PDB for EM 13.2.0.0 on Linux x86-64

◈ OS Installation


Install Oracle Linux (OL) in the same way you would for a regular Oracle Database installation. You can see examples of this type of installation below. Remember to check database installation article (listed below) for the specific package group selection. These Linux installations articles are generic, not specific for Cloud Control.

Oracle Linux 6.x Installation
Oracle Linux 7.x Installation

During this installation I used a virtual machine with 10G RAM and 100G disk space. The swap size was set at 8G, the firewall was disabled and SELinux was set to permissive.

◈ Database Installation (Software-Only)


For this installation you will need 12.1.0.2 for the repository database, so use the installation instructions from one of the following articles.

◈ Oracle Database 12c Release 1 (12.1) Installation On Oracle Linux 6
◈ Oracle Database 12c Release 1 (12.1) Installation On Oracle Linux 7

Do a software-only installation, as we will be using the template to create the repository database.

The installation documentation says the following packages are necessary for the cloud control installation. If you have performed the database installation as described in one of the above articles, most of these prerequisites will already have been met.

# OL6 and OL7
yum install make -y
yum install binutils -y
yum install gcc -y
yum install libaio -y
yum install glibc-common -y
yum install libstdc++ -y
yum install libXtst -y
yum install sysstat -y
yum install glibc -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y

The database software installation is now complete.

◈ Repository Database Creation Using Template


In this article, we are going to use the repository template to create the repository database. If you are creating the database manually, remember to check all the prerequisites here, some of which include the following.

◈ Database version 12.1.0.2 Enterprise Edition.
◈ You can use a Non-CDB database, or a PDB.
◈ The OPTIMIZER_ADAPTIVE_FEATURES initialization parameter should be set to FALSE.
◈ Character set AL32UTF8.

The template includes all the relevant database settings, but make sure the character set is selected during the creation, as described below.

Unzip the repository template under the ORACLE_HOME.

$ cd $ORACLE_HOME/assistants/dbca/templates
$ unzip /tmp/12.1.0.2.0_Database_Template_with_cdbpdb_for_EM13_2_0_0_0_Linux_x64.zip

Start the Database Configuration Assistant (DBCA) and create a new database using the template.

$ dbca

Select the "Create Database" option and click the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Select the "Advanced Mode" option and click the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Select the template for the appropriate size of EM installation you need. In this case I've used the small option. Click the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Enter the Global Database Name and SID, then click the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Make sure both the "Configure Enterprise Manager (EM) Database Express" and "Register with Enterprise Manager (EM) Cloud Control" options are unchecked, then click the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Enter the database credentials, then click the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Enter the listener details and click the the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Choose the preferred location for the database files, then click the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Accept the default settings and click on the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Amend the memory settings as desired, click on the "Character Sets" tab and select the "AL32UTF8" option and click the "Next" button. In this case I'm accepting the memory defaults

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Click the "Next" button to create the database.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

If you are happy with the summary information, click the "Finish" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Wait while the database is created.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Once the database creation is complete, click the "Close" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Edit the contents of the "/etc/oratab" file, making sure the database can be started and stopped using the dbstart and dbshut commands.

emrepcdb:/u01/app/oracle/product/12.1.0.2/db_1:Y
Make sure the "empdbrepos" pluggable database is open and has its state saved, so it opened automatically when the instance starts. It should already be open, so the first command will produce and error.

export ORACLE_SID=emrepcdb

sqlplus / as sysdba <<EOF
ALTER PLUGGABLE DATABASE empdbrepos OPEN;
ALTER PLUGGABLE DATABASE empdbrepos SAVE STATE;
EXIT;
EOF

◈ Cloud Control 13c Installation


Make the following directories to hold the management server and agent. There are some restrictions on the possible path lengths, so don't make the directory structure too deep, especially for Windows installations.

$ mkdir -p /u01/app/oracle/middleware
$ mkdir -p /u01/app/oracle/agent

Start the installation by running the "em13200_linux64.bin" file.

$ chmod u+x em13200_linux64.bin
$ ./em13200_linux64.bin

If you wish to receive support information, enter the required details, or uncheck the security updates checkbox and click the "Next" button. Click the "Yes" button the subsequent warning dialog.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

If you wish to check for updates, enter the required details, or check the "Skip" option and click the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

If you have performed the prerequisites as described, the installation should pass all prerequisite checks. Click the "Next" button. In this case I got a warning on the kernel parameters because my "ip_local_port_range" was larger than the required range. I also got a warning about the physical memory, as I was using a VM with less than the recommended memory. I ignored both by clicking the "Ignore" button, then the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Select the "Create a new Enterprise Manager System" and "Simple" options, then click the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Enter the middleware and agent locations, then click the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Enter the administrator password and database repository details, then click the "Next" button. If you are using the Multitenant template the PDB name will be "empdbrepos". If your database uses a domain, the PDB name will be "empdprepos.your.domain".

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Enter a location for the software library. If you are using multiple management servers, you will need to configure shared storage for BI Publisher. For this installation I unchecked the "Configure a Shared Location for Oracle BI Publisher" option, but left the "Enable Oracle BI Publisher" option checked. Click the "Next" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

If you are happy with the review information, click the "Install" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Wait while the installation and configuration take place. Notice the "Repository Out Of Box Configuration" step. If we had not used the database template, this would read "Repository Configuration" and the contents of the repository would be created from scratch.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

When prompted, run the root scripts, then click the "OK" button.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Make note of the URLs, then click the "Close" button to exit the installer. A copy of this information is available in the "/u01/app/oracle/middleware/install/setupinfo.txt" file.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

The login screen is available from a browser using the URL provided in the previous screen ("https://ol7-emcc.localdomain:7803/em"). Log in with the username "sysman" and the password you specified during your installation.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

Once logged in, you are presented with a with the "Accessibility Preference" screen. Click the "Save and Continue" button and you are presented with the the "License Agreement" screen. Click the "I Accept" button and you are presented with the homepage selector screen. On the right side of the screen it lists the post-installation setup tasks you need to work through.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

You are presented with the selected screen as the console homepage.

Oracle Database 13c, Oracle Database Tutorials and Materials, Oracle Database Certifications, Oracle Database Guides

◈ Startup/Shutdown


Cloud Control is set to auto-start using the "gcstartup" service. The "/etc/oragchomelist" file contains the items that will be started by the system.

/u01/app/oracle/middleware
/u01/app/oracle/agent/agent_13.2.0.0.0:/u01/app/oracle/agent/agent_inst

On a simple installation the default auto-start will cause a problem as Cloud Control will attempt to start before the database has started. The service can be disabled by commenting out (using #) all the contents of the "/etc/oragchomelist" file to prevent the auto-start and use start/stop scripts described below.

If the start/stop needs to be automated, you can do it in the usual way using Linux service that calls your start/stop scripts that include the database management.

Use the following commands to turn on all components installed by this article.

#!/bin/bash
export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
export OMS_HOME=/u01/app/oracle/middleware
export AGENT_HOME=/u01/app/oracle/agent/agent_inst

# Start everything
$ORACLE_HOME/bin/dbstart $ORACLE_HOME

$OMS_HOME/bin/emctl start oms

$AGENT_HOME/bin/emctl start agent

Use the following commands to turn off all components installed by this article.

#!/bin/bash
export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
export OMS_HOME=/u01/app/oracle/middleware
export AGENT_HOME=/u01/app/oracle/agent/agent_inst

# Stop everything
$OMS_HOME/bin/emctl stop oms -all

$AGENT_HOME/bin/emctl stop agent

$ORACLE_HOME/bin/dbshut $ORACLE_HOME