首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式碼之家 >> 數據庫知識 >  >> Oracle 資料庫 >> Oracle 資料庫基礎

Oracle Cloud Control 12c 啟動、關閉與安裝信息獲取完整指南

     編輯:Oracle 資料庫基礎

前言

Oracle Cloud Control 12c 安裝流程複雜,安裝路徑、密碼、端口號等配置項繁多,安裝完成後如何快速獲取關鍵信息(端口、URL)、正確啟停服務,是每位 DBA 的必備技能。本文整理實操步驟,供參考。

1. 環境配置示例

[oracle@oel63 ~]$ more ~/.bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=oel63.ycdata.net; export ORACLE_HOSTNAME
ORACLE_UNQNAME=ora11g; export ORACLE_UNQNAME
ORACLE_BASE=/u01/ora11g; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/db_1; export ORACLE_HOME
ORACLE_SID=ora11g; export ORACLE_SID
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/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
export OMS_HOME=/u01/oms12cr3/oms
export AGENT_HOME=/u01/agent12cr2/core/12.1.0.3.0

作業系統:Oracle Linux Server 6.3
資料庫版本:SQL*Plus 11.2.0.3.0

2. 啟動 Repository DB 及 OMS

啟動 OMS 前必須先啟動 Repository DB(存放監控數據)及監聽器,否則會報「Failed to connect to repository database」。OMS 會在偵測到 DB 和監聽 UP 時自動重啟。

# 啟動監聽器
[oracle@oel63 ~]$ lsnrctl start

# 檢查資料庫進程
[oracle@oel63 ~]$ ps -ef | grep pmon | grep -grep

# 啟動資料庫
[oracle@oel63 ~]$ sqlplus / as sysdba
SQL> startup
SQL> exit

# 啟動 OMS 及 Agent
[oracle@oel63 ~]$ $OMS_HOME/bin/emctl start oms
[oracle@oel63 ~]$ $AGENT_HOME/bin/emctl start agent

3. 查看安裝信息(端口、URL)

3.1 安裝類型與路徑

[oracle@oel63 ~]$ cd $OMS_HOME/install
[oracle@oel63 install]$ more eminstall.info
INSTALL_TYPE=NOSEED
UPGRADE=false
ORACLE_MIDDLEWARE_HOME_LOCATION=/u01/oms12cr3   # WebLogic 安裝位置
OMS_HOME=/u01/oms12cr3/oms                      # OMS 安裝位置
AGENT_HOME=/u01/agent12cr2/core/12.1.0.3.0      # Agent 安裝位置
AGENT_BASE_DIR=/u01/agent12cr2                  # Agent 基目錄

3.2 關鍵端口信息

[oracle@oel63 install]$ more portlist.ini
Enterprise Manager Upload Http Port=4889
Enterprise Manager Upload Http SSL Port=4903
Enterprise Manager Central Console Http SSL Port=7802
Node Manager Http SSL Port=7403
Managed Server Http Port=7202
Enterprise Manager Central Console Http Port=7788
Oracle Management Agent Port=3872
Admin Server Http SSL Port=7102
Managed Server Http SSL Port=7301

3.3 登錄 URL 與管理信息

[oracle@oel63 install]$ more setupinfo.txt
This information is also available at:
/u01/oms12cr3/oms/install/setupinfo.txt

# 登錄 Cloud Control Console 及 WebLogic 的 URL
Use the following URL to access:
1. Enterprise Manager Cloud Control URL: https://oel63.ycdata.net:7802/em
2. Admin Server URL: https://oel63.ycdata.net:7102/console

The following details need to be provided during the additional OMS install:
1. Admin Server Hostname: oel63.ycdata.net
2. Admin Server Port: 7102
You can find the ports details used by this deployment at : /u01/oms12cr3/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 configuration is available in /u01/gc_inst/em/EMGC_OMS1/sysman/backup on host oel63.ycdata.net.
Use the following command to backup the OMS configuration:
/u01/oms12cr3/oms/bin/emctl exportconfig oms -dir 

4. 關閉 OMS 及 Repository DB

[oracle@oel63 ~]$ $OMS_HOME/bin/emctl stop oms -all
[oracle@oel63 ~]$ $AGENT_HOME/bin/emctl stop agent
[oracle@oel63 ~]$ lsnrctl stop
[oracle@oel63 ~]$ export ORACLE_SID=ora11g
[oracle@oel63 ~]$ sqlplus / as sysdba
SQL> shutdown immediate;

提示: 定期備份 OMS 配置(emctl exportconfig oms),確保配置變更(插件安裝、拓撲變更等)被記錄。

  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式碼之家 All Rights Reserved