Oracle : install Enterprise Manager 12c

De Wiki de Romain RUDIGER
Aller à : navigation, rechercher
  • OS Red Hat 5.8
  • DB Oracle 11.2.0.3.0

Installation

Unzip the files:

[oracle@lab-oem OEM-12.1.0.2]$ unzip em12cr2_linux64_disk1.zip; unzip em12cr2_linux64_disk2.zip; unzip em12cr2_linux64_disk3.zip

Set these DB parameters:

alter system set processes=300 scope=spfile sid='*';
alter system set sga_target=1G scope=spfile sid='*';
alter system set session_cached_cursors=200 scope=spfile sid='*';
alter system set shared_pool_size=600M scope=spfile sid='*';
shutdown immediate;
startup

Run the installer:

[oracle@lab-oem OEM-12.1.0.2]$ ./runInstaller
Starting Oracle Universal Installer...
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step01.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step02.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step03.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step04.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step05.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step06.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step06-1.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step06-2.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step07.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step08.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step08-1.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step08-2.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step08-3.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step08-4.png
[root@lab-oem ~]# /OEMDB/app/MiddleWare/oms/allroot.sh

Starting to execute allroot.sh .........

Starting to execute /OEMDB/app/MiddleWare/oms/root.sh ......
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /OEMDB/app/MiddleWare/oms

Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n)
[n]: y
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
/etc exist
/OEMDB/app/MiddleWare/oms
Finished execution of  /OEMDB/app/MiddleWare/oms/root.sh ......


Starting to execute /OEMDB/app/Agent/core/12.1.0.2.0/root.sh ......
Finished product-specific root actions.
/etc exist
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step08-5.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step09.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step10.png

Log In

Log in with the sysman account.

Oracle Enterprise Manager 12c 12.1.0.2-installer-Step11.png
Oracle Enterprise Manager 12c 12.1.0.2-installer-Step12.png

Configuration

This is my start/stop script for the DB instance (don't forget to set the flag in the oratab):

#! /bin/sh
# chkconfig: 2345 90 10
# description: OpenSSH server daemon

ORACLE_HOME=/OEMDB/oracle/product/11.2.0

case $1 in
'start')
        su - oracle -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
        ;;
'stop')
        su - oracle -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
        ;;
*)
        echo "usage: $0 {start|stop}"
        exit
        ;;
esac

exit

The installer set-up a gcstartup script in '/etc/init.d/gcstartup'.

Agent status:

[oracle@lab-oem ~]$ /OEMDB/app/Agent/core/12.1.0.2.0/bin/emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
---------------------------------------------------------------
Agent Version     : 12.1.0.2.0
OMS Version       : 12.1.0.2.0
Protocol Version  : 12.1.0.1.0
Agent Home        : /OEMDB/app/Agent/agent_inst
Agent Binaries    : /OEMDB/app/Agent/core/12.1.0.2.0
Agent Process ID  : 5133
Parent Process ID : 4935
Agent URL         : https://lab-oem.novalan.priv:3872/emd/main/
Repository URL    : https://lab-oem.novalan.priv:4901/empbs/upload
Started at        : 2012-11-10 18:50:57
Started by user   : oracle
Last Reload       : (none)
Last successful upload                       : 2012-11-10 19:16:00
Last attempted upload                        : 2012-11-10 19:16:00
Total Megabytes of XML files uploaded so far : 0.53
Number of XML files pending upload           : 0
Size of XML files pending upload(MB)         : 0
Available disk space on upload filesystem    : 17.67%
Collection Status                            : Collections enabled
Heartbeat Status                             : Ok
Last attempted heartbeat to OMS              : 2012-11-10 19:15:10
Last successful heartbeat to OMS             : 2012-11-10 19:15:10
Next scheduled heartbeat to OMS              : 2012-11-10 19:16:10

---------------------------------------------------------------
Agent is Running and Ready

OMS status:

[oracle@lab-oem ~]$ /OEMDB/app/MiddleWare/oms/bin/emctl status oms
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
WebTier is Up
Oracle Management Server is Up

Memory usage for one instance and the OMS:

[oracle@lab-oem ~]$ free -m
             total       used       free     shared    buffers     cached
Mem:          4953       4819        133          0         18       1848
-/+ buffers/cache:       2952       2000
Swap:         3999         32       3967

Reset OMS sysman password

From emctl:

     emctl config oms -change_repos_pwd [-old_pwd <old_pwd>] [-new_pwd <new_pwd>] [-use_sys_pwd [-sys_pwd <sys_pwd>]]
          Note: Steps in changing Enterprise Manager Root (SYSMAN) password are:
                1) Stop all the OMSs using 'emctl stop oms'
                2) Run 'emctl config oms -change_repos_pwd' on one of the OMS
                3a) Restart AdminServer and all the OMSs using 'emctl stop oms -all' and 'emctl start oms'
                3b) If BI Publisher is installed, restart the BI Publisher managed server(s) named 'BIP####'

Steps with the SYS account:

[oracle@lab-oem ~]$ /OEMDB/app/MiddleWare/oms/bin/emctl stop oms
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
Oracle Management Server is Down

[oracle@lab-oem ~]$ /OEMDB/app/MiddleWare/oms/bin/emctl config oms -change_repos_pwd -new_pwd Oracle123 -use_sys_pwd -sys_pwd Oracle123
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.

Changing passwords in backend ...
Passwords changed in backend successfully.
Updating repository password in Credential Store...
Successfully updated Repository password in Credential Store.
Restart all the OMSs using 'emctl stop oms -all' and 'emctl start oms'.
Successfully changed repository password.

[oracle@lab-oem ~]$ /OEMDB/app/MiddleWare/oms/bin/emctl stop oms -all
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Already Stopped
AdminServer Successfully Stopped
Oracle Management Server is Down

[oracle@lab-oem ~]$ /OEMDB/app/MiddleWare/oms/bin/emctl start oms
Oracle Enterprise Manager Cloud Control 12c Release 2
Copyright (c) 1996, 2012 Oracle Corporation.  All rights reserved.
Starting Oracle Management Server...
Starting WebTier...
WebTier Successfully Started
Oracle Management Server Successfully Started
Oracle Management Server is Up