{
  "date": "2015-11-13T07:10:17",
  "slug": "cloud-control-12c-on-your-laptop",
  "link": "https://www.dbi-services.com/blog/cloud-control-12c-on-your-laptop/",
  "title": {
    "rendered": "Cloud Control 12c on your laptop"
  },
  "content": {
    "rendered": "<h2>By Franck Pachot</h2>\n<p>.<br />\nToday every DBA should have a lab on his laptop. This is where I reproduce most of cases before opening a SR, or to investigate something, to demo, to learn new features, or to prepare an OCM exam. I&#8217;ve a few basic VirtualBox VM with single instance databases (11g and 12c, SE and EE, CDB and non-CDB, etc). I&#8217;ve the RacAttack environment with a 3 nodes RAC in 12c on OEL7. But in order to prepare for OCM12c upgrade, I need also a Cloud Control 12c. Here is how I got it without having to install it.<br />\n<!--more--><br />\nOracle provides some VirtualBox images, and there is one with Oracle Enterprise Manager Cloud Control 12c Release 5 (12.1.0.5) and a database (11.2.0.4) for the repository. </p>\n<h3>Download</h3>\n<p>You can get the image from: <a href=\"https://edelivery.oracle.com\" target=\"_blank\" rel=\"noopener noreferrer\">https://edelivery.oracle.com</a></p>\n<p>Filter products by &#8216;Linux/OVM/VMs&#8217; and search for &#8216;Enterprise Manager&#8217;:</p>\n<p><a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureVBCC001.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureVBCC001.jpg\" alt=\"CaptureVBCC001\" width=\"300\" height=\"126\" class=\"alignnone size-medium wp-image-5367\" /></a></p>\n<p>It&#8217;s 17GB in total to download, so be patient:</p>\n<p><a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureVBCC002.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureVBCC002.jpg\" alt=\"CaptureVBCC002\" width=\"300\" height=\"33\" class=\"alignnone size-medium wp-image-5368\" /></a></p>\n<p>You can also download a wget script to get all files:</p>\n<p><a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureVBCC003.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureVBCC003.jpg\" alt=\"CaptureVBCC003\" width=\"300\" height=\"146\" class=\"alignnone size-medium wp-image-5369\" /></a></p>\n<p>So you have 6 files and you can unzip them. When you see the compression ratio you can ask why it is zipped&#8230;</p>\n<p>Then concatenate all .ova files:</p>\n<pre><code>\nC:\\Users\\frp&gt;cd /d F:\\Downloads\nF:\\Downloads&gt;type VBox*.ova &gt; EM12cR5.ova\n</code></pre>\n<p>and you can import it with VirtualBox as any OVA.</p>\n<h3>Network</h3>\n<p>I have all my VMs on the host-only network (192.168.78.1 in my case).<br />\nOn the VM configuration, I set the first network card on &#8216;host only&#8217; network and the second one as NAT to be able to access internet.<br />\nIf you imported the OVA without changing the MAC addresses, here they are: 0800274DA371 and 08002748F74B</p>\n<p>Now I can start the VM and login as root &#8211; password welcome1</p>\n<p>My keyboard is Swiss French layout, so I change it in System/Administration/keyboard</p>\n<p>Then I want to be able to ssh to the machine so I set the network (System/Administration/Network)</p>\n<p>Here is my configuration in my case;<br />\n<a href=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureVBCC011.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https://www.dbi-services.com/blog/wp-content/uploads/sites/2/2022/04/CaptureVBCC011.jpg\" alt=\"CaptureVBCC011\" width=\"257\" height=\"300\" class=\"alignnone size-medium wp-image-5372\" /></a></p>\n<p>Then I activate the interface and can connect with ssh:<br />\n$ ssh root@192.168.78.42</p>\n<h3>Stop iptables as root</h3>\n<p>I want to communicate with the other VMs to discover databases, and to access via web, so I disable the firewall:</p>\n<pre><code>\n[root@emcc ~]# /etc/init.d/iptables stop\nFlushing firewall rules:                                   [  OK  ]\nSetting chains to policy ACCEPT: filter                    [  OK  ]\nUnloading iptables modules:                                [  OK  ]\n[root@emcc ~]# chkconfig iptables off\n</code></pre>\n<p>then I can connect as oracle</p>\n<pre><code>\n$ su - oracle@192.168.78.42\n&nbsp;\nInstallation details of EM Plugin Update 1 12.1.0.5.0 .....\n&nbsp;\nEM url: https://emcc.example.com:7799/em\nPorts used by this deployment at /u01/OracleHomes/Middleware/oms/install/portlist.ini\nDatabase 11.2.0.4.0 location: /u01/OracleHomes/db\nDatabase name:                emrepus\nEM Middleware Home location:  /u01/OracleHomes/Middleware\nEM Agent Home location:       /u01/OracleHomes/agent/core/12.1.0.5.0\n&nbsp;\nThis information is also available in the file /home/oracle/README.FIRST\n&nbsp;\n&nbsp;\nTo start all processes, click on the start_all.sh icon on your desktop or run the script /home/oracle/Desktop/start_all.sh\n&nbsp;\nTo stop all processes, click on the stop_all.sh icon on your desktop or run the script /home/oracle/Desktop/stop_all.sh\n</code></pre>\n<p>You just have to follow what is displayed</p>\n<h3>start_all.sh</h3>\n<p>Here is how to start everything in the right order.</p>\n<pre><code>\n$ /home/oracle/Desktop/start_all.sh\nStarting EM12c: Oracle Database, Oracle Management Server and Oracle Management Agent .....\n&nbsp;\nStarting the Oracle Database and network listener .....\n&nbsp;\n&nbsp;\nLSNRCTL for Linux: Version 11.2.0.4.0 - Production on 12-NOV-2015 12:46:01\n&nbsp;\nCopyright (c) 1991, 2013, Oracle.  All rights reserved.\n&nbsp;\nStarting /u01/OracleHomes/db/product/dbhome_1/bin/tnslsnr: please wait...\n&nbsp;\nTNSLSNR for Linux: Version 11.2.0.4.0 - Production\nLog messages written to /u01/OracleHomes/db/product/dbhome_1/log/diag/tnslsnr/emcc/listener/alert/log.xml\nListening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))\n&nbsp;\nConnecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))\nSTATUS of the LISTENER\n------------------------\nAlias                     LISTENER\nVersion                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production\nStart Date                12-NOV-2015 12:46:01\nUptime                    0 days 0 hr. 0 min. 0 sec\nTrace Level               off\nSecurity                  ON: Local OS Authentication\nSNMP                      OFF\nListener Log File         /u01/OracleHomes/db/product/dbhome_1/log/diag/tnslsnr/emcc/listener/alert/log.xml\nListening Endpoints Summary...\n  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))\nThe listener supports no services\nThe command completed successfully\n&nbsp;\nSQL*Plus: Release 11.2.0.4.0 Production on Thu Nov 12 12:46:02 2015\n&nbsp;\nCopyright (c) 1982, 2013, Oracle.  All rights reserved.\n&nbsp;\nConnected to an idle instance.\n&nbsp;\nSQL&gt; ORACLE instance started.\n&nbsp;\nTotal System Global Area 1469792256 bytes\nFixed Size                  2253344 bytes\nVariable Size             855641568 bytes\nDatabase Buffers          603979776 bytes\nRedo Buffers                7917568 bytes\nDatabase mounted.\nDatabase opened.\nSQL&gt;\nSystem altered.\n&nbsp;\nSQL&gt; Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production\nWith the Partitioning, OLAP, Data Mining and Real Application Testing options\nStarting the Oracle Management Server .....\n&nbsp;\nnohup: appending output to `nohup.out'\n&nbsp;\n&nbsp;\nopmnctl startall: starting opmn and all managed processes...\nStarting the Oracle Management Agent .....\n&nbsp;\nOracle Enterprise Manager Cloud Control 12c Release 5\nCopyright (c) 1996, 2015 Oracle Corporation.  All rights reserved.\nStarting agent ........................... started.\n</code></pre>\n<p>And it&#8217;s ready. You can access to it from the VM console, or the host browser on https://192.168.78.42:7799/em</p>\n<p>All passwords are welcome1.</p>\n<p>You can discover the others hosts. I&#8217;ve put them n the /etc/hosts in the EM VM, and I&#8217;ve put the following line in all /etc/hosts where I want to install agents: </p>\n<pre><code>\n192.168.78.42 emcc emcc.example.com\n</code></pre>\n<p>Hope it helps. There are things that are quicker to do from Cloud Control when you are in OCM exam so better to know it. However, don&#8217;t rely on that only as it may not be available for all exercises.</p>\n",
    "protected": false
  }
}
