Oracle by Example brandingConfigure the HTTPS Port for EM Express

section 0Before You Begin

Select the Oracle Database release:

This 15-minute tutorial shows you how to configure a different port or manually configure an HTTPS port using the dynamic protocol registration method.

What Do You Need?

  •  Install Oracle Database 18c19c
  •  Start the EM Express

section 1Configure the HTTPS Port for non-CDB

You can access Enterprise Manager Database Express using the URL that was displayed during installation. In case you want to use a different port or manually configure an HTTPS port, you need to configure the port using the dynamic protocol registration method. After the HTTPS port is configured, you use it to access Enterprise Manager Express.

The default port used is 5500. In this case, you will configure Enterprise Manager Database Express to run on port 5501.

  1. Open a terminal window and execute the oraenv command to set the environment variables.
    $. oraenv
    ORACLE_SID = [oracle] ? orcl
    The Oracle base has been set to /scratch/u01/app/oracle
  2. Verify that the listener is started by executing the lsnrctl status command.
    $ lsnrctl status
    LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 05-MAR-2019 01:52:41                                                                                                                           
                                                                                                                                                                                                         
    Copyright (c) 1991, 2018, Oracle.  All rights reserved.                                                                                                                                              
                                                                                                                                                                                                         
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)
    (HOST=host01.example.com)(PORT=1521)))                                                                                                         
    STATUS of the LISTENER                                                                                                                                                                               
    ------------------------                                                                                                                                                                                       
    Alias                     LISTENER                                                                                                                                                                             
    Version                   TNSLSNR for Linux: Version 18.0.0.0.0 - Production                                                                                                                                   
    Start Date                03-MAR-2019 23:30:55                                                                                                                                                                 
    Uptime                    1 days 2 hr. 21 min. 45 sec                                                                                                                                                          
    Trace Level               off                                                                                                                                                                                  
    Security                  ON: Local OS Authentication                                                                                                                                                          
    SNMP                      OFF                                                                                                                                                                                  
    Listener Parameter File   /scratch/u01/app/oracle/product/18.0.0
    /dbhome_1/network
    /admin/listener.ora                                                                                                           
    Listener Log File         /scratch/u01/app/oracle/diag/tnslsnr
    /slc12ftw/listener
    /alert/log.xml                                                                                                                 
    Listening Endpoints Summary...                                                                                                                                                                                 
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)
      (HOST=host01.example.com)(PORT=1521)))                                                                                                                               
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))                                                                                                                                                      
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=host01.example.com)
    (PORT=5500))(Security=(my_wallet_directory=/scratch/u01/app
    /oracle/admin/orcl/xdb_wallet))
    (Presentation=HTTP)(Session=RAW))                
    Services Summary...
    Service "orcl.us.oracle.com" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB.us.oracle.com" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfullyLSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-JUL-2019 01:09:40
    
    Copyright (c) 1991, 2019, Oracle.  All rights reserved.
    
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host01.example.com)(PORT=1521)))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
    Start Date                10-JUL-2019 01:32:04
    Uptime                    4 days 23 hr. 37 min. 36 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /scratch/u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
    Listener Log File         /scratch/u01/app/oracle/diag/tnslsnr/host01/listener/alert/log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host01.example.com)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=host01.example.com)(PORT=5500))(Security=(my_wallet_directory=/scratch/u01/app/oracle/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
    Services Summary...                                                                                                                                                                                            
    Service "86b637b62fdf7a65e053f706e80a27ca.us.oracle.com" has 1 instance(s).                                                                                                                                    
      Instance "orcl", status READY, has 1 handler(s) for this service...                                                                                                                                          
    Service "8d50ba5e384412fbe053193ec40a5c2c.us.oracle.com" has 1 instance(s).                                                                                                                                    
      Instance "orcl", status READY, has 1 handler(s) for this service...                                                                                                                                          
    Service "orcl.us.oracle.com" has 1 instance(s).                                                                                                                                                                
      Instance "orcl", status READY, has 1 handler(s) for this service...                                                                                                                                          
    Service "orclXDB.us.oracle.com" has 1 instance(s).                                                                                                                                                             
      Instance "orcl", status READY, has 1 handler(s) for this service...                                                                                                                                          
    Service "orclpdb.us.oracle.com" has 1 instance(s).                                                                                                                                                             
      Instance "orcl", status READY, has 1 handler(s) for this service...                                                                                                                                          
    The command completed successfully      
  3. Log in to SQL*Plus as the SYSDBA user and verify that the DISPATCHERS parameter in the initialization parameter file includes the PROTOCOL=TCP attribute.
    $ sqlplus / as sysdba
    
    SQL*Plus: Release 18.0.0.0.0 - Production on Mon Mar 4 22:17:53 2019
    Version 18.3.0.0.0
    
    Copyright (c) 1982, 2018, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
    Version 18.3.0.0.0SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 15 01:08:39 2019
    Version 19.3.0.0.0
    
    Copyright (c) 1982, 2019, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.3.0.0.0
    
    SQL> show parameter dispatchers
    
    NAME                        TYPE        VALUE
    --------------------------- ----------- -----------------------
    dispatchers                string      (PROTOCOL=TCP) (SERVICE=orclXD
                                                     B)
    max_dispatchers            integer
    SQL> 
    
    
  4. Execute the DBMS_XDB_CONFIG.setHTTPSPort procedure to set the HTTPS port for Enterprise Manager Express.

    SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5501);
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

section 2Configure the HTTPS Port for CDB and PDB

The default port used is 5500. In this case you will configure Enterprise Manager Database Express for CDB to run on port 5501 and for PDB to run on 5502.

  1. Open a terminal window and execute the oraenv command to set the environment variables, if not set already.
    $. oraenv
    ORACLE_SID = [oracle] ?orcl
    The Oracle base has been set to /scratch/u01/app/oracle
  2. Verify that the listener is started by executing the lsnrctl status command.
    $ lsnrctl status
    
    LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 05-MAR-2019 01:52:41                                                                                                                           
                                                                                                                                                                                                         
    Copyright (c) 1991, 2018, Oracle.  All rights reserved.                                                                                                                                              
                                                                                                                                                                                                         
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)
    (HOST=host01.example.com)(PORT=1521)))                                                                                                         
    STATUS of the LISTENER                                                                                                                                                                               
    ------------------------                                                                                                                                                                                       
    Alias                     LISTENER                                                                                                                                                                             
    Version                   TNSLSNR for Linux: Version 18.0.0.0.0 - Production                                                                                                                                   
    Start Date                03-MAR-2019 23:30:55                                                                                                                                                                 
    Uptime                    1 days 2 hr. 21 min. 45 sec                                                                                                                                                          
    Trace Level               off                                                                                                                                                                                  
    Security                  ON: Local OS Authentication                                                                                                                                                          
    SNMP                      OFF                                                                                                                                                                                  
    Listener Parameter File   /scratch/u01/app/oracle/product/18.0.0
    /dbhome_1/network
    /admin/listener.ora                                                                                                           
    Listener Log File         /scratch/u01/app/oracle/diag/tnslsnr
    /slc12ftw/listener
    /alert/log.xml                                                                                                                 
    Listening Endpoints Summary...                                                                                                                                                                                 
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)
      (HOST=host01.example.com)(PORT=1521)))                                                                                                                               
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))                                                                                                                                                      
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=host01.example.com)
    (PORT=5500))(Security=(my_wallet_directory=/scratch/u01/app
    /oracle/admin/orcl/xdb_wallet))
    (Presentation=HTTP)(Session=RAW))                
    Services Summary...
    Service "orcl.us.oracle.com" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    Service "orclXDB.us.oracle.com" has 1 instance(s).
      Instance "orcl", status READY, has 1 handler(s) for this service...
    The command completed successfullyLSNRCTL for Linux: Version 19.0.0.0.0 - Production on 15-JUL-2019 01:09:40
    
    Copyright (c) 1991, 2019, Oracle.  All rights reserved.
    
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=host01.example.com)(PORT=1521)))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 19.0.0.0.0 - Production
    Start Date                10-JUL-2019 01:32:04
    Uptime                    4 days 23 hr. 37 min. 36 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /scratch/u01/app/oracle/product/19.0.0/dbhome_1/network/admin/listener.ora
    Listener Log File         /scratch/u01/app/oracle/diag/tnslsnr/host01/listener/alert/log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=host01.example.com)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=host01.example.com)(PORT=5500))(Security=(my_wallet_directory=/scratch/u01/app/oracle/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))
    Services Summary...                                                                                                                                                                                            
    Service "86b637b62fdf7a65e053f706e80a27ca.us.oracle.com" has 1 instance(s).                                                                                                                                    
      Instance "orcl", status READY, has 1 handler(s) for this service...                                                                                                                                          
    Service "8d50ba5e384412fbe053193ec40a5c2c.us.oracle.com" has 1 instance(s).                                                                                                                                    
      Instance "orcl", status READY, has 1 handler(s) for this service...                                                                                                                                          
    Service "orcl.us.oracle.com" has 1 instance(s).                                                                                                                                                                
      Instance "orcl", status READY, has 1 handler(s) for this service...                                                                                                                                          
    Service "orclXDB.us.oracle.com" has 1 instance(s).                                                                                                                                                             
      Instance "orcl", status READY, has 1 handler(s) for this service...                                                                                                                                          
    Service "orclpdb.us.oracle.com" has 1 instance(s).                                                                                                                                                             
      Instance "orcl", status READY, has 1 handler(s) for this service...                                                                                                                                          
    The command completed successfully 
                    
  3. Log in to SQL*Plus as the SYSDBA user and verify that the DISPATCHERS parameter in the initialization parameter file includes the PROTOCOL=TCP attribute.
    $ sqlplus / as sysdba
    
    SQL*Plus: Release 18.0.0.0.0 - Production on Mon Mar 4 22:17:53 2019
    Version 18.3.0.0.0
    
    Copyright (c) 1982, 2018, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
    Version 18.3.0.0.0SQL*Plus: Release 19.0.0.0.0 - Production on Mon Jul 15 01:08:39 2019
    Version 19.3.0.0.0
    
    Copyright (c) 1982, 2019, Oracle.  All rights reserved.
    
    
    Connected to:
    Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
    Version 19.3.0.0.0
    SQL>show parameter dispatchers
    
    NAME                   TYPE        VALUE
    ---------------------- ----------- ----------------------------
    dispatchers            string      (PROTOCOL=TCP) (SERVICE=orclXD
                                                     B)
    max_dispatchers        integer/pre>
                    
  4. Execute the DBMS_XDB_CONFIG.SETHTTPSPORT procedure to set the HTTPS port for EM Express for a CDB.
    SQL> alter session set container=CDB$ROOT;
    
    Session altered.
    SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5501);
    
    PL/SQL procedure successfully completed.
  5. Execute the DBMS_XDB_CONFIG.SETHTTPSPORT procedure to set the HTTPS port for EM Express for a PDB.
    SQL> alter session set container=orclpdb;
    
    Session altered.
    SQL> exec DBMS_XDB_CONFIG.SETHTTPSPORT(5502);
    
    PL/SQL procedure successfully completed.