Distribution of the Oracle Cloud Cookbook or derivative of the work in any form for commercial purposes is prohibited unless prior permission is obtained from the copyright holder.
This document applies to Oracle Enterprise Manager 12c Release 2 installed on Oracle Linux 5 or 6.
Oracle Enterprise Manager 12c is a systems management framework consisting of an Oracle database, Oracle WebLogic, a J2EE application, an application development frame work 11g (ADF) administrative Web GUI, server and client side plug-ins, and a client side agent. In the context of Oracle Enterprise Manager, the Oracle database repository is named the “Oracle Management Repository” or “OMR”. WebLogic is the J2EE platform called the “Oracle Management Service” or “OMS”, that runs the Oracle Enterprise Manager 12c J2EE application. The administrative Web GUI is named Oracle Enterprise Manager Cloud Control. The client side agents are named the “Oracle Management Agents” or “OMA”. The server and client side plug-ins share a unique name for the managed product or technology. Monitored hosts are referred to as targets. All of the Oracle Enterprise Manager components are commonly referred to as Oracle Enterprise Manager (OEM) or Enterprise Manager (EM).
The Oracle Management Repository, the Oracle Management Service along with the Oracle Management Agent can be installed on a single x86-64 Linux host in an all-in-one configuration for evaluations or in an n-tier configuration for production. Traditionally, production Oracle Enterprise Manager environments are not be placed on a single server, nor should the Oracle Management Repository be shared with production or test databases on the same server. For production, the Oracle Management Repository as well as WebLogic should be on dedicated virtual or physical servers. If your Oracle Enterprise Manager environment starts out small, make sure to have a plan to scale out your Oracle Enterprise Manager infrastructure.
Each of the Oracle Enterprise Manager 12c components can be installed using the Oracle Universal Installer (OUI) GUI, or using silent installation scripts, or with the software only, configure later installation mode. The software only installation mode allows you to install only the Oracle Enterprise Manager software binaries without any configurations. The software only installation mode is ideal if you want to install the software at one point and configure the software later.
Oracle Enterprise Manager 12c server sizing is calculated by a) total number of managed agents and targets, b) the future growth of your Oracle Enterprise Manager environment and c) your organization's high availability requirements. For example, if you know the total number of managed agents and targets, sizing WebLogic and the Oracle database is as simple as following Table 2, Table 3 and Table 4. As you add more agents and targets, it is important to consider the future growth of your Oracle Enterprise Manager environment as well as the ability to scale up or to scale out with additional CPU, RAM and storage.
Table 1 shows the minimum physical memory and storage requirements for the WebLogic server hosting the Oracle Management Service and the Oracle Management Agent.
Oracle recommends installing Oracle Linux and Red Hat Enterprise using the default software package selection without any customization. Using the default software packages without customizations includes most of the prerequisite packages for Oracle Enterprise Manager 12c and helps limit the number of manual prerequisite checks. After an Oracle Linux and/or Red Hat Enterprise Linux installation, Oracle recommends to register your server with the Unbreakable Linux Network (ULN) and to install the Legacy Software Development packages by typing “up2date -i @ Legacy Software Development“ or if you have a local yum repository type “yum groupinstall "Legacy Software Development"” to install most of the remaining Oracle technology product prerequisite packages. Once the Legacy Software Development packages are installed, install the oracle-validated RPM to meet all of the remaining Oracle Enterprise Manager 12c prerequisite packages.
The oracle-validated RPM simplifies meeting the software and system configuration prerequisites for installing Oracle Enterprise Manager 12c. Installing the oracle-validated RPM automatically installs all of the software RPM prerequisites for the Oracle Enterprise Manager 12c and the Oracle Database as well as meeting the system configuration prerequisites, such as creating an oracle user and the oinstall and dba groups, configuring the sysctl.conf settings, system startup parameters, user limits, and driver parameters.
The oracle-validated RPM is available at the Oracle Unbreakable Linux Network, on the Oracle Linux media, and from the Oracle public yum repository. The oracle-validated RPM can be installed from the Oracle Unbreakable Linux Network by typing "up2date --install oracle-validated", ULN registration and a valid Linux CSI is required. If you do not have access to Oracle Unbreakable Linux Network, the oracle-validated RPM can be installed from a local DVD repository as well as from Oracle' public yum repository.
Oracle Linux maintains yum repositories in the /etc/yum.repos.d/ directory. For example, to setup a DVD repository, mount the Oracle Linux 5.x DVD, and create a file in the /etc/yum.repos.d/<MY FILE>.repo directory that instructs the yum client to use the DVD repository. The next examples shows the syntax of a .repo file pointing to a mounted Oracle Linux DVD in the /mnt/dvd/ directory.
# cat /etc/yum.repos.d/ol-5U7-dvd.repo
[ol5_u7_dvd]
name=Oracle Linux $releasever - $basearch
baseurl=file:///mnt/dvd/Server/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
Before installing the oracle-validated RPM, clean the yum cache by typing “yum clean all” to re-read the repodata and caches. Once the DVD is mounted and the <MY FILE>.repo file is created, type “yum install oracle-validated” to install the oracle-validated RPM.
To install the oracle-validated RPM from the Oracle public yum repository, as root, change to the /etc/yum.repos.d/ directory and type “wget http://public-yum.oracle.com/public-yum-el5.repo” to download the public-yum-el5.repo file. Next, edit the public-yum-el5.repo file and enable the base repository for your Oracle Linux version by changing enabled=0 to enabled=1.
The next examples shows the public-yum-el5.repo file.
# vi /etc/yum.repos.d/public-yum-el5.repo
[el5_ga_base]
name=Enterprise Linux $releasever GA - $basearch - base
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/0/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0
[el5_u1_base]
name=Enterprise Linux $releasever U1 - $basearch - base
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/1/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0
[el5_u2_base]
name=Enterprise Linux $releasever U2 - $basearch - base
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/2/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0
[el5_u3_base]
name=Enterprise Linux $releasever U3 - $basearch - base
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/3/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0
[el5_u4_base]
name=Enterprise Linux $releasever U4 - $basearch - base
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/4/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0
[el5_u5_base]
name=Enterprise Linux $releasever U5 - $basearch - base
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/5/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0
[ol5_u5_base]
name=Oracle Linux $releasever - U5 - x86_64 - base
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/5/base/x86_64/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0
[ol5_u6_base]
name=Oracle Linux $releasever - U6 - $basearch - base
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/6/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0
[ol5_u7_base]
name=Oracle Linux $releasever - U7 - $basearch - base
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/7/base/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0
[el5_addons]
name=Enterprise Linux $releasever - $basearch - addons
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/addons/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0
[el5_oracle_addons]
name=Enterprise Linux $releasever - $basearch - oracle_addons
baseurl=http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/oracle_addons/$basearch/
gpgkey=http://public-yum.oracle.com/RPM-GPG-KEY-oracle-el5
gpgcheck=1
enabled=0
Tip: Enable a repository by changing enabled=0 to enabled=1. Enable the base repository for the Oracle Linux version being used. The next examples shows how to enable the Oracle Linux 5U7 base repository.
The next examples shows how to enable the Oracle Linux 5U6 base repository.
The oracle-rdbms-server-11gR2-preinstall RPM, formally know as oracle-validated, simplifies meeting the software and system configuration prerequisites for installing Oracle Enterprise Manager 12c on Oracle Linux 6. Installing the oracle-rdbms-server-11gR2-preinstall RPM automatically installs all of the software RPM prerequisites for Oracle Enterprise Manager 12c as well as meeting the system configuration prerequisites, such as creating an oracle user and the oinstall and dba groups, configuring the sysctl.conf settings, system startup parameters, user limits, and driver parameters.
The oracle-rdbms-server-11gR2-preinstall RPM is available at the Oracle Unbreakable Linux Network, on the Oracle Linux media, and from the Oracle public yum repository.
iptables is a userspace firewall application used to configure the Linux IPv4 and IPv6 packet filtering rulesets. iptables is installed and enabled by default on Oracle Linux with a default policy and ruleset in /etc/sysconfig/iptables. iptables rules can be configured at the command line as well as with the system setup utility, i.e. "/usr/bin/setup".
# service iptables stop && service ip6tables stop && chkconfig iptables off && chkconfig ip6tables off
iptables can be re-inabled by typing the following command as root.
# service iptables start && service ip6tables start && chkconfig iptables on && chkconfig ip6tables on
Security Enhanced Linux (SELinux) is a default Linux feature that offers mandatory access controls, using Linux kernel security modules (LSM) along with user-space tools. Starting with Oracle Database 11g Release 2 (11.2), Security Enhanced Linux is supported for Oracle Linux 4, Red Hat Enterprise Linux 4, Oracle Linux 5, and Red Hat Enterprise Linux 5. Security Enhanced Linux is not supported for the Oracle Enterprise Manager 12c Oracle Management Service.
Mandatory access controls, for example Security Enhanced Linux, may be a part of your organizations information security program. If your information security program requires mandatory access controls for the 12c Oracle Management Repository, a best practice is to configure Security Enhanced Linux during the last phase of the Enterprise Manager deployment.
To confirm the status of SELinux, as root type sestatus as shown in the next example.
# sestatus
SELinux status: disabled
The above example shows a host with SELinux disabled.
Security Enhanced Linux can be temporarily disabled by typing "echo 0 > /selinux/enforce", as root. Security Enhanced Linux can be re-enabled by typing "echo 1 > /selinux/enforce", as root.
Security Enhanced Linux can be permanently disabled by changing the "SELINUX=enforcing" entry to "SELINUX=disabled" in the "/etc/selinux/config" file. Security Enhanced Linux can be re-enabled by changing the "SELINUX=disabled" entry to "SELINUX=enforcing" in the "/etc/selinux/config" file. A re-boot is required after changing the "SELINUX=” value to enable to new settings.
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.
The next example shows the proper syntax from a /etc/hosts file. Note that the localhost entries are one 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 next example shows an improperly formatted /etc/hosts file. Note that the long and short names are on the same line as the localhost entries.
127.0.0.1 servername.com servername localhost.localdomain localhost
192.168.4.8 servername.com servername
Tip: The following IPv6 entries in Oracle Linux 5 & 6 /etc/hosts files should be removed to aviod "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
The /etc/hosts file can be edited by the root user bu typing “vi /etc/hosts”, as shown in the next example.
# vi
127.0.0.1 localhost.localdomain localhost
192.168.4.8 servername.com servername
:wq!
Adjust the Shared Memory File System for the Database Host
To meet the Oracle Management Repository configuration requirements, the shared memory file system size should be increased to 4 GB.
Note: The shared memory file system size needs to be increased only on the Database host.
To check the current size of the shared memory file system, type “df -k /dev/shm” as shown in the next example.
# df -k /dev/shm
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 3056052 0 3056052 0% /dev/shm
The above examples shows a 3 GB shared memory file system.
To set the shared memory file system size to 4 GB, as root, type the following commands.
# umount tmpfs
# mount -t tmpfs shmfs -o size=4g /dev/shm
Next, add the following entry in /etc/fstab to automatically mount the 4 GB shared memory file system.
tmpfs /dev/shm tmpfs size=4g 0 0
Create the Required Directories using the Optimal Flexible Architecture (OFA) Standard
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.
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 -R oracle:oinstall /u01
# chmod -R 775 /u01
Installing the Oracle Enterprise Manager 12c components using the Oracle Universal Installer (OUI) GUI requires local or remote access to the server' console or a remote X Windows (X11) session. Please note that the only software requirements on the Linux Oracle Enterprise Manager host for remote X Windows (X11) sessions is the xauth RPM package. The xauth RPM package handles the X11 forwarding authentication. X-windows and xhost are not required on the Linux Oracle Enterprise Manager host for remote X Windows (X11) sessions.
SSH and X11 forwarding enables the redirection of an X11 session from a remote Oracle Linux machine to a local desktop. For example, from a local desktop, ssh to a remote Oracle Linux server using X11 forwarding and run the Oracle Universal Installer, i.e. by typing “./runInstaller”. The Oracle Universal Installer will be displayed on the local desktop and the Oracle Enterprise Manager 12c components can be installed on the remote Oracle Linux server.
On the Oracle Linux server, enable X11 forwarding in the /etc/ssh/sshd_config by adding "ForwardX11 yes" to the file as shown in the next example.
Change
#X11Forwarding no
to
X11Forwarding yes
Once the "ForwardX11 yes" entry has been added to the /etc/ssh/sshd_config file, restart ssh by typing "service sshd restart" to enable X11 forwarding. With X11 forwarding enabled, the Oracle Universal Installer (OUI) GUI can be exported from the Oracle Linux server to your local desktop.
Tip: To aviod X11 challanges install the xauth and xorg-x11-apps RPMs on the Linux host. To check for the RPMs, as root type, rpm -qa | grep -i xauth and rpm -qa | grep -i xorg-x11-apps. To install xauth and the xorg-x11-apps RPMs, type yum -y install xorg-x11-apps xauth.
To enable X11 forwarding from a Linux desktop, use the "-X" switch with ssh. For example, type "ssh -X oracle@<ORACLE LINUX SERVER>" to create a ssh tunnel with X11 forwarding. Do not forget that -X enables X11 forwarding, and -x actually disables X11 forwarding. Also, using the su command within a SSH session with X11 forwarding breaks X11 authentication.
To test remote X Windows (X11), open a new ssh session with X11 forwarding enabled (ssh -X user@servername), and type xclock. The xclock application should open on your desktop. xclock is an X window client application that is included in the xorg-x11-apps RPM package. xclock is often used to test remote X Windows (X11) sessions.
Tip: To troubleshoot ssh connections, use ssh verbose mode, i.e. ssh -v -v -X user@servername
If your using a Windows PC, a PC X Server like
XMing is required to run an X Windows session, along with an ssh client like putty that supports X11 forwarding.
ulimit /etc/security/limits.conf Values
One of the Oracle Enterprise Manager 12c installation prerequisites is to increase the number of file descriptors to at least 4096. As root, edit the /etc/security/limits.conf file and add the following two entries:
<UID> soft nofile 4096
<UID> hard nofile 4096
Confirm the new file limits by typing:
$ ulimit -n
and
$ /bin/sh -c "ulimit -n"
The value should be greater than 4096.
Oracle Database 11g Enterprise Edition R2 (11.2.0.3.0) Installation
This section walks through the installation of Oracle Database 11g Release 2 (11.2.0.3.0) using the Oracle Universal Installer (OUI) on Oracle Linux 5 or 6.
With the software
downloaded and staged for the Oracle Linux host, as the oracle user, run the runInstaller script by typing "./runInstaller" as shown in the next example.
# ssh -X oracle@<DATABASE HOST>
$ cd /u01/app/stage/database
$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 3967 MB Passed
Checking swap space: must be greater than 150 MB. Actual 6189 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-11-30_04-53-29PM. Please wait ...
On the Configure Security Updates screen, to receive information from Oracle (optional), enter your email address and My Oracle Support password and click the Next button, or uncheck the I wish to receive security updates via My Oracle Support checkbox and click the Next button.
Figure 2
On the Download Software Updates screen, select one of the following three software update options, then click Next to proceed:
- Use My Oracle Support credentials for download
- Use pre-downloaded software updates
- Skip software updates
As of this writing there are no software updates. For this example we selected the Skip software updates option and then Next to proceed.
Figure 3
On the Select Install Option screen, select Create and configure a database. Click the Next button to proceed.
Figure 4
On the System Class screen, select the Server Class option. Click the Next button to proceed.
Figure 5
On the Grid Installation Options screen, select the Single instance database installation option. Click the Next button to proceed.
Figure 6
On the Select Install Type screen, select the Tipical install option. Click the Next button to proceed.
Figure 7
On the Typical Install Configuration screen, accept the defaults, enter a Administrative password. Click the Next button to proceed.
Figure 8
On the Create Inventory screen, accept the defaults. Click the Next button to proceed.
Figure 9
The Perform Prerequisite Checks screen shows if the minimum system requirements to perform the database installation are met.
- Click Check Again, if you fixed the problems and you would like to verify the system requirements again.
- Click Fix & Check Again, if you want the installer to try to fix the problems and verify the system requirements again.
- Click Ignore All to ignore the problems and move forward with the database installation.
Click the Next button to proceed.
Figure 10
On the Summary screen, click the Install button to start the database installation.
Figure 11
The Database Configuration Assistant screen shows the progress of the database configuration.
Figure 12
The second Database Configuration Assistant screen shows the database configurations. Click the OK button to close the Database Configuration Assistant screen.
Figure 13
The Execute Configuration script screen appears and shows what scripts needs to be executed as the root user. As the root user, open a terminal and run both of the root.sh scripts. Next, click OK to close the Execute Configuration script screen.
Figure 14
The Finish screen shows the Enterprise Manager Database Control URL. Click the Close button to close the installation program
Figure 15
Next, as the oracle user drop Enterprise Manager Database Control by typing the following command. Substitute <sys pasword> with the sys password and <sysman password> with the sysman password selected during the database installation.
$ $ORACLE_HOME/bin/emca -deconfig dbcontrol db -repos drop -SYS_PWD <sys pasword> -SYSMAN_PWD <sysman password>
STARTED EMCA at Nov 22, 2011 1:44:08 PM
EM Configuration Assistant, Version 11.2.0.0.2 Production
Copyright (c) 2003, 2005, Oracle. All rights reserved.
Enter the following information:
Database SID: orcl
Listener port number: 1521
Do you wish to continue? [yes(Y)/no(N)]: Y
Nov 22, 2011 1:44:23 PM oracle.sysman.emcp.EMConfig perform
INFO: This operation is being logged at /u01/app/oracle/product/cfgtoollogs/emca/orcl/emca_2011_11_22_13_44_08.log.
Nov 22, 2011 1:44:23 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Nov 22, 2011 1:44:45 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Dropping the EM repository (this may take a while) ...
Nov 22, 2011 1:47:18 PM oracle.sysman.emcp.EMReposConfig invoke
INFO: Repository successfully dropped
Enterprise Manager configuration completed successfully
FINISHED EMCA at Nov 22, 2011 1:47:21 PM
Next, assess the database as sysdba and create a pfile from the spfile.
$ sqlplus / AS SYSDBA
SQL*Plus: Release 11.2.0.3.0 Production on Mon Apr 8 08:53:22 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create pfile from spfile;
File created.
SQL> quit
Next, edit the database init file and change the *.memory_target parameter to 3221225472, i.e. add a new line with "*.memory_target=3221225472" in the init file:
# vi /u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl.ora
*.memory_target=3221225472
:wq!
Next, create a directory for the redo log files, as shown in the next example.
# mkdir /u01/app/oracle/product/redo_logs/
Next, access the database as sysdba and make the following initialization parameter changes, then restart the database.
sqlplus / AS SYSDBA
ALTER SYSTEM SET processes=300 SCOPE=SPFILE;
System altered.
ALTER SYSTEM SET session_cached_cursors=200 SCOPE=SPFILE;
System altered.
ALTER SYSTEM SET sga_target=2G SCOPE=SPFILE;
System altered.
ALTER SYSTEM SET shared_pool_size=600M SCOPE=SPFILE;
System altered.
ALTER SYSTEM SET pga_aggregate_target=1G SCOPE=SPFILE;
System altered.
ALTER SYSTEM SET job_queue_processes=20 SCOPE=SPFILE;
System altered.
ALTER DATABASE force logging;
System altered.
ALTER TABLESPACE users FORCE LOGGING;
System altered.
EXEC dbms_auto_task_admin.disable('auto optimizer stats collection',null,null);
PL/SQL procedure successfully completed.
ALTER DATABASE ADD LOGFILE ('/u01/app/oracle/product/redo_logs/log1c.rdo', '/u01/app/oracle/product/redo_logs/log2c.rdo', '/u01/app/oracle/product/redo_logs/log3c.rdo') SIZE 100M;
System altered.
SHUTDOWN IMMEDIATE;
SQL> CREATE SPFILE FROM PFILE;
SQL> startup;
ORACLE instance started.
Total System Global Area 3206836224 bytes
Fixed Size 2217632 bytes
Variable Size 1744832864 bytes
Database Buffers 1442840576 bytes
Redo Buffers 16945152 bytes
Database mounted.
Database opened.
SQL> quit
Automating Database Startup and Shutdown
There are several steps to automate the database startup and shutdown process with Oracle Linux.
Once the database has been installed, a file called oratab is created in the /etc directory. The oratab file has a Y/N flag to specify if the database should be re-started when the server boots.
As root, edit the /etc/oratab file and change “N” to “Y”, as shown below.
The default setting is N, as shown in the next example.
orcl:/u01/app/oracle/product/11.2.0/dbhome_1:N
Change the N to Y, as shown in the next example.
orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y
The next example shows an oratab file from the above database installation with the Y flag.
# cat /etc/oratab
#
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, ':', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
orcl:/u01/app/oracle/product/11.2.0/dbhome_1:Y
Next, as root, create a database startup and shutdown script named dbora /etc/init.d. The dboar script calls the dbstart and dbshut routines.
The next example show the dbora script.
# vi /etc/init.d/dbora
#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
ORA_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart $ORA_HOME"
touch /var/lock/subsys/dbora
;;
'stop')
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME"
rm -f /var/lock/subsys/dbora
;;
esac
:wq!
After the script is created, set the privileges for dbora to 750, by typing “chmod 750 /etc/init.d/dbora”. The dbora script can now be configured as a Linux service.
Next, set the runlevels for the dbora service to 3, 4 and 5 by typing “chkconfig dbora on”. Typing “chkconfig --list|grep dbora” will validate the dbora script is on at runlevels 3, 4 and 5, as shown in the next example.
# chkconfig --list|grep dbora
dbora 0:off 1:off 2:on 3:on 4:on 5:on 6:off
The last step is to created soft links for init.d to automate the database startup and shutdown process with Oracle Linux boot process. As root, type the following commands to create the init.d soft links.
# ln -s /etc/init.d/dbora /etc/rc.d/rc0.d/K01dbora
# ln -s /etc/init.d/dbora /etc/rc.d/rc3.d/S96dbora
# ln -s /etc/init.d/dbora /etc/rc.d/rc5.d/S96dbora
Oracle Enterprise Manager 12c Installation
This section walks through an Advanced installation of the Oracle Enterprise Manager 12c Release 2 (12.1.0.2) Oracle Management Service and the Oracle Management Agent using the Oracle Universal Installer (OUI) on Oracle Linux 5U9.
Tip: Make sure that the Oracle user environmental variables are not set until after the installation of Oracle Enterprise Manager. For example, do not setup the .bash_profile file until after the installation of all the software. To temporarily unset the Oracle user environmental variables, as the oracle user type "unset ORACLE_BASE ORACLE_HOME EMDROOT AGENT_HOME OMS_HOME ORACLE_INSTANCE ORACLE_SID ORACLE_UNQNAME ORACLE_TERM".
With the software downloaded and staged for the Oracle Linux host, as the oracle user, run the runInstaller script by typing "./runInstaller" as shown in the next example.
# ssh -X oracle@<ORACLE MANAGEMENT SERVICE HOST>
$ cd /u01/app/stage/oem12c
$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 400 MB. Actual 3965 MB Passed
Checking swap space: must be greater than 150 MB. Actual 6160 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-12-01_11-13-51AM. Please wait ...
On the My Oracle Support Details screen, to receive support information (optional), enter your Email address and My Oracle Support Password and click the Next button, or uncheck the I wish to receive security updates via My Oracle Support checkbox and click the Next button.
Figure 16
On the Sofware Updates screen you have the following options:
- Select Skip to not search My Oracle Support for updates or to install updates from a local directory
- Select Local Directory if you have allready downloaded and staged updates
- Select My Oracle Support (Requires Internet Connection) to enter your My Oracle Support credentials to search My Oracle Support for updates.
Note: As of this writing there are several Oracle Enterprise Manager 12c updates available from My Oracle Support.
In this example we selected My Oracle Support (Requires Internet Connection), entered our My Oracle Support User Name and Password, then clicked Serach for Updates.
Figure 17
The Sofware Updates screen shows the avilable updates. Click the Next button.
Note: Clicking Next generates a Warning message informing you that the installer will be restarted.
Figure 18
Figure 19 shows a Warning message informing you that the installer will be restarted.
Once the installer restarts (up to 6 minutes), your presented with the My Oracle Support Details screen. To receive support information (optional), enter your Email address and My Oracle Support Password and click the Next button, or uncheck the I wish to receive security updates via My Oracle Support checkbox and click the Next button.
Figure 20
On the Prerequisite Checks screen the installer checks the system prerequisites. Failed steps can be fixed and be retested or just ignored.
The Prerequisite Checks screen shows if the minimum system requirements to perform the installation are met.
- Click Rerun if you fixed the problems and you would like to verify the system requirements again.
- Click Ignore to ignore the problems and move forward with the database installation.
Click the Next button to proceed.
Figure 21
On the Installation Types screen select Advanced under Create a new Enterprise Manager System. Click the Next button to proceed.
Figure 22
From the Installation Details screen enter or Browse to the Middelware Home Location, i.e. /u01/app/oracle/product/Middleware, and the Agant Base directory, i.e. /u01/app/oracle/product/agent. Unlike previouse releases, the agent base directory can not be in the Middleware home. The Host Name should auto-populate. If the hostname does not auto-populate, enter the fully qualified domain name (FQDN) of the host. Click the Next button to proceed.
Figure 23
On the Plug-in Deployment screen select the desired Plug-ins. Accept the defauls and to support subsequent chapters of the Oracle Cloud Cookbook, please select Oracle Chargeback and Capacity Planning, Oracle Cloud Application and Oracle Virtualization. Click the Next button to proceed.
Figure 24
On the WebLogic Server Configuration Details screen enter the WebLogic User Name and Password for the GCDomain and the Node Manager Password. The OMS Instance Base Location should auto-populate. Click the Next button to proceed.
Tip: The WebLogic and Node Manager passwords can not start with a number.
On the Database Connection Details screen enter the Database Host Name, the Database Port number, the Database Service ID, the Database SYS Password and the Deployment size. Click the Next button to proceed.
The OEM Deployment sizes are as follows:
- Small < 100 agents < 1000 targets
- Medium < 1000 agents < 10,000 targets
- Large > 1000 agents > 10,000 targets
Tip: Make sure that no Oracle Database environmental variables are set until after the installation of the Oracle Management Manager. If the Oracle environmental variables are set, i.e. in the ~/.bash_profile file or by hand, the Configuration Details screen will generate errors. To temporarily unset the Oracle user environmental variables, as the oracle user type "unset ORACLE_BASE ORACLE_HOME EMDROOT AGENT_HOME OMS_HOME ORACLE_INSTANCE ORACLE_SID ORACLE_UNQNAME ORACLE_TERM".
Figure 26
On the Repository Configuration Details screen, enter the SYSMAN Password and the OMA Registration Password. Accept the defaults for the Management Tablespace, Configuration Data Tablespace and the IVM Diagnostics Data Tablespace. Click the Next button to proceed.
Figure 27
From the Port Configuration Details screen accept the defaults and click the Next button to proceed.
Figure 28
On the Review screen, click the Install button to start the product installation.
Figure 29
The Installation Progress Details screen shows the installation progress. The Installation Progress Details screen remains open until the last Finish screen.
Figure 30
The Execute Configuration script screen appears and shows what scripts needs to be executed as the root user. Next, as the root user open another terminal window to the host, and run the allroot.sh script.
After running the allroot.sh script, click OK to close the Execute Configuration script screen.
The Finish screen shows the location of the setupinfo.txt file and the URLs for Oracle Enterprise Manager Cloud Control and the WebLogic Admin server. Click the Close button to close the installation program
Note: The details from the Finish screen are also available in the file setupinfo.txt file.
Figure 32
The following examples how the setupinfo.txt file.
# cat /u01/app/oracle/product/Middleware/oms/install/setupinfo.txt
This information is also available at:
/u01/app/oracle/product/Middleware/oms/install/setupinfo.txt
See below for information pertaining to your Enterprise Manager installation:
Use the following URL to access:
1. Enterprise Manager Cloud Control URL: https://<HOST NAME>:7799/em
2. Admin Server URL: https://oem-tuvok.sf.mokum.com:7102/console
The following details need to be provided during the additional OMS install:
1. Admin Server Hostname: <HOST NAME>
2. Admin Server Port: 7102
NOTE:
An encryption key has been generated to encrypt sensitive data in the Management Repository. If this key is lost, all encrypted data in the Repository becomes unusable. Please run following command to backup the Management Service configuration including the emkey and keep the backup on another system:
emctl exportconfig oms -dir <backup location>
Open a browser and enter the Enterprise Manager Cloud Control URL, i.e. https://<HOST NAME>:7799/em. Enter sysman in the User Name text box and enter the password specified during the installation in the Password text box. Click the Logon button to proceed.
Figure 33
On the Oracle Enterprise Manager Cloud Control 12c License Agreement page click the I Accept button to accept the License Agreement and access Cloud Control 12c.
Figure 34
Next, you are presented with the Select Enterprise Manager Home page. You can select one of the home pages now or later as your Oracle Enterprise manager home page.
Figure 35

.bash_profile
Add the following Oracle Settings in the /home/oracle/.bash_profile file as a reference point for your 12c environment.
Note: The following .bash_profile file can be used “as is” with an all-in-one Oracle Enterprise Manager 12c Installation. For a fresh all-in-one Oracle Enterprise Manager Cloud Control 12c installation, do “not” set the Oracle environment until “after” the installation.
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle/product; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/11.2.0/dbhome_1; export ORACLE_HOME
EMDROOT=$ORACLE_BASE/11.2.0/dbhome_1; export EMDROOT
AGENT_HOME=$ORACLE_BASE/agent/agent_inst; export AGENT_HOME
OMS_HOME=$ORACLE_BASE/Middleware/oms; export OMS_HOME
ORACLE_INSTANCE=/u01/app/oracle/product/Middleware/gc_inst/WebTierIH1; export ORACLE_INSTANCE
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi