12C配置EM Express的https端口


1.啟動監聽並查看監聽信息

$ lsnrctl stat ora12

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 07-FEB-2017 10:57:26

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test12c)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     ora12
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                12-JAN-2017 16:10:36
Uptime                    25 days 18 hr. 46 min. 50 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   oracle12c/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File         oracle12c/diag/tnslsnr/test12c/ora12/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test12c)(PORT=1522)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))
Services Summary...
Service "clonedb" has 1 instance(s).
  Instance "db12", status READY, has 1 handler(s) for this service...
Service "db12" has 1 instance(s).
  Instance "db12", status READY, has 1 handler(s) for this service...
Service "db12XDB" has 1 instance(s).
  Instance "db12", status READY, has 1 handler(s) for this service...
Service "pdb2" has 1 instance(s).
  Instance "db12", status READY, has 1 handler(s) for this service...
The command completed successfully

 

2.如果監聽不是使用用默認端口1521,需要在初始化參數文件中添加參數local_listener,以便https端口能夠注冊到監聽

SQL> show parameter local_listener  

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
local_listener                       string      LISTENER_DB12 
SQL> 

這里的listener_db12就是在tnsnames.ora文件中的配置信息,指向正確的監聽端口

LISTENER_DB12 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = test12c)(PORT = 1522))

3.配置dispatchers參數

格式:dispatchers="(PROTOCOL=TCP)(SERVICE=<sid>XDB)"
如:
SQL> show parameter dispatchers

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
dispatchers                          string      (PROTOCOL=TCP) (SERVICE=db12XDB)

4.重啟數據庫讓上面的兩個參數生效
5.CDB配置em express的https端口

SQL> alter session set container=CDB$ROOT;
SQL> exec dbms_xdb_config.sethttpsport(5500);

對應的配置信息會寫入xml db中的xdbconfig.xml中

6.PDB配置em express的https端口

SQL> alter session set container=PDB2;
SQL> exec dbms_xdb_config.sethttpsport(5502);

SQL> select dbms_xdb_config.gethttpsport() from dual;

DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
                          5502

SQL> 

配置結束后,對應的監聽信息中增加了兩條記錄:

$ lsnrctl stat ora12

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 07-FEB-2017 11:18:27

Copyright (c) 1991, 2014, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test12c)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     ora12
Version                   TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date                12-JAN-2017 16:10:36
Uptime                    25 days 19 hr. 7 min. 50 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   oracle12c/product/12.1.0/dbhome_1/network/admin/listener.ora
Listener Log File         oracle12c/diag/tnslsnr/test12c/ora12/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test12c)(PORT=1522)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1522)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=test12c)(PORT=5500))(Security=(my_wallet_directory=oracle12c/admin/db12/xdb_wallet))(Presentation=HTTP)(Session=RAW))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=test12c)(PORT=5502))(Security=(my_wallet_directory=oracle12c/admin/db12/xdb_wallet))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "clonedb" has 1 instance(s).
  Instance "db12", status READY, has 1 handler(s) for this service...
Service "db12" has 1 instance(s).
  Instance "db12", status READY, has 1 handler(s) for this service...
Service "db12XDB" has 1 instance(s).
  Instance "db12", status READY, has 1 handler(s) for this service...
Service "pdb2" has 1 instance(s).
  Instance "db12", status READY, has 1 handler(s) for this service...
The command completed successfully

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM