{"id":187,"date":"2019-01-02T17:41:05","date_gmt":"2019-01-02T16:41:05","guid":{"rendered":"http:\/\/blog.xoupix.fr\/?p=187"},"modified":"2019-02-03T21:24:28","modified_gmt":"2019-02-03T20:24:28","slug":"installing-oracle-database-12c","status":"publish","type":"post","link":"https:\/\/blog.xoupix.fr\/index.php\/2019\/01\/02\/installing-oracle-database-12c\/","title":{"rendered":"Installing Oracle Database 12c"},"content":{"rendered":"\n<p>In this article, I will show you how to install <strong>Oracle&nbsp;Database&nbsp;12c<\/strong> in a sandbox !<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Preparing your sandbox<\/h2>\n\n\n\n<p>First of all, make sure that your CentOS 7 \/ Red Hat system is up to date.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum update -y<\/code><\/pre>\n\n\n\n<p>You will need some dependencies to install Oracle, as zip or unzip.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86_64 libaio-devel.i686 libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.i686 libstdc++.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 libXtst.i686 libXtst.x86_64 make.x86_64 sysstat.x86_64 zip unzip<\/code><\/pre>\n\n\n\n<p>Let&#8217;s create Oracle groups and user on your sandbox<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>groupadd oinstall\ngroupadd dba\nuseradd -g oinstall -G dba oracle\npasswd oracle<\/code><\/pre>\n\n\n\n<p>Next, edit your <strong>\/etc\/sysctl.conf<\/strong> system file to add \/ check the following parameters<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>fs.aio-max-nr = 1048576\nfs.file-max = 6815744\nkernel.shmall = 2097152\nkernel.shmmax = 8329226240\nkernel.shmmni = 4096\nkernel.sem = 250 32000 100 128\nnet.ipv4.ip_local_port_range = 9000 65500\nnet.core.rmem_default = 262144\nnet.core.rmem_max = 4194304\nnet.core.wmem_default = 262144\nnet.core.wmem_max = 1048586<\/code><\/pre>\n\n\n\n<p>When it&#8217;s done, apply them<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sysctl -p\nsysctl -a<\/code><\/pre>\n\n\n\n<p>Unzip your Oracle Database 12c installation package to a specific directerory (as <strong>\/tmp\/Oracle<\/strong>), then create some directories which will be used while installing Oracle.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir \/u01\nmkdir \/u02\nchown -R oracle:oinstall \/u01\nchown -R oracle:oinstall \/u02\nchown -R oracle:oinstall \/tmp\/Oracle\nchmod -R 775 \/u01\nchmod -R 775 \/u02\nchmod g+s \/u01\nchmod g+s \/u02<\/code><\/pre>\n\n\n\n<p>You are now ready to run the installer ! Be careful, I will use the GUI installer. Make sure that you have installed a X server, or use some tools as mobaXterm with exported DISPLAY environment value.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/tmp\/Oracle\/runInstaller<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Installing Oracle Database 12c<\/h2>\n\n\n\n<p> If you already own an Oracle account, you can provide your email address in this step. This is optional. <\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"539\" height=\"208\" src=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_05_57-Oracle-Database-12c-Release-1-Installer-Step-1-of-9.png\" alt=\"\" class=\"wp-image-194\" srcset=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_05_57-Oracle-Database-12c-Release-1-Installer-Step-1-of-9.png 539w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_05_57-Oracle-Database-12c-Release-1-Installer-Step-1-of-9-300x116.png 300w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_05_57-Oracle-Database-12c-Release-1-Installer-Step-1-of-9-500x193.png 500w\" sizes=\"auto, (max-width: 539px) 100vw, 539px\" \/><figcaption>Oracle account<\/figcaption><\/figure><\/div>\n\n\n\n<p> Select the &#8220;Create and configure a database&#8221; and click &#8220;Next&#8221;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"386\" height=\"169\" src=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_09_30-Oracle-Database-12c-Release-1-Installer-Step-2-of-9.png\" alt=\"\" class=\"wp-image-195\" srcset=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_09_30-Oracle-Database-12c-Release-1-Installer-Step-2-of-9.png 386w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_09_30-Oracle-Database-12c-Release-1-Installer-Step-2-of-9-300x131.png 300w\" sizes=\"auto, (max-width: 386px) 100vw, 386px\" \/><figcaption>Creating and configuring a database<\/figcaption><\/figure><\/div>\n\n\n\n<p>Select &#8220;desktop class&#8221; and click &#8220;Next&#8221;, cause we are just setting up a sandbox<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"584\" height=\"154\" src=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_10_54-Oracle-Database-12c-Release-1-Installer-Step-3-of-8.png\" alt=\"\" class=\"wp-image-196\" srcset=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_10_54-Oracle-Database-12c-Release-1-Installer-Step-3-of-8.png 584w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_10_54-Oracle-Database-12c-Release-1-Installer-Step-3-of-8-300x79.png 300w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_10_54-Oracle-Database-12c-Release-1-Installer-Step-3-of-8-500x132.png 500w\" sizes=\"auto, (max-width: 584px) 100vw, 584px\" \/><figcaption>Using a desktop class system<\/figcaption><\/figure>\n\n\n\n<p>Configure your Oracle instance, and click &#8220;Next&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"593\" height=\"386\" src=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_12_56-Oracle-Database-12c-Release-1-Installer-Step-4-of-8.png\" alt=\"\" class=\"wp-image-197\" srcset=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_12_56-Oracle-Database-12c-Release-1-Installer-Step-4-of-8.png 593w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_12_56-Oracle-Database-12c-Release-1-Installer-Step-4-of-8-300x195.png 300w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_12_56-Oracle-Database-12c-Release-1-Installer-Step-4-of-8-461x300.png 461w\" sizes=\"auto, (max-width: 593px) 100vw, 593px\" \/><figcaption>Using previously created directories, and setting up DataBase name and password<\/figcaption><\/figure>\n\n\n\n<p>Click &#8220;Next&#8221; to validate the inventory directory<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"582\" height=\"298\" src=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/Oracle-12c-Inventory-Directory.png\" alt=\"\" class=\"wp-image-199\" srcset=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/Oracle-12c-Inventory-Directory.png 582w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/Oracle-12c-Inventory-Directory-300x154.png 300w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/Oracle-12c-Inventory-Directory-500x256.png 500w\" sizes=\"auto, (max-width: 582px) 100vw, 582px\" \/><\/figure>\n\n\n\n<p>Tune your system, if needed, to remove all warnings (the Swap Size warning isn&#8217;t very important for me), then click &#8220;Next&#8221;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"590\" height=\"273\" src=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_15_12-Oracle-Database-12c-Release-1-Installer-Step-5-of-8.png\" alt=\"\" class=\"wp-image-198\" srcset=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_15_12-Oracle-Database-12c-Release-1-Installer-Step-5-of-8.png 590w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_15_12-Oracle-Database-12c-Release-1-Installer-Step-5-of-8-300x139.png 300w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_15_12-Oracle-Database-12c-Release-1-Installer-Step-5-of-8-500x231.png 500w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><\/figure><\/div>\n\n\n\n<p>Check the sumary, then click &#8220;Install&#8221; to start the installation<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"582\" height=\"452\" src=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_19_14-Oracle-Database-12c-Release-1-Installer-Step-6-of-8.png\" alt=\"\" class=\"wp-image-200\" srcset=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_19_14-Oracle-Database-12c-Release-1-Installer-Step-6-of-8.png 582w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_19_14-Oracle-Database-12c-Release-1-Installer-Step-6-of-8-300x233.png 300w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_19_14-Oracle-Database-12c-Release-1-Installer-Step-6-of-8-386x300.png 386w\" sizes=\"auto, (max-width: 582px) 100vw, 582px\" \/><\/figure><\/div>\n\n\n\n<p>Wait until the Oracle installation completes (can take a couple of minutes, coffee time !)<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"330\" src=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/Oracle-12c-Installation-Progress.png\" alt=\"\" class=\"wp-image-201\" srcset=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/Oracle-12c-Installation-Progress.png 570w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/Oracle-12c-Installation-Progress-300x174.png 300w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/Oracle-12c-Installation-Progress-500x289.png 500w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><figcaption>Installing&#8230;<\/figcaption><\/figure><\/div>\n\n\n\n<p>You will be asked, during installation, to execute some scripts as &#8220;root&#8221;. Let&#8217;s execute them using the following commands (as root, of course)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/u01\/app\/oraInventory\n.\/orainstRoot.sh\ncd \/u01\/app\/oracle\/product\/12.2.0\/dbhome_1\n.\/root.sh<\/code><\/pre>\n\n\n\n<p>The installation will complete. Just have to tune it to finish the sandbox.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Tuning Oracle server<\/h2>\n\n\n\n<p>If you are enabling the server firewall, you have to open the following ports :<br>&#8211; 1521\/TCP<br>&#8211; 5500\/TCP<br>&#8211; 5520\/TCP<br>&#8211; 3938\/TCP<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>firewall-cmd --zone=public --add-port=1521\/tcp --add-port=5500\/tcp --add-port=5520\/tcp --add-port=3938\/tcp --permanent\nfirewall-cmd --reload<\/code><\/pre>\n\n\n\n<p>Connect to your server as <strong>oracle<\/strong>, then edit your .bash_profile file to add the following lines (make sure to change the ORACLE_SID value to match your global DataBase name configured when installing Oracle 12c)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>TMPDIR=$TMP; export TMPDIR\nORACLE_BASE=\/u01\/app\/oracle; export ORACLE_BASE\nORACLE_HOME=$ORACLE_BASE\/product\/12.1.0\/dbhome_1; export ORACLE_HOME\nORACLE_SID=oracle; export ORACLE_SID\nPATH=$ORACLE_HOME\/bin:$PATH; export PATH\nLD_LIBRARY_PATH=$ORACLE_HOME\/lib:\/lib:\/usr\/lib:\/usr\/lib64; export LD_LIBRARY_PATH\nCLASSPATH=$ORACLE_HOME\/jlib:$ORACLE_HOME\/rdbms\/jlib; export CLASSPATH<\/code><\/pre>\n\n\n\n<p>Source your file to reload the configuration<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>source ~\/.bash_profile<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Starting the instance<\/h2>\n\n\n\n<p>Finally, you will be able to start your newly created instance and use it. To do it, just execute the following command lines, logged as <strong>oracle<\/strong>. The first command will start the listener, and the second line will start this Oracle instance<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/u01\/app\/oracle\/product\/12.1.0\/dbhome_1\/bin\/lsnrctl start\n\/u01\/app\/oracle\/product\/12.1.0\/dbhome_1\/bin\/dbstart \/u01\/app\/oracle\/product\/12.1.0\/dbhome_1<\/code><\/pre>\n\n\n\n<p>Using SQL Developper (or sqlplus command), you will be able to connect to your new instance (you will may have to create a new user, who will be granted to connect to your new DataBase instance)<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"466\" height=\"300\" src=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_31_03-Cr\u00e9er-_-S\u00e9lectionner-une-connexion-de-base-de-donn\u00e9es.png\" alt=\"\" class=\"wp-image-202\" srcset=\"https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_31_03-Cr\u00e9er-_-S\u00e9lectionner-une-connexion-de-base-de-donn\u00e9es.png 466w, https:\/\/blog.xoupix.fr\/wp-content\/uploads\/2019\/01\/2019-01-02-17_31_03-Cr\u00e9er-_-S\u00e9lectionner-une-connexion-de-base-de-donn\u00e9es-300x193.png 300w\" sizes=\"auto, (max-width: 466px) 100vw, 466px\" \/><figcaption>SQL Developper connection configuration<\/figcaption><\/figure><\/div>\n\n\n\n<p>You now have a fully configured Oracle 12c instance in your sandbox !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, I will show you how to install Oracle&nbsp;Database&nbsp;12c in a sandbox !<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[12],"class_list":["post-187","post","type-post","status-publish","format-standard","hentry","category-oracle","tag-oracle"],"_links":{"self":[{"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":7,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":203,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/posts\/187\/revisions\/203"}],"wp:attachment":[{"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.xoupix.fr\/index.php\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}