3.5 Configuring the HTTPS Port for EM Express
只有在数据库配置助手(DBCA)在配置数据库或可插数据库(PDB)时没有提供Oracle Enterprise Manager Database Express (EM Express) URL,或者稍后需要更改EM Express端口时,才需要执行本节中的步骤。否则,您可以按照“启动EM Express”中的说明启动EM Express。
在从Web浏览器访问EM Express之前,必须配置用于EM Express的HTTPS端口。配置完用于EM Express的HTTPS端口后,可以使用它来访问EM Express。
要手动配置EM Express的HTTPS端口:
- 配置并启动Oracle Net侦听器(侦听器)。您可以使用lsnrctl启动、停止和查看侦听器的状态。
- 如果侦听器运行在非标准端口上(例如,不是1521端口),则初始化。您希望使用EM Express管理的数据库的ora文件必须包含local_listenerentry,以便HTTPS端口可以注册到正确的侦听器。local_listenerentry引用指向正确侦听器的TNSNAMES条目。例如:
local_listener=inst1
where
inst1
is a TNSNAMES entry defined intnsnames.ora
that points to the listener. For example:inst1= (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=
host_name
)(PORT=1234)) (CONNECT_DATA=(SERVICE_NAME=service_name
)(SERVER=DEDICATED)))In this example, 1234 is the nonstandard port on which the listener has been configured to listen.
- 通过向init添加以下条目来启用TCP调度程序。ora文件的数据库,你想管理使用EM Express:
dispatchers="(PROTOCOL=TCP)(SERVICE=<sid>XDB)"
For example, if the database SID is ORCL, then the entry would be:
dispatchers="(PROTOCOL=TCP)(SERVICE=ORCLXDB)"
- Restart the database so that the changes made in the
init.ora
file take effect. - 使用PL/SQL过程DBMS_XDB_CONFIG。将数据库的EM Express的HTTPS端口设置为未使用的端口。这将更新xdbconfig中的HTTPS端口。Oracle xml DB存储库中的xml文件。您必须与SYS / as SYSDBA连接才能运行该过程。
例如,要为非cdb的EM Express设置HTTPS端口:SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5500);
要为多租户容器数据库(CDB)设置EM Express的HTTPS端口,请转到CDB中的根目录,然后使用PL/SQL过程DBMS_XDB_CONFIG。在CDB中SETHTTPSPORT将CDB的EM Express的HTTPS端口设置为未使用的端口。这将更新xdbconfig中的HTTPS端口。Oracle xml DB存储库中的xml文件。您必须与SYS / as SYSDBA连接才能运行该过程。例如:
SQL> alter session set container=CDB$ROOT; SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5501);
要为PDB的EM Express设置HTTPS端口,请确保PDB以读/写模式打开,然后使用PL/SQL过程DBMS_XDB_CONFIG。将PDB的EM Express的HTTPS端口设置为未使用的端口。这将更新xdbconfig中的HTTPS端口。Oracle xml DB存储库中的xml文件。您必须与SYS / as SYSDBA连接才能运行该过程。例如:
SQL> alter session set container=PDB1; SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5502);
使用以下命令确认端口已向侦听器注册:
$ lsnrctl status | grep -i 5502 (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=
hostname.example.com
)(PORT=5502) )(Security=(my_wallet_directory=/$ORACLE_BASE
/admin/sid
/xdb_wallet)) (Presentation=HTTP)(Session=RAW)) - 要访问非CDB、CDB或PDB的EM Express,请在Web浏览器中输入以下格式的URL,指定要管理的非CDB、CDB或PDB的EM Express端口号:
https://
database-hostname
:portnumber
/em/For example:
https://mydbhost.example.com:5500/em/
当提示输入用户名和密码时,作为具有DBA特权的用户(如SYS或SYSTEM)登录。
注意:
EM Express的TLS版本由sqlnet中设置的SSL_VERSION参数决定。数据库的ora文件See Oracle Database Net Services Reference for more information about the
SSL_VERSION
parameter.See Also:
-
Oracle Database Net Services Administrator's Guide for more information about configuring and using the listener
-
Oracle Database Net Services Reference for more information about listener parameters
-
Oracle Database Net Services Administrator's Guide for more information about the
local_listener
entry -
Oracle XML DB Developer’s Guide for more information about accessing the Oracle XML DB Repository
-
Oracle XML DB Developer’s Guide for more information about administering Oracle XML DB
-
Oracle Database PL/SQL Packages and Types Reference for more information about the
sethttpsport
procedure -
Oracle Multitenant Administrator's Guide for information about using the
ALTER PLUGGABLE DATABASE
statement to modify the mode of a PDB -
Oracle Multitenant Administrator's Guide for information about switching to a container using the
ALTER SESSION
statement -
"Managing PDBs with EM Express" for more information about using EM Express to manage the PDBs in a CDB
-
"SYS and SYSTEM Users" for information about the recommended alternative to using the
SYSTEM
account for day-to-day administrative tasks
-