基于阿里雲Oracle12cR2(Linux)實例靜默安装Cloud Control 13c 13.3

  1. 云栖社区>
  2. 博客>
  3. 正文

基于阿里雲Oracle12cR2(Linux)實例靜默安装Cloud Control 13c 13.3

fong000123 2019-03-12 02:35:14 浏览375
展开阅读全文

基于阿里雲Oracle12cR2(Linux)實例靜默安装Cloud Control 13c 13.3

image

Oracle12cR2镜像(CentOS7 64位Java环境)

https://market.aliyun.com/products/56024006/cmjj017586.html?spm=5176.146948.760725..1c0318019Qehyz

image

坑點1

1.不能安裝GNOME: 在阿里雲不能使用GNOME, 使用後系統不能正常啟動,只能使用靜默方案安裝EM;
2.該實例只有60G, 參考本案例需另購一個數據盤60G;

掛載數據盤/dev/xvdb

https://help.aliyun.com/document_detail/25446.html
使用root新建目錄/oracle2

$mv /oracle/ /oracle2/
再mount 到/oracle目錄
$mv /oracle2/ /oracle/

配置SFTP後上傳文件/var/sftp/

下載EM
image
坑點2: Oracle12cR2 連ORACLE本身都没有支持的EM13的DatabaseTemplate, 不能官方下載

image
參考https://www.markusdba.net/?p=346
image

下載https://www.markusdba.net/wp-content/uploads/2018/01/em132_template_for_rdbms_122_small.dbt_.zip
unzip至/oracle/product/12.2.0.1/assistants/dbca/templates

安裝EM數據庫

  • 準備靜默文件

$ cp /oracle/product/12.2.0.1/assistants/dbca/dbca.rsp /home/oracle/
參考下述填寫
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v12.2.0
gdbName=emrep
sid=emrep
pdbName=emrep
pdbAdminPassword=emrep
templateName=em132_template_for_rdbms_122_small.dbt
sysPassword=
systemPassword=
emExpressPort=5500
dbsnmpPassword=
datafileDestination=/oracle/oradata
recoveryAreaDestination=/oracle/flash_recovery_area
totalMemory=8192

  • 修改/oracle/product/12.2.0.1/assistants/dbca/templates/em132_template_for_rdbms_122_small.dbt

本案例配置如下:
sga_max_size=2GB
pga_aggregate_limit=2GB
lock_sga=false
sga_target=2GB
shared_pool_size=1536MB
db_cache_size=400MB
diagnostic_dest=/oracle
db_recovery_file_dest_size=30000MB
pga_aggregate_target=1GB
SPfile=/oracle/product/12.2.0.1/dbs/spfile{SID}.ora

  • 靜默安裝

oracle$ dbca -silent -createDatabase -responsefile /home/oracle/db_12c.rsp

netca静默文件(參考http://www.itpux.com/thread-4578-1-1.html)

$ vim /home/netca_12c.rsp

  • 本案例配置如下:
    [GENERAL]

RESPONSEFILE_VERSION="12.1"
CREATE_TYPE="CUSTOM"
[oracle.net.ca]
INSTALLED_COMPONENTS={"server","net8","javavm"}
INSTALL_TYPE=""typical""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE={"PLSExtProc"}
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}

  • 靜默安裝
    oracle$ netca -silent -responsefile /home/oracle/netca_12c.rsp

安装OEM13c软件(OMS)(參考http://www.itpux.com/thread-4578-1-1.html)

  • 创建OEM静默文件software_only.rsp

ESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/oracle/oraInventory
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=false
MYORACLESUPPORT_USERNAME=123@abc.com
MYORACLESUPPORT_PASSWORD=
INSTALL_UPDATES_SELECTION=skip
STAGE_LOCATION=
MYORACLESUPPORT_USERNAME_FOR_SOFTWAREUPDATES=
MYORACLESUPPORT_PASSWORD_FOR_SOFTWAREUPDATES=
ORACLE_MIDDLEWARE_HOME_LOCATION=/oracle/Middleware
AGENT_BASE_DIR=/oracle/Agent
ORACLE_HOSTNAME= 此行參考命令填寫$ cat /etc/hostname
b_upgrade=false
EM_INSTALL_TYPE=NOSEED
CONFIGURATION_TYPE=LATER

  • 靜默安裝

oracle$ ./em13100_linux64.bin -silent -responseFile /home/oracle/software_only.rsp

root$ /oracle/oraInventory/orainstRoot.sh
root$ /oracle/Middleware/allroot.sh

  • 静默文件new_install.rsp

本案例配置如下:
RESPONSEFILE_VERSION=2.2.1.0.0
UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/oracle/oraInventory
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=false
MYORACLESUPPORT_USERNAME=123@abc.com
MYORACLESUPPORT_PASSWORD=
INSTALL_UPDATES_SELECTION=skip
STAGE_LOCATION=
MYORACLESUPPORT_USERNAME_FOR_SOFTWAREUPDATES=
MYORACLESUPPORT_PASSWORD_FOR_SOFTWAREUPDATES=
PROXY_USER=
PROXY_PWD=
PROXY_HOST=
PROXY_PORT=
ORACLE_MIDDLEWARE_HOME_LOCATION=/oracle/Middleware
ORACLE_HOSTNAME= 此行參考命令填寫$ cat /etc/hostname
AGENT_BASE_DIR=/oracle/Agent
WLS_ADMIN_SERVER_USERNAME=weblogic
WLS_ADMIN_SERVER_PASSWORD=
WLS_ADMIN_SERVER_CONFIRM_PASSWORD=
NODE_MANAGER_PASSWORD=
NODE_MANAGER_CONFIRM_PASSWORD=
ORACLE_INSTANCE_HOME_LOCATION=/oracle/gc_inst
CONFIGURE_ORACLE_SOFTWARE_LIBRARY=true
SOFTWARE_LIBRARY_LOCATION=/oracle/swlib
DATABASE_HOSTNAME= 此行參考命令填寫$ cat /etc/hostname
LISTENER_PORT=1521
SERVICENAME_OR_SID=emrep
SYS_PASSWORD=
SYSMAN_PASSWORD=
SYSMAN_CONFIRM_PASSWORD=
DEPLOYMENT_SIZE=MEDIUM
MANAGEMENT_TABLESPACE_LOCATION=/oracle/oradata/emrep/mgmt.dbf
CONFIGURATION_DATA_TABLESPACE_LOCATION=/oracle/oradata/emrep/mgmt_ecm_depot.dbf
JVM_DIAGNOSTICS_TABLESPACE_LOCATION=/oracle/oradata/emrep/mgmt_ad4j.dbf
AGENT_REGISTRATION_PASSWORD=
AGENT_REGISTRATION_CONFIRM_PASSWORD=
STATIC_PORTS_FILE=
PLUGIN_SELECTION=
b_upgrade=false
EM_INSTALL_TYPE=NOSEED
CONFIGURATION_TYPE=ADVANCED
CONFIGURE_SHARED_LOCATION_BIP=false
CONFIG_LOCATION=
CLUSTER_LOCATION=

  • 靜默安裝

cd /oracle/Middleware/sysman/install

oracle$ ./ConfigureGC.sh -silent -responseFile /home/oracle/new_install.rsp

$OMS_HOME/bin/emctl start oms
image

$AGENT_HOME/bin/emctl start agent
image

image

网友评论

登录后评论
0/500
评论
fong000123
+ 关注