{"id":5328,"date":"2021-06-11T08:23:40","date_gmt":"2021-06-11T08:23:40","guid":{"rendered":"https:\/\/swiv.com.br\/enabling-em-express-in-oci-db-systems\/"},"modified":"2026-05-27T20:02:31","modified_gmt":"2026-05-27T19:02:31","slug":"enabling-em-express-in-oci-db-systems","status":"publish","type":"post","link":"https:\/\/swiv.com.br\/index.php\/2021\/06\/11\/enabling-em-express-in-oci-db-systems\/","title":{"rendered":"Enabling EM Express in OCI DB Systems"},"content":{"rendered":"\n<p>Neste artigo, vamos explorar as etapas necess\u00e1rias para habilitarmos o EM Express em nosso DB System 19C no OCI. <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Configuring the EM Express port<\/h2>\n\n\n\n<p>Vamos confirmar qual \u00e9 a porta que est\u00e1 sendo utilizada no banco de dados para o EM Express (na vers\u00e3o 19C, o EM est\u00e1 dispon\u00edvel apenas com o protocolo HTTPS):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@luxor ~]$ sqlplus \/ as sysdba\n \nSQL*Plus: Release 19.0.0.0.0 - Production on Fri Jun 11 07:54:01 2021\nVersion 19.11.0.0.0\n \nCopyright (c) 1982, 2020, Oracle.  All rights reserved.\n \n \nConnected to:\nOracle Database 19c EE Extreme Perf Release 19.0.0.0.0 - Production\nVersion 19.11.0.0.0\n \nSQL&gt; SELECT DBMS_XDB_CONFIG.GETHTTPSPORT() FROM DUAL;\n \nDBMS_XDB_CONFIG.GETHTTPSPORT()\n------------------------------\n                          5500\n<\/pre><\/div>\n\n\n<p>Apenas para registro, caso essa porta n\u00e3o esteja definida ou por motivos de seguran\u00e7a se deseje troc\u00e1-la, podemos rodar o comando abaixo com a porta desejada (o que n\u00e3o ser\u00e1 necess\u00e1rio em nosso caso):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nexec DBMS_XDB_CONFIG.SETHTTPSPORT(5555);\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Opening the EM Express port in the internal firewall<\/h2>\n\n\n\n<p>Por padr\u00e3o, o Firewall interno do nosso DB System (Iptables) n\u00e3o possui regra habilitada para a porta 5500. Desse modo, vamos fazer o processo de libera\u00e7\u00e3o. Realizando um backup das configura\u00e7\u00f5es vigentes:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@luxor ~]$ exit\nlogout\n&#x5B;opc@luxor ~]$ sudo su -\nLast login: Fri Jun 11 07:51:23 UTC 2021\n&#x5B;root@luxor ~]# iptables-save &gt; \/tmp\/iptables.11062021\n<\/pre><\/div>\n\n\n<p>Adicionando a regra para permitir inbound traffic na porta 5500:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@luxor ~]# iptables -I INPUT 8 -p tcp -m state --state NEW -m tcp --dport 5500 -j ACCEPT -m comment --comment &quot;Necess\u00e1rio para o EM Express.&quot;\n&#x5B;root@luxor ~]#\n<\/pre><\/div>\n\n\n<p>Confirmando status:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@luxor ~]# service iptables status\nRedirecting to \/bin\/systemctl status iptables.service\n\u25cf iptables.service - IPv4 firewall with iptables\n   Loaded: loaded (\/usr\/lib\/systemd\/system\/iptables.service; enabled; vendor preset: disabled)\n   Active: active (exited) since Fri 2021-06-11 07:49:13 UTC; 11min ago\n  Process: 1098 ExecStart=\/usr\/libexec\/iptables\/iptables.init start (code=exited, status=0\/SUCCESS)\n Main PID: 1098 (code=exited, status=0\/SUCCESS)\n   CGroup: \/system.slice\/iptables.service\n \nJun 11 07:49:13 luxor systemd&#x5B;1]: Starting IPv4 firewall with iptables...\nJun 11 07:49:13 luxor iptables.init&#x5B;1098]: iptables: Applying firewall rules: &#x5B;  OK  ]\nJun 11 07:49:13 luxor systemd&#x5B;1]: Started IPv4 firewall with iptables.\n<\/pre><\/div>\n\n\n<p>Salvando altera\u00e7\u00f5es:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;root@luxor ~]# \/sbin\/service iptables save\niptables: Saving firewall rules to \/etc\/sysconfig\/iptables:&#x5B;  OK  ]\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Opening the EM Express port in the Security Lists<\/h2>\n\n\n\n<p>Por padr\u00e3o, n\u00e3o temos a porta 5500 liberada na Security List, e nesta etapa vamos fazer essa libera\u00e7\u00e3o. Acessando a parte de VCN no OCI Console:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-54.png\" alt=\"\" class=\"wp-image-7592\"\/><\/figure>\n\n\n\n<p>Entrando em nossa VCN:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-55.png\" alt=\"\" class=\"wp-image-7593\"\/><\/figure>\n\n\n\n<p>Entrando em nossa Subnet:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-56.png\" alt=\"\" class=\"wp-image-7595\"\/><\/figure>\n\n\n\n<p>Acessando a Security List:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-57.png\" alt=\"\" class=\"wp-image-7596\"\/><\/figure>\n\n\n\n<p>Clicando em &#8220;Add Ingress Rules&#8221;:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-58.png\" alt=\"\" class=\"wp-image-7597\"\/><\/figure>\n\n\n\n<p>Preenchendo a regra com a porta que precisamos liberar:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-59.png\" alt=\"\" class=\"wp-image-7598\"\/><\/figure>\n\n\n\n<p>Regra criada:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-60-1024x340.png\" alt=\"\" class=\"wp-image-7599\"\/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Changing the permissions of the XDB Wallet files<\/h2>\n\n\n\n<p>Por \u00faltimo, precisamos definir as permiss\u00f5es de S.O para 640 dos nossos arquivos de Wallet. Para identificar sua localiza\u00e7\u00e3o, rodamos o comando abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;opc@luxor ~]$ sudo su - oracle\nLast login: Fri Jun 11 08:13:02 UTC 2021\n&#x5B;oracle@luxor ~]$ lsnrctl status | grep HTTP\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=luxor.luxorsubnet.luxorvcn.oraclevcn.com)(PORT=5500))(Security=(my_wallet_directory=\/u01\/app\/oracle\/product\/19.0.0.0\/dbhome_2\/admin\/CORTEX_phx1hb\/xdb_wallet))(Presentation=HTTP)(Session=RAW))\n<\/pre><\/div>\n\n\n<p>Acessamos o diret\u00f3rio em quest\u00e3o:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@luxor ~]$ cd \/u01\/app\/oracle\/product\/19.0.0.0\/dbhome_2\/admin\/CORTEX_phx1hb\/xdb_wallet\n&#x5B;oracle@luxor xdb_wallet]$\n<\/pre><\/div>\n\n\n<p>Mudamos a permiss\u00e3o dos arquivos conforme abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&#x5B;oracle@luxor xdb_wallet]$ chmod 640 .\/*\n&#x5B;oracle@luxor xdb_wallet]$ ll\ntotal 8\n-rw-r----- 1 oracle asmadmin 3912 Jun  5 11:47 cwallet.sso\n-rw-r----- 1 oracle asmadmin 3867 Jun  5 11:47 ewallet.p12\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Testing EM Express<\/h2>\n\n\n\n<p>Para realizar a valida\u00e7\u00e3o, basta coletarmos o endere\u00e7o de IP p\u00fablico de nosso DB System e seguir o padr\u00e3o abaixo:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \\&quot;wp-block-syntaxhighlighter-code\\&quot;\"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nhttps:\/\/&amp;lt;public IP address of the Db System&gt;:5500\/em\n<\/pre><\/div>\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-61.png\" alt=\"\" class=\"wp-image-7600\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-62.png\" alt=\"\" class=\"wp-image-7601\"\/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-63.png\" alt=\"\" class=\"wp-image-7602\"\/><\/figure>\n\n\n\n<p>Preenchendo usu\u00e1rio e senha e logando:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-64-1024x651.png\" alt=\"\" class=\"wp-image-7603\"\/><\/figure>\n\n\n\n<p>Acesso realizado com sucesso:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/swiv.com.br\/wp-content\/uploads\/2022\/07\/image-65-1024x710.png\" alt=\"\" class=\"wp-image-7604\"\/><\/figure>\n\n\n\n<p>Obs: Este procedimento foi criado pelo senhor Ahmed Baraka (www.ahmedbaraka.com) e foi apenas reproduzido por mim em um laborat\u00f3rio pessoal para fins de aprendizado.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Neste artigo, vamos explorar as etapas necess\u00e1rias para habilitarmos o EM Express em nosso DB System 19C no OCI. Configuring the EM Express port Vamos confirmar qual \u00e9 a porta que est\u00e1 sendo utilizada no banco de dados para o EM Express (na vers\u00e3o 19C, o EM est\u00e1 dispon\u00edvel apenas com o protocolo HTTPS): Apenas [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-5328","post","type-post","status-publish","format-standard","hentry","category-oci"],"_links":{"self":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5328","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/comments?post=5328"}],"version-history":[{"count":1,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5328\/revisions"}],"predecessor-version":[{"id":9105,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/posts\/5328\/revisions\/9105"}],"wp:attachment":[{"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/media?parent=5328"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/categories?post=5328"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swiv.com.br\/index.php\/wp-json\/wp\/v2\/tags?post=5328"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}