{"id":24,"date":"2010-03-22T06:34:20","date_gmt":"2010-03-22T11:34:20","guid":{"rendered":"http:\/\/weinshenker.net\/blog\/?p=24"},"modified":"2010-08-21T23:42:45","modified_gmt":"2010-08-22T04:42:45","slug":"the-easy-ok-easier-way-to-installing-oracle","status":"publish","type":"post","link":"http:\/\/weinshenker.net\/blog\/2010\/03\/22\/the-easy-ok-easier-way-to-installing-oracle\/","title":{"rendered":"The easy (ok, easier) way to installing Oracle"},"content":{"rendered":"<p>From searching the web, it&#8217;s apparent that even installing Oracle on Linux can be a challenge for many people.\u00a0 Sure, there&#8217;s OFA (Oracle Flexible Architecture), best practices, mount points, file system types and all the lot.\u00a0 You can always find a way to make things <em>a little bit<\/em> better or more complex.<\/p>\n<p>I want to start off with something a little more basic.\u00a0 I want to talk about the basic Oracle install.<\/p>\n<p>The general steps are to create a software owner (such as the user oracle) and a owner group (dba is pretty common) and, in the case of 11g, possibly things like ASM owner groups.\u00a0 Then you&#8217;ve got the actual runInstaller where you choose the disk locations, software components, etc.\u00a0 Part of what the Oracle installer does is to verify your system requirements:<\/p>\n<ul>\n<li>are you on a supported OS?<\/li>\n<li>do you have the required software packages (rpms)?<\/li>\n<li>do you have enough swap?<\/li>\n<li>do you have shared memory correctly configured?<\/li>\n<\/ul>\n<p>Oracle has made things easier with configuring all this stuff over the years, but there&#8217;s always room for improvement.<\/p>\n<p>To help verify you have all the requisite software packages, Oracle publishes a special rpm called <strong>oracle-validated<\/strong> .\u00a0 This RPM will verify you have all the pre-requisite RPMs you need to install Oracle and will set the shared memory configured correctly.\u00a0 You can find the latest versions of this rpm at<\/p>\n<ul>\n<li>Redhat (RHEL), Centos, Oracle (OEL) Linux 4 at http:\/\/oss.oracle.com\/el4\/oracle-validated\/<\/li>\n<li>Redhat (RHEL), Centos, Oracle (OEL) Linux 5 at  http:\/\/oss.oracle.com\/el5\/oracle-validated\/<\/li>\n<\/ul>\n<p>(Note that in the case of RHEL 4, you need to use rpm -ivh filename.rpm\u00a0 instead of yum install filename.rpm like shown below)<\/p>\n<p>Just choose the version you need and you can download and install it from the command line.<\/p>\n<p><strong>wget http:\/\/oss.oracle.com\/el5\/oracle-validated\/oracle-validated-1.0.0-18.el5.x86_64.rpm<\/strong><\/p>\n<p><strong>yum install oracle-validated-1.0.0-18.el5.x86_64.rpm<\/strong><\/p>\n<p>These days pretty much all new installs of Oracle for enterprise use are being done with Oracle 11gR2 (11.2.0.1) on RHEL 5 (5.4) 64-bit.\u00a0 Which would be the RPM I&#8217;ve listed above.\u00a0 The thing is, if you check, that RPM came out in <strong>March of 2009<\/strong>.\u00a0 It&#8217;s now been a year.\u00a0 The RPM works great for 11gR1 (11.1.0.6 \/ 11.1.0.7) installations but misses some things needed for 11gR2.\u00a0 11gR2 was released in October of 2009.\u00a0 I&#8217;ve asked in the support forums and have been told Oracle is still working on an updated version for 11gR2, Oracle&#8217;s flagship product.\u00a0\u00a0 To me it seems you&#8217;d get the helper rpm released around the same time as the database to help speed adoption and reduce support calls, but whatever.\u00a0 Heck, why not even provide the rpm with the Oracle database software itself? Maybe it has to do with the GPL and distributing software.\u00a0 Who knows.<\/p>\n<p>Now, in the dark days before OEL or RHEL 5, any rpms that were missing needed to be installed by hand.\u00a0 With OEL\/RHEL5, you now have yum which will automatically analyze and offer to install any necessary dependencies.\u00a0 If you utilize a subscription such as Oracle&#8217;s ULN (Unbreakable Linux Network) or RHN (Redhat Network) you can grab all these RPMs as needed right from the source and get the latest version.\u00a0 If you don&#8217;t have a subscription, or due to security you can&#8217;t allow the database server to get to the internet, you can create your own local repository.\u00a0 I&#8217;ll cover setting up a local repository in another post.<\/p>\n<p>So at this point you&#8217;ve gotten oracle-validated rpm installed and hence all your RPM pre-reqs installed.\u00a0 What about your shared memory (shmmax, etc) parameters configured?\u00a0 Oracle makes this easy too.\u00a0 Once you have the rpm installed, issue the following as root:<\/p>\n<p><strong>cd \/etc\/sysconfig\/oracle-validated<br \/>\n.\/oracle-validated-verify<br \/>\n<\/strong><\/p>\n<p>This goes out and makes many of the changes necessary for Oracle to run.\u00a0\u00a0 You can review what was run and changed by issuing:<\/p>\n<p><strong>more \/var\/log\/oracle-validated\/results\/orakernel.log<\/strong><\/p>\n<p>Unfortunately, there are a few more parameters you&#8217;ll need to add that the rpm misses or gets wrong due to changing best practices from Oracle.<\/p>\n<p><strong>vi \/etc\/sysctl.conf<br \/>\nchange net.core.rmem_default = 262144 to<br \/>\nnet.core.rmem_default = 4194304<br \/>\nsysctl -p<br \/>\nvi \/etc\/pam.d\/login<br \/>\nadd if missing<br \/>\nsession\u00a0 required\u00a0\u00a0 \/lib\/security\/pam_limits.so<br \/>\nsession\u00a0 required\u00a0\u00a0 pam_limits.so<br \/>\n<\/strong><\/p>\n<p>At this point you&#8217;re ready to start the Oracle software installer and you should be good to go.<\/p>\n<p>To summarize, for a vanilla RHEL 5 box to install 11gR1, here&#8217;s the steps you need to perform after installing the OS:<\/p>\n<p>useradd oracle<br \/>\ngroupadd dba<br \/>\nusermod -G dba oracle<\/p>\n<p>cd \/tmp<br \/>\nwget http:\/\/oss.oracle.com\/el5\/oracle-validated\/oracle-validated-1.0.0-18.el5.x86_64.rpm<br \/>\nyum install oracle-validated-1.0.0-18.el5.x86_64.rpm &#8211;nogpgcheck<\/p>\n<p>cd \/etc\/sysconfig\/oracle-validated<br \/>\n.\/oracle-validated-verify<br \/>\nmore \/var\/log\/oracle-validated\/results\/orakernel.log<br \/>\nmore orakernel.log<\/p>\n<p>vi \/etc\/sysctl.conf<br \/>\nchange net.core.rmem_default = 262144 to<br \/>\nnet.core.rmem_default = 4194304<br \/>\nsysctl -p<br \/>\nvi \/etc\/pam.d\/login<br \/>\nadd if missing<br \/>\nsession\u00a0 required\u00a0\u00a0 \/lib\/security\/pam_limits.so<br \/>\nsession\u00a0 required\u00a0\u00a0 pam_limits.so<\/p>\n<p>Have fun!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>From searching the web, it&#8217;s apparent that even installing Oracle on Linux can be a challenge for many people.\u00a0 Sure, there&#8217;s OFA (Oracle Flexible Architecture), best practices, mount points, file system types and all the lot.\u00a0 You can always find a way to make things a little bit better or more complex. I want to &hellip; <a href=\"http:\/\/weinshenker.net\/blog\/2010\/03\/22\/the-easy-ok-easier-way-to-installing-oracle\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The easy (ok, easier) way to installing Oracle<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[42,23,10],"_links":{"self":[{"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/posts\/24"}],"collection":[{"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/comments?post=24"}],"version-history":[{"count":5,"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/posts\/24\/revisions"}],"predecessor-version":[{"id":28,"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/posts\/24\/revisions\/28"}],"wp:attachment":[{"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/media?parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/categories?post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/weinshenker.net\/blog\/wp-json\/wp\/v2\/tags?post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}