É muito simples iniciar o banco de dados, o OMS e o agent em um ambiente que usa OEM. Você somente precisa setar as variáveis de ambiente e efetuar um start como abaixo:
##START DB
- export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
- export ORACLE_SID=OEM
- sqlplus “/as sysdba”
- startup
- select instance_name, status, host_name from gv$instance;
[oracle@ocm agent11g]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
[oracle@ocm agent11g]$ export ORACLE_SID=OEM
[oracle@ocm agent11g]$ sqlplus ” /as sysdba”SQL*Plus: Release 11.2.0.3.0 Production on Thu Oct 22 19:53:29 2015
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.Total System Global Area 636100608 bytes
Fixed Size 1346812 bytes
Variable Size 448791300 bytes
Database Buffers 171966464 bytes
Redo Buffers 13996032 bytes
Database mounted.
Database opened.
SQL> select instance_name, status, host_name from gv$instance;INSTANCE_NAME STATUS
—————- ————
HOST_NAME
—————————————————————-
OEM OPEN
ocm.localdomain
##START LISTENER
- lsnrctl
- start
- status
[oracle@ocm agent11g]$ lsnrctl
LSNRCTL for Linux: Version 11.2.0.3.0 – Production on 22-OCT-2015 19:54:56
Copyright (c) 1991, 2011, Oracle. All rights reserved.
Welcome to LSNRCTL, type “help” for information.
LSNRCTL> start
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait…TNSLSNR for Linux: Version 11.2.0.3.0 – Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/ocm/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm.localdomain)(PORT=1522)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocm.localdomain)(PORT=1522)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 – Production
Start Date 22-OCT-2015 19:55:00
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/ocm/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm.localdomain)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))
The listener supports no services
The command completed successfully
LSNRCTL> status
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocm.localdomain)(PORT=1522)))
STATUS of the LISTENER
————————
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.3.0 – Production
Start Date 22-OCT-2015 19:55:00
Uptime 0 days 0 hr. 0 min. 2 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/ocm/listener/alert/log.xml
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocm.localdomain)(PORT=1522)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))
The listener supports no services
The command completed successfully
##START OMS
- Set OMS_HOME variable (example: export OMS_HOME=/u01/Oracle/MWOEM/oms11g)
- Set AGENT_HOME variable (example: export AGENT_HOME=/u01/Oracle/MWOEM/agent11)
- Set ORACLE_HOME variable (example:export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
- $OMS_HOME/bin/emctl start oms
[oracle@ocm agent11g]$ export OMS_HOME=/u01/Oracle/MWOEM/oms11g
[oracle@ocm agent11g]$ export AGENT_HOME=/u01/Oracle/MWOEM/agent11
[oracle@ocm agent11g]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
[oracle@ocm agent11g]$ $OMS_HOME/bin/emctl start oms
Oracle Enterprise Manager 11g Release 1 Grid Control
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Starting WebTier…
WebTier Successfully Started
Starting Oracle Management Server…
Oracle Management Server Successfully Started
Oracle Management Server is Up
##START AGENT
- $AGENT_HOME/bin/emctl start agent
- $AGENT_HOME/bin/emctl status agent
[oracle@ocm bin]$ $AGENT_HOME/bin/emctl start agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
Starting agent …… started.
[oracle@ocm bin]$ $AGENT_HOME/bin/emctl status agent
Oracle Enterprise Manager 11g Release 1 Grid Control 11.1.0.1.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
—————————————————————
Agent Version : 11.1.0.1.0
OMS Version : 11.1.0.1.0
Protocol Version : 11.1.0.0.0
Agent Home : /u01/Oracle/MWOEM/agent11g
Agent binaries : /u01/Oracle/MWOEM/agent11g
Agent Process ID : 8275
Parent Process ID : 8258
Agent URL : https://ocm.localdomain:3872/emd/main/
Repository URL : https://ocm.localdomain:4900/em/upload
Started at : 2015-10-22 20:02:48
Started by user : oracle
Last Reload : 2015-10-22 20:02:56
Last successful upload : 2015-10-22 20:03:10
Total Megabytes of XML files uploaded so far : 8.67
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0.00
Available disk space on upload filesystem : 15.40%
Last successful heartbeat to OMS : 2015-10-22 20:02:52
—————————————————————
Agent is Running and Ready