Académique Documents
Professionnel Documents
Culture Documents
sales@mokumsolutions.com
Copyright 2014 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
worlds 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. Rodsteins 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
Table of Contents
Oracle Enterprise Manager 12c Installation and Upgrades Introduction
Oracle Enterprise Manager 12c Inter Component Communication and Data Exchange
Oracle Enterprise Manager 12c System Design Considerations
Oracle Enterprise Manager 12c Server Sizing
Oracle Enterprise Manager 12c Release 4 Upgrade
Oracle Enterprise Manager 12c Linux Operating System Installation Prerequisites
Install the oracle-validated RPM on Oracle Linux 5
Install the oracle-validated RPM from the Oracle Public Yum Repository on Oracle Linux 5
Install the oracle-rdbms-server preinstall on Oracle Linux 6
Install the oracle-validated or oracle-rdbms-server preinstall RPM from the Oracle Linux DVD
Disable iptables
Disable SELinux
Congure the /etc/hosts File
Congure SSH and X11 Forwarding
Oracle Database 11g Enterprise Edition R2 (11.2.0.4.0) Installation Prerequisites
Create the Required Directories using the Optimal Flexible Architecture (OFA) Standard
Adjust the Shared Memory File System for the Database Host
Congure the ulimit /etc/security/limits.conf Values
Oracle Database 11g Enterprise Edition R2 (11.2.0.4.0) Installation
Automate the Oracle Database Startup and Shutdown
Oracle Database 12c Release 1 Enterprise Edition (12.1.0.1.0) Installation Prerequisites
Download and Stage the Database Software
Create the Required Directories using the Optimal Flexible Architecture (OFA) Standard
Congure the ulimit, /etc/security/limits.conf and /etc/security/limits.d/oracle-rdbms-server-12cR1-preinstall.conf Values
As the Installing User, Setup ~/.bash_prole
Oracle Database 12c Release 1 Enterprise Edition (12.1.0.1.0) Installation
Post Installation Steps
Oracle Enterprise Manager 12c R4 Installation
Congure the .bash_prole File with the Oracle Environment Variables (Oracle 11gR2 DB)
Change Log
Revision
Change Description
Updated By
Date
1.0
Document Creation
Roddy Rodstein
12/02/11
1.1
Roddy Rodstein
09/27/12
1.2
Roddy Rodstein
05/06/13
1.3
Roddy Rodstein
09/02/13
1.4
Content Refresh
Roddy Rodstein
01/05/14
1.5
Roddy Rodstein
07/16/14
4 of 52
http://mokumsolutions.com
Figure 1 shows an all-in-one Oracle Enterprise Manager 12c installation with the Oracle Management Repository and the Oracle Management
Service on a single Linux node with three managed Oracle Linux hosts. All-in-one Oracle Enterprise Manager 12c installations are ideal for
evaluations.
Figure 2 shows a multiple node Oracle Enterprise Manager 12c installation with the Oracle Management Repository on one Linux node, the
Oracle Management Service on a second Linux node with three managed Oracle Linux hosts. Multiple node Oracle Enterprise Manager 12c
installations are ideal for small, medium and large sites.
Figure 3 shows a high availability Oracle Enterprise Manager 12c installation with the Oracle Management Repository on a two node Linux RAC
cluster, the Oracle Management Service on two load balanced Linux nodes with three managed Oracle Linux hosts. High availability Oracle
Enterprise Manager 12c installations are ideal for medium and large sites.
5 of 52
http://mokumsolutions.com
There are several Oracle Enterprise Manager Cloud Control 12c Release 4 Installation and Upgrade options.
1. The rst option is a fresh installation using the Oracle Enterprise Manager Cloud Control 12c Release 4 installation media.
2. The second option for Oracle Enterprise Manager on Release1 (12.1.0.1+BP1) or Release 2 (12.1.0.2), or on older releases 11g and 10.2.0.5,
is to download the Oracle Enterprise Manager Cloud Control 12c Release 4 installation media, then upgrade directly to Oracle Enterprise
Manager Release 4.
As of this writing, Oracle Enterprise Manager 12c Release 1 (12.1.0.1) up to Release 2 (12.1.0.4) are supported on the following Oracle Linux and
Red Hat Enterprise Linux x86-64 operating systems:
Oracle Linux and Red Hat Enterprise Linux 6+ (all 6 releases, i.e. 6.0 through 6U5)
Oracle Linux and Red Hat Enterprise Linux 5+ (all 5 releases, i.e. 5.0 through 5U10)
As of this writing, the Oracle Management Repository is certied with the following database releases for Oracle Linux 5 and 6, x86_64:
12.1.0.1.0
11.2.0.4.0
11.2.0.3.0
11.2.0.2.0
11.2.0.1.0
11.1.0.7.0
10.2.0.5.0
Oracle Enterprise Manager 12c Inter Component Communication and Data Exchange
Oracle Enterprise Manager 12c Could Control, the Oracle Management Repository, the Oracle Management Service and the Oracle Management
Agents and Plug-ins can be on dierent hosts throughout your enterprise. Understanding Oracle Enterprise Manager's intra component
communication and data exchange will help you congure your rewalls in order to allow Oracle Enterprise Manager to operate in your
enterprise. During the Oracle Enterprise Manager installation, the default communication ports for each component will be selected and
assigned. If the default ports are modied be sure to use the new port assignments when you congure your rewalls.
Table 1 shows the default ports used by Oracle Enterprise Manager.
Service
Default Port
4889 - 4898
3872
1521
7788 - 7798
7799 -7809
7001
7101 - 7200
6 of 52
http://mokumsolutions.com
Service
Default Port
7201 - 7300
7301 - 7400
7401 - 7500
3800
3801
51099
5503
55000
OMS Hosts
OMS CPU
Cores
OMS
RAM
DB
Hosts
DB CPU
Cores
DB
RAM
All-in-one
Install Recommendation
*4 GB
Yes
*6 GB
No
*6 GB
1 or 2
*2 with
RAC
4
4 for each RAC
node
No
*6 GB
2
*2 with
RAC
16
No
15 GB
50 GB
10
25
200 GB
20
100
7 of 52
http://mokumsolutions.com
Deployment Size
15 GB
300 GB
40
150
Table 4 shows the minimum storage requirements for a standalone Oracle Management Agent installation.
Platform
Storage
TMP Directory
Linux 32 bit
1.2 GB
400 MB
Linux x86_64
1.2 GB
400 MB
Patches
On Linux apply patch 17082366 (Patch Set Update 17), then apply patch 9577583,
and patch 8405205.
Note: Consult the patch README for the Database patch installation details.
2) Conrm that the privileges for the DBMS_RANDOM package meets Oracle's prerequisites. As the installing user, i.e. the user account used to install the Oracle database, set the
following environment variables.
$
$
$
$
# sqlplus / as sysdba
GRANT EXECUTE ON dbms_random TO dbsnmp;
GRANT EXECUTE ON dbms_random TO sysman;
REVOKE EXECUTE ON dbms_random FROM public;
3) Conrm that there are no invalid objects in the Oracle Management Repository database.
SELECT owner, object_name, object_type
FROM dba_objects
WHERE status = 'INVALID'
AND owner IN ('SYS', 'SYSTEM', 'SYSMAN', 'MGMT_VIEW', 'DBSNMP', 'SYSMAN_MDS');
If you need to recompe, the following examples show the syntax:
EXEC UTL_RECOMP.recomp_serial('SYS');
EXEC UTL_RECOMP.recomp_serial('DBSNMP');
EXEC UTL_RECOMP.recomp_serial('SYSMAN');
4) Conrm that the "/etc/security/limits.conf" le has the number of le descriptors to at least 4096. As root, edit the /etc/security/limits.conf le
and conrm that the following line exists:
oracle soft nole 4096
5) Backup the Oracle Management Repository database.
6) Copy the emkey using the following commands. The WebLogic user account name and password will be required to copy the emkey. Change
the path, hostname, and database SID to meet your requirments.
$ export OMS_HOME=/u01/app/oracle/product/Middleware/oms
$ OMS_HOME/bin/emctl cong emkey -copy_to_repos_from_le -repos_host <MY HOSTNAME> -repos_port 1521 -repos_sid <MY SID>
-repos_user sysman -emkey_le $OMS_HOME/sysman/cong/emkey.ora
Oracle Enterprise Manager Cloud Control 12c Release 3
Copyright (c) 1996, 2013 Oracle Corporation. All rights reserved.
Enter Admin User's Password :
Enter Enterprise Manager Root (SYSMAN) Password :
The EMKey has been copied to the Management Repository. This operation will cause the EMKey to become unsecure.
After the required operation has been completed, secure the EMKey by running "emctl cong emkey -remove_from_repos".
$
8 of 52
http://mokumsolutions.com
7) Stop the Oracle Management Service.
$OMS_HOME/bin/emctl stop oms -all
8) Create a directory for the out-of-place Oracle Management Service upgrade.
$ mkdir -p /u01/app/oracle/product/MiddelwareR4
9) Unzip the Oracle Enterprise Manager R4 software into a staging directory. Change the path to meet your requirments.
$ mkdir -p /u01/app/oracle/product/MiddelwareR4
$ unzip -d /u01/scratch em12104_linux64_disk1.zip
$ unzip -d /u01/scratch em12104_linux64_disk2.zip
$ unzip -d /u01/scratch em12104_linux64_disk3.zip
$ cd /u01/app/oracle/oms12cr4
10) Run the Oracle Universal Installer (OUI) to begin upgrade.
$ cd /u01/scratch
$ ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 400 MB. Actual 12133 MB Passed
Checking swap space: must be greater than 150 MB. Actual 14322 MB Passed
Checking monitor: must be congured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-06-24_05-30-24AM. Please wait
$
After a couple moments, the Oracle Universal Installer will appear and show Step 1 or 9, the My Oracle Support Details screen.
My Oracle Support Details screen
On the My Oracle Support Details screen to receive information from Oracle (optional), enter your email address, select the I wish to receive
security updates via My Oracle Support checkbox, enter your 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 4
9 of 52
http://mokumsolutions.com
10 of 52
http://mokumsolutions.com
11 of 52
http://mokumsolutions.com
Error screen
On the Error screen click Yes to automatically fix the issues and proceed.
Figure 10
12 of 52
http://mokumsolutions.com
13 of 52
http://mokumsolutions.com
Review screen
On the Review screen conrm the installation setting and continue if correct. Click the Install button to proceed with installation.
Figure 14
14 of 52
http://mokumsolutions.com
# /u01/app/oracle/product/MiddlewareR4/oms/allroot.sh
Starting to execute allroot.sh .........
Starting to execute /u01/app/oracle/product/MiddlewareR4/oms/root.sh ......
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/MiddlewareR4/oms
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab le as needed by
Database Conguration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specic root actions will be performed.
/etc exist
Creating /etc/oragchomelist le...
/u01/app/oracle/product/MiddlewareR4/oms
Finished execution of /u01/app/oracle/product/MiddlewareR4/oms/root.sh ......
Starting to execute /u01/app/oracle/product/agentr4/core/12.1.0.4.0/root.sh ......
Finished product-specic root actions.
15 of 52
http://mokumsolutions.com
Finished execution of /u01/app/oracle/product/agentr4/core/12.1.0.4.0/root.sh ......
#
Installation Progress Details screen
Once the Installation Progress Details screen shows 100%, you will be preseneted with the FInish screen.
Figure 17
Finish screen
The Finish screen shows the location of the setupinfo.txt le 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 le setupinfo.txt le.
Figure 18
16 of 52
http://mokumsolutions.com
$ cat /u01/app/oracle/product/MiddlewareR4/oms/install/setupinfo.txt
This information is also available at:
/u01/app/oracle/product/MiddlewareR4/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://oem-sisko.local.mokumsolutions.com:7802/em
2. Admin Server URL: https://oem-sisko.local.mokumsolutions.com:7102/console
The following details need to be provided during the additional OMS install:
1. Admin Server Hostname: oem-sisko.local.mokumsolutions.com
2. Admin Server Port: 7102
You can nd the details on ports used by this deployment at : /u01/app/oracle/product/MiddlewareR4/oms/install/portlist.ini
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.
A backup of the OMS conguration is available in /u01/app/oracle/product/gc_inst/em/EMGC_OMS1/sysman/backup on host
oem-sisko.local.mokumsolutions.com. See Cloud Control Administrators Guide for details on how to back up and recover an OMS.
NOTE: This backup is valid only for the initial OMS conguration. For example, it will not reect plug-ins installed later, topology changes like the
addition of a load balancer, or changes to other properties made using emctl or emcli. Backups should be created on a regular basis to ensure
they capture the current OMS conguration. Use the following command to backup the OMS conguration:
/u01/app/oracle/product/MiddlewareR4/oms/bin/emctl exportcong oms -dir <backup dir>
The upgrade is now complete and ready for login. You will be presneted with the Accessibility Preferance screen. Selct your Accessibility
Preferance or click I'll deal with this later to access Cloud Control.
Figure 19
17 of 52
http://mokumsolutions.com
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.
Install the oracle-validated RPM from the Oracle Public Yum Repository on Oracle Linux
5
To install the oracle-validated 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-el5.repo
# yum install oracle-validated
Note: The oracle-validated RPM is only for Oracle Linux 4 and 5, not 6. For Oracle Linux 6, install the oracle-rdbms-server preinstall RPM.
By default the public-yum-el5.repo le has the el5_latest RPM channel enabled. The Oracle public yum server latest RPM channel include the
base OS version installation RPM packages along with the latest software patches, updates and xes. Patch jobs using the latest RPM channel
update hosts to their respected latest version update with the latest software patches, updates and xes. A patch job executed on a Oracle Linux
5U5 host would update the host from 5U5 to 5U10 with the latest latest software patches, updates and xes. To keep a host at its respected
update level, a valid CSI and the Unbreakable Linux Network is required. With the Unbreakable Linux Network, it is possible to register a host
the el*/ol*_base channel along with the el*/ol*_patch RPM channel. When hosts are patched using the el*/ol*_base and el*/ol*_patch RPM
channels, the hosts are patched with the latest software patches, updates and xes from their respected update channel, i.e. 5, 5U1, 5U2 and
5U3, etc...
Note: If the host is not 5U10/latest, once the oracle-validated is installed, edit the public-yum-el5.repo le and disable the el5_latest RPM channel
by changing enabled=1 to enabled=0.
The next example shows the el5_latest entry from the public-yum-el5.repo le with the enabled=1 ag, i.e. the el5_latest RPM repository is
enabled.
[el5_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/latest/$basearch/
gpgkey=le:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
The next example shows the el5_latest entry from the public-yum-el5.repo le with the enabled=0 ag, i.e. the el5_latest RPM repository is
deisabled.
[el5_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL5/latest/$basearch/
gpgkey=le:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
A good practice after the oracle-validated RPM installation is to set the password for the oracle user created during the script. As root, type the
following:
$ passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
$
18 of 52
http://mokumsolutions.com
Install the oracle-rdbms-server-11gR2-preinstall package as the root user:
# yum install oracle-rdbms-server-11gR2-preinstall
By default the public-yum-ol6.repo le has the ol6_latest RPM channel enabled. The Oracle public yum server latest RPM channel include the
base OS version installation RPM packages along with the latest software patches, updates and xes. Patch jobs using the latest RPM channel
update hosts to their respected latest version update with the latest software patches, updates and xes. A patch job executed on a Oracle Linux
6U1 host would update the host from 6u1 to 6U5 with the latest latest software patches, updates and xes. To keep a host at its respected update
level, a valid CSI and the Unbreakable Linux Network is required. With the Unbreakable Linux Network, it is possible to register a host the
el*/ol*_base channel along with the el*/ol*_patch RPM channel. When hosts are patched using the el*/ol*_base and el*/ol*_patch RPM channels,
the hosts are patched with the latest software patches, updates and xes from their respected update channel, i.e. 6, 6U1, 6U2 and 6U3, etc...
Note: If the host is not 6U5/latest, once the oracle-rdbms-server preinstall is installed, edit the public-yum-ol6.repo le and disable the el6_latest
RPM channel by changing enabled=1 to enabled=0.
The next example shows the el6_latest entry from the public-yum-el6.repo le with the enabled=1 ag, i.e. the el6_latest RPM repository is
enabled.
[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=le:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
The next example shows the el6_latest entry from the public-yum-el6.repo le with the enabled=0 ag, i.e. the el6_latest RPM repository is
disabled.
[ol6_latest]
name=Oracle Linux $releasever Latest ($basearch)
baseurl=http://public-yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/
gpgkey=le:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=0
A good practice after the rdbms-preinstall RPM installation is to set the password for the oracle user created during the script. As root, type the
following:
$ passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
$
19 of 52
http://mokumsolutions.com
Disable iptables
iptables is a userspace rewall application used to congure the Linux IPv4 and IPv6 packet ltering rulesets. iptables is installed and enabled by
default on Oracle Linux with a default policy and ruleset in /etc/syscong/iptables. iptables rules can be congured at the command line as well as
with the system setup utility, i.e. "/usr/bin/setup".
Host rewalls, for example iptables, are a fundamental part of an information security program. If your information security program requires
host rewalls, a best practice is to congure host rewalls during the last phase of the Enterprise Manager deployment.
iptables can be disabled by typing the following command as root.
# service iptables stop && service ip6tables stop && chkcong iptables o && chkcong ip6tables o
iptables can be re-inabled by typing the following command as root.
# service iptables start && service ip6tables start && chkcong iptables on && chkcong ip6tables on
Disable SELinux
Security Enhanced Linux (SELinux) is a default Linux feature that oers 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 congure
Security Enhanced Linux during the last phase of the Enterprise Manager deployment.
To conrm 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
/cong" le. Security Enhanced Linux can be re-enabled by changing the "SELINUX=disabled" entry to "SELINUX=enforcing" in the "/etc/selinux
/cong" le. A re-boot is required after changing the "SELINUX= value to enable to new settings.
20 of 52
http://mokumsolutions.com
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_cong by adding "ForwardX11 yes" to the le 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_cong le, 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.
If you get X11 forwarding request failed on channel 0 messages from an ssh connection, on the target Oracle Linux server edit the /etc/ssh/sshd_config file,
and ensure that "X11Forwarding yes" is not commented, add "X11UseLocalhost no", and uncomment "AddressFamily any". Next, restart sshd by typing "service sshd
restart", and your X11 apps will successfully run.
Create the Required Directories using the Optimal Flexible Architecture (OFA)
Standard
The Optimal Flexible Architecture (OFA) standard is a set of le naming recommendations for managing Oracle installations. The Optimal Flexible
Architecture standard oers mount point, directory, and le-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:
# mkdir -p /u01/app/oracle/product/
# chown -R oracle:oinstall /u01
# chmod -R 775 /u01
Adjust the Shared Memory File System for the Database Host
To meet the Oracle Management Repository conguration requirements, the shared memory le system size should be increased to 4 GB.
Note: The shared memory le system size needs to be increased only on the Database host.
To check the current size of the shared memory le system, type df -k /dev/shm as shown in the next example.
# df -k /dev/shm
Filesystem
1K-blocks
tmpfs
3056052
21 of 52
http://mokumsolutions.com
the /etc/security/limits.conf le and add the following two entries:
<UID> soft nole 4096
<UID> hard nole 4096
Conrm the new le limits by typing:
$ ulimit -n
and
$ /bin/sh -c "ulimit -n"
The value should be greater than 4096.
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
For this example we selected the Skip software updates option and then Next to proceed.
Figure 21
22 of 52
http://mokumsolutions.com
On the Select Install Option screen, select Create and congure a database. Click the Next button to proceed.
Figure 22
On the System Class screen, select the Server Class option. Click the Next button to proceed.
Figure 23
23 of 52
http://mokumsolutions.com
On the Grid Installation Options screen, select the Single instance database installation option. Click the Next button to proceed.
Figure 24
On the Select Install Type screen, select the Tipical install option. Click the Next button to proceed.
Figure 25
24 of 52
http://mokumsolutions.com
On the Typical Install Conguration screen, accept the defaults, enter a Administrative password. Click the Next button to proceed.
Figure 26
On the Create Inventory screen, accept the defaults. Click the Next button to proceed.
Figure 27
25 of 52
http://mokumsolutions.com
The Perform Prerequisite Checks screen shows if the minimum system requirements to perform the database installation are met.
Click Check Again, if you xed the problems and you would like to verify the system requirements again.
Click Fix & Check Again, if you want the installer to try to x 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 28
On the Summary screen, click the Install button to start the database installation.
Figure 29
26 of 52
http://mokumsolutions.com
The Database Conguration Assistant screen shows the progress of the database conguration.
Figure 30
The second Database Conguration Assistant screen shows the database congurations. Click the OK button to close the Database
Conguration Assistant screen.
Figure 31
27 of 52
http://mokumsolutions.com
The Execute Conguration 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 Conguration script screen.
Figure 32
The Finish screen shows the Enterprise Manager Database Control URL. Click the Close button to close the installation program
Figure 33
28 of 52
http://mokumsolutions.com
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 -decong dbcontrol db -repos drop -SYS_PWD <sys pasword> -SYSMAN_PWD <sysman password>
STARTED EMCA at Nov 22, 2011 1:44:08 PM
EM Conguration 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, 2013 1:44:23 PM oracle.sysman.emcp.EMCong perform
INFO: This operation is being logged at /u01/app/oracle/product/cfgtoollogs/emca/orcl/emca_2013_11_22_13_44_08.log.
Nov 22, 2013 1:44:23 PM oracle.sysman.emcp.util.DBControlUtil stopOMS
INFO: Stopping Database Control (this may take a while) ...
Nov 22, 2013 1:44:45 PM oracle.sysman.emcp.EMReposCong invoke
INFO: Dropping the EM repository (this may take a while) ...
Nov 22, 2013 1:47:18 PM oracle.sysman.emcp.EMReposCong invoke
INFO: Repository successfully dropped
Enterprise Manager conguration completed successfully
FINISHED EMCA at Nov 22, 2013 1:47:21 PM
Next, assess the database as sysdba and create a ple from the sple.
$ 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 ple from sple;
File created.
SQL> quit
Next, create a directory for the redo log les, as shown in the next example.
$ mkdir /u01/app/oracle/product/redo_logs/
Next, access the Database as sysdba and make either the Eval, Small, Medium, or Large Site initialization parameters, then restart the database.
The following tables show the minimum Oracle Management Repository Database settings for an Eval, Small, Medium and Large Site.
29 of 52
http://mokumsolutions.com
Table 6: Eval Conguration Minimum Database Settings
Parameter
Minimum Value
Processes
300
memory_target
700 MB
50 MB
shared_pool_size
450 MB
session_cached_cursors
remove
Minimum Value
processes
300
pga_aggregate_target*
1024 MB
sga_target*
2 GB
300 MB
shared_pool_size
600 MB
db_securele
PERMITTED
Minimum Value
processes
600
pga_aggregate_target*
1280 MB
sga_target*
4 GB
600 MB
shared_pool_size
600 MB
db_securele
PERMITTED
Minimum Value
processes
1000
pga_aggregate_target*
1536 MB
sga_target*
6 GB
1000 MB
shared_pool_size
600 MB
db_securele
PERMITTED
The next example shows applying the Small Site Oracle Management Repository Database initialization parameters, including force logging, and
adding the redo log les.
Tip: SQL commands to be entered are listed below in BOLD ITALIC.
sqlplus / AS SYSDBA
ALTER SYSTEM SET processes=300 SCOPE=SPFILE;
System altered.
ALTER SYSTEM SET pga_aggregate_target=1024M 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 db_securele=PERMITTED SCOPE=BOTH;
System altered.
ALTER DATABASE force logging;
System altered.
ALTER TABLESPACE users FORCE LOGGING;
System altered.
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.
30 of 52
http://mokumsolutions.com
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"
31 of 52
http://mokumsolutions.com
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
After the script is created, as root, set the privileges for dbora to 750, by typing:
# chmod 750 /etc/init.d/dbora
The dbora script can now be congured as a Linux service.
Next, as root, set the runlevels for the dbora service to 3, 4 and 5 by typing
# chkcong dbora on
Typing chkcong --list|grep dbora will validate the dbora script is on at runlevels 3, 4 and 5, as shown in the next example.
# chkcong --list|grep dbora
dbora 0:o 1:o 2:on 3:on 4:on 5:on 6:o
Create the Required Directories using the Optimal Flexible Architecture (OFA)
Standard
The Optimal Flexible Architecture (OFA) standard is a set of le naming recommendations for managing Oracle installations. The Optimal Flexible
Architecture standard oers mount point, directory, and le-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:
# mkdir -p /u01/app/oracle/product/12.1.0/dbhome_1
# chown -R oracle:oinstall /u01/*
# chmod -R 775 /u01/*
Tip: /u01 should be owned by root user
32 of 52
http://mokumsolutions.com
oracle
To
oracle
soft
nole
1024
soft
nole
4096
There is also a limit on the number of max user processes in the /etc/security/limits.d/90-nproc.conf le. As root, edit the /etc/security/limits.d
/90-nproc.conf le and make the following changes.
Change
* soft nproc 1024
To
* - nproc 16384
Conrm the new limits by looking at output of ulimit -a:
$ su - oracle
$ ulimit -a
core le size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
le size (blocks, -f) unlimited
pending signals (-i) 96073
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open les (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 16384
virtual memory (kbytes, -v) unlimited
le locks (-x) unlimited
33 of 52
http://mokumsolutions.com
34 of 52
http://mokumsolutions.com
35 of 52
http://mokumsolutions.com
36 of 52
http://mokumsolutions.com
Note: Consult with your DBA to conrm the Install congurations.
Click the Next button to proceed.
Figure 40
Summary screen
From the Summary screen please review the Summary screen to validate your install conguration settings. If changes are necessary use the
Edit links. Once the setting are all veried correct, click the Install button to begin the installation.
Figure 42
37 of 52
http://mokumsolutions.com
38 of 52
http://mokumsolutions.com
# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
# /u01/app/oracle/product/12.1.0/dbhome_1/root.sh
Performing root user operation for Oracle 12c
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/12.1.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab le...
Entries will be added to the /etc/oratab le as needed by
Database Conguration Assistant when a database is created
Finished running generic part of root script.
Now product-specic root actions will be performed.
#
Once the database binaries are in place, the installer launches the Database Conguration Assistant (DBCA). The Database Conguration
Assistant creates the database and shows the installation details, i.e. the log le, Global Database Name, SID and Server Parameter File name are
listed along with the EM Database Express URL for the database. Click the OK button to proceed.
Figure 45
39 of 52
http://mokumsolutions.com
Finish screen
From the Finish screen click Close to nish the database installation
Figure 46
40 of 52
http://mokumsolutions.com
Next, access the database as sysdba and create a ple from the sple ple.
$ sqlplus / AS SYSDBA
SQL*Plus: Release 12.1.0.1.0 Production on Mon Jun 23 14:31:06 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> create ple from sple;
File created.
SQL> quit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
$
Next, access the Database as sysdba and make either the Eval, Small, Medium, or Large Site initialization parameters, then restart the database.
The following tables show the minimum Oracle Management Repository Database settings for an Eval, Small, Medium and Large Site.
Table 10: Eval Conguration Minimum Database Settings
Parameter
Minimum Value
Processes
300
memory_target
700 MB
50 MB
shared_pool_size
450 MB
session_cached_cursors
remove
Minimum Value
processes
300
pga_aggregate_target*
1024 MB
sga_target*
2 GB
300 MB
shared_pool_size
600 MB
db_securele
PERMITTED
Minimum Value
processes
600
pga_aggregate_target*
1280 MB
sga_target*
4 GB
600 MB
shared_pool_size
600 MB
db_securele
PERMITTED
Minimum Value
processes
1000
pga_aggregate_target*
1536 MB
sga_target*
6 GB
1000 MB
shared_pool_size
600 MB
db_securele
PERMITTED
The next example shows applying the Small Site Oracle Management Repository Database initialization parameters, including force logging, and
adding the redo log les.
Tip: SQL commands to be entered are listed below in BOLD ITALIC.
sqlplus / AS SYSDBA
ALTER SYSTEM SET processes=300 SCOPE=SPFILE;
System altered.
ALTER SYSTEM SET pga_aggregate_target=1024M SCOPE=SPFILE;
System altered.
41 of 52
http://mokumsolutions.com
ALTER SYSTEM SET sga_target=2G SCOPE=SPFILE;
System altered.
ALTER SYSTEM SET shared_pool_size=600M SCOPE=SPFILE;
System altered.
ALTER SYSTEM SET db_securele=PERMITTED SCOPE=BOTH;
System altered.
ALTER DATABASE force logging;
System altered.
ALTER TABLESPACE users FORCE LOGGING;
System altered.
SQL> 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 300M;
Database altered.
SQL> SHUTDOWN IMMEDIATE;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup;
ORACLE instance started.
Total System Global Area 3791417344 bytes
Fixed Size
2295176 bytes
Variable Size
855640696 bytes
Database Buers
2919235584 bytes
Redo Buers
14245888 bytes
Database mounted.
Database opened.
SQL> quit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
$
Next validate that the httpsport is 5500.
$ sqlplus / AS SYSDBA
SQL*Plus: Release 12.1.0.1.0 Production on Mon Jun 23 15:08:01 2014
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> SELECT dbms_xdb_cong.gethttpsport FROM dual;
GETHTTPSPORT
-----------5500
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
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.
# cat /etc/init.d/dbora
#!/bin/sh
# chkcong: 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/12.1.0/db_1
ORA_OWNER=oracle
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
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
42 of 52
http://mokumsolutions.com
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut $ORA_HOME"
rm -f /var/lock/subsys/dbora
;;
esac
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 congured as a Linux service.
Next, set the runlevels for the dbora service to 3, 4 and 5 by typing:
# chkcong dbora on
Typing chkcong --list|grep dbora will validate the dbora script is on at runlevels 3, 4 and 5, as shown in the next example.
# chkcong --list|grep dbora
dbora 0:o 1:o 2:on 3:on 4:on 5:on 6:o
The last step is to create 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
You should test the script by rebooting the machine and validating that the database starts on reboot.
43 of 52
http://mokumsolutions.com
Checking Temp space: must be greater than 400 MB. Actual 12133 MB Passed
Checking swap space: must be greater than 150 MB. Actual 14322 MB Passed
Checking monitor: must be congured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-06-24_05-30-24AM. Please wait
$
My Oracle Support Details screen
From the My Oracle Support Details 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 47
44 of 52
http://mokumsolutions.com
45 of 52
http://mokumsolutions.com
46 of 52
http://mokumsolutions.com
Figure 52
47 of 52
http://mokumsolutions.com
Small
Medium
Large
48 of 52
http://mokumsolutions.com
Figure 56
Review screen
From the Review screen review the installation setting and continue if correct. Click the Install button to proceed with installation.
Figure 57
49 of 52
http://mokumsolutions.com
# /u01/app/oracle/product/MiddlewareR4/oms/allroot.sh
Starting to execute allroot.sh .........
Starting to execute /u01/app/oracle/product/MiddlewareR4/oms/root.sh ......
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/MiddlewareR4/oms
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab le as needed by
Database Conguration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specic root actions will be performed.
/etc exist
Creating /etc/oragchomelist le...
/u01/app/oracle/product/MiddlewareR4/oms
Finished execution of /u01/app/oracle/product/MiddlewareR4/oms/root.sh ......
Starting to execute /u01/app/oracle/product/agentr4/core/12.1.0.4.0/root.sh ......
Finished product-specic root actions.
Finished execution of /u01/app/oracle/product/agentr4/core/12.1.0.4.0/root.sh ......
#
Finish screen
50 of 52
http://mokumsolutions.com
From the Finish screen your presented with the location of the setupinfo.txt le 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 le setupinfo.txt le.
Figure 60
NOTE: This backup is valid only for the initial OMS conguration. For example, it will not reect plug-ins installed later, topology changes like the
addition of a load balancer, or changes to other properties made using emctl or emcli. Backups should be created on a regular basis to ensure
they capture the current OMS conguration. Use the following command to backup the OMS conguration:
/u01/app/oracle/product/MiddlewareR4/oms/bin/emctl exportcong oms -dir <backup dir>
The installation is now complete and ready for login
Congure the .bash_prole File with the Oracle Environment Variables (Oracle
11gR2 DB)
After the Oracle Enterprise Manager 12c R4 Installation, add the following Oracle Settings in the /home/oracle/.bash_prole le as a reference
point for your 12c environment.
Note: The following .bash_prole le can be used as is with an all-in-one Oracle Enterprise Manager 12c Installation. For a fresh all-in-one
51 of 52
http://mokumsolutions.com
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
52 of 52