
{"id":1404,"date":"2022-04-04T14:58:34","date_gmt":"2022-04-04T06:58:34","guid":{"rendered":"http:\/\/dba.qishuo.xin\/?p=1404"},"modified":"2023-10-20T20:51:11","modified_gmt":"2023-10-20T12:51:11","slug":"%e9%9d%99%e9%bb%98%e5%ae%89%e8%a3%85%e9%83%a8%e7%bd%b2oracle-19c%e7%89%88%e6%9c%ac","status":"publish","type":"post","link":"http:\/\/dba.qishuo.xin\/?p=1404","title":{"rendered":"\u9759\u9ed8\u5b89\u88c5\u90e8\u7f72Oracle 19c\u7248\u672c"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_76 ez-toc-wrap-right counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<label for=\"ez-toc-cssicon-toggle-item-69f72f2985511\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69f72f2985511\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#%E4%B8%80%E3%80%81%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%8E%AF%E5%A2%83\" >\u4e00\u3001\u670d\u52a1\u5668\u73af\u5883<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#11_%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%A1%AC%E4%BB%B6%E9%85%8D%E7%BD%AE\" >1.1. \u670d\u52a1\u5668\u786c\u4ef6\u914d\u7f6e<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#12_%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%89%88%E6%9C%AC\" >1.2. \u64cd\u4f5c\u7cfb\u7edf\u7248\u672c<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#%E4%BA%8C%E3%80%81%E5%AE%89%E8%A3%85Oracle%E6%95%B0%E6%8D%AE%E5%BA%93%E7%9A%84%E6%89%80%E6%9C%89%E5%85%88%E5%86%B3%E6%9D%A1%E4%BB%B6\" >\u4e8c\u3001\u5b89\u88c5Oracle\u6570\u636e\u5e93\u7684\u6240\u6709\u5148\u51b3\u6761\u4ef6<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#21_%E6%A3%80%E6%9F%A5%E5%86%85%E6%A0%B8%E7%89%88%E6%9C%AC\" >2.1. \u68c0\u67e5\u5185\u6838\u7248\u672c<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#22_%E8%A3%85Oracle%E6%95%B0%E6%8D%AE%E5%BA%93%E5%85%88%E5%86%B3%E6%9D%A1%E4%BB%B6\" >2.2. \u88c5Oracle\u6570\u636e\u5e93\u5148\u51b3\u6761\u4ef6<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#23_%E6%A3%80%E6%9F%A5%E5%85%88%E5%86%B3%E6%9D%A1%E4%BB%B6%E5%AE%89%E8%A3%85\" >2.3. \u68c0\u67e5\u5148\u51b3\u6761\u4ef6\u5b89\u88c5<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#%E4%B8%89%E3%80%81%E9%9D%99%E9%BB%98%E5%AE%89%E8%A3%85Oracle%E8%BD%AF%E4%BB%B6\" >\u4e09\u3001\u9759\u9ed8\u5b89\u88c5Oracle\u8f6f\u4ef6<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#31_%E5%88%9B%E5%BB%BA%E7%9B%AE%E5%BD%95\" >3.1. \u521b\u5efa\u76ee\u5f55<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#32_%E9%85%8D%E7%BD%AEOracle%E7%94%A8%E6%88%B7%E7%9A%84%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F\" >3.2. \u914d\u7f6eOracle\u7528\u6237\u7684\u73af\u5883\u53d8\u91cf<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#33_%E7%94%9F%E6%95%88%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F\" >3.3. \u751f\u6548\u73af\u5883\u53d8\u91cf<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#34_%E8%A7%A3%E5%8E%8BOracle%E5%AE%89%E8%A3%85%E8%BD%AF%E4%BB%B6%E5%88%B0ORACLE_HOME%E7%9B%AE%E5%BD%95\" >3.4. \u89e3\u538bOracle\u5b89\u88c5\u8f6f\u4ef6\u5230ORACLE_HOME\u76ee\u5f55<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#35_%E5%87%86%E5%A4%87%E5%93%8D%E5%BA%94%E6%96%87%E4%BB%B6\" >3.5. \u51c6\u5907\u54cd\u5e94\u6587\u4ef6<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-14\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#36_%E6%89%A7%E8%A1%8CrunInstaller%E5%91%BD%E4%BB%A4\" >3.6. \u6267\u884crunInstaller\u547d\u4ee4<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-15\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#37_%E5%90%AF%E5%8A%A8%E7%9B%91%E5%90%AC\" >3.7. \u542f\u52a8\u76d1\u542c<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-16\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#%E5%9B%9B%E3%80%81%E5%88%9B%E5%BB%BA%E6%95%B0%E6%8D%AE%E5%BA%93\" >\u56db\u3001\u521b\u5efa\u6570\u636e\u5e93<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-17\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#41_%E9%85%8D%E7%BD%AE%E5%88%9B%E5%BB%BA%E6%95%B0%E6%8D%AE%E5%BA%93%E7%9A%84%E5%93%8D%E5%BA%94%E6%96%87%E4%BB%B6\" >4.1. \u914d\u7f6e\u521b\u5efa\u6570\u636e\u5e93\u7684\u54cd\u5e94\u6587\u4ef6<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-18\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#42_%E4%BD%BF%E7%94%A8dbcarsp%E9%9D%99%E9%BB%98%E5%BB%BA%E5%BA%93\" >4.2. \u4f7f\u7528dbca.rsp\u9759\u9ed8\u5efa\u5e93<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-19\" href=\"http:\/\/dba.qishuo.xin\/?p=1404\/#5_%E9%99%84%E5%BD%95\" >5. \u9644\u5f55<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"%E4%B8%80%E3%80%81%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%8E%AF%E5%A2%83\"><\/span>\u4e00\u3001\u670d\u52a1\u5668\u73af\u5883<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"11_%E6%9C%8D%E5%8A%A1%E5%99%A8%E7%A1%AC%E4%BB%B6%E9%85%8D%E7%BD%AE\"><\/span>1.1. \u670d\u52a1\u5668\u786c\u4ef6\u914d\u7f6e<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<h4><span class=\"ez-toc-section\" id=\"12_%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%89%88%E6%9C%AC\"><\/span>1.2. \u64cd\u4f5c\u7cfb\u7edf\u7248\u672c<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>CentOS Linux release 7.8.2003 (Core)<\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E4%BA%8C%E3%80%81%E5%AE%89%E8%A3%85Oracle%E6%95%B0%E6%8D%AE%E5%BA%93%E7%9A%84%E6%89%80%E6%9C%89%E5%85%88%E5%86%B3%E6%9D%A1%E4%BB%B6\"><\/span>\u4e8c\u3001\u5b89\u88c5Oracle\u6570\u636e\u5e93\u7684\u6240\u6709\u5148\u51b3\u6761\u4ef6<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"21_%E6%A3%80%E6%9F%A5%E5%86%85%E6%A0%B8%E7%89%88%E6%9C%AC\"><\/span>2.1. \u68c0\u67e5\u5185\u6838\u7248\u672c<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"language-shell\">~]# uname -a\nLinux dbteam.zytk.com 3.10.0-1127.8.2.el7.x86_64 #1 SMP Tue May 12 16:57:42 UTC 2020 x86_64 x86_64 x86_64 GNU\/Linux<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"22_%E8%A3%85Oracle%E6%95%B0%E6%8D%AE%E5%BA%93%E5%85%88%E5%86%B3%E6%9D%A1%E4%BB%B6\"><\/span>2.2. \u88c5Oracle\u6570\u636e\u5e93\u5148\u51b3\u6761\u4ef6<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong><span style='color:red'>\u76f4\u63a5\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u8fdb\u884c\u5b89\u88c5\uff1a<\/span><\/strong><\/p>\n<pre><code class=\"language-shell\">yum install -y https:\/\/yum.oracle.com\/repo\/OracleLinux\/OL7\/latest\/x86_64\/getPackage\/oracle-database-preinstall-19c-1.0-2.el7.x86_64.rpm<\/code><\/pre>\n<ul>\n<li>\u5bf9\u4e8eOracle Linux\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4<\/li>\n<\/ul>\n<pre><code class=\"language-shell\">~]# yum install oracle-database-preinstall-19c.x86_64<\/code><\/pre>\n<p><a href=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2022\/04\/wp_editor_md_f5d6f2330f9f2c0973e13db9f76ad47d.jpg\" data-fancybox=\"images\" data-fancybox=\"images\"><img decoding=\"async\" src=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2022\/04\/wp_editor_md_f5d6f2330f9f2c0973e13db9f76ad47d.jpg\" alt=\"\" \/><\/a><\/p>\n<p><strong><span style='color:red'>oracle-database-preinstall-19c.x86_64\u7684\u51c6\u5907\u5de5\u5177\u4f1a\u81ea\u52a8\u5b8c\u6210\u7528\u6237\u548c\u7528\u6237\u7ec4\u7684\u521b\u5efa\u3001\u7cfb\u7edf\u53c2\u6570\u914d\u7f6e\u3001\u4f9d\u8d56\u5305\u68c0\u67e5\u4e0e\u5b89\u88c5\uff0c\u5b9e\u73b0\u4e00\u952e\u51c6\u5907\u597doracle\u5b89\u88c5\u73af\u5883\u3002<\/span><\/strong><\/p>\n<p><strong>\u5907\u6ce8\uff1a\u5982\u679c\u662f\u5728centos\u6216\u8005rhel\u7b49\u6ca1\u6709oracle\u7684yum\u6e90\u4e0a\u53ef\u4ee5\u5148\u8bbe\u7f6e\u6e90\uff0c\u7136\u540e\u5b89\u88c5oracle-database-preinstall-19c.x86_64<\/strong><\/p>\n<pre><code class=\"language-shell\">wget http:\/\/public-yum.oracle.com\/public-yum-ol7.repo -O \/etc\/yum.repos.d\/public-yum-ol7.repo\nwget http:\/\/public-yum.oracle.com\/RPM-GPG-KEY-oracle-ol7 -O \/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-oracle<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"23_%E6%A3%80%E6%9F%A5%E5%85%88%E5%86%B3%E6%9D%A1%E4%BB%B6%E5%AE%89%E8%A3%85\"><\/span>2.3. \u68c0\u67e5\u5148\u51b3\u6761\u4ef6\u5b89\u88c5<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>a. Oracle\u7528\u6237<\/li>\n<\/ul>\n<pre><code class=\"language-shell\">~]# id oracle\nuid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54330(racdba)<\/code><\/pre>\n<ul>\n<li>b. \u5185\u6838\u53c2\u6570<\/li>\n<\/ul>\n<pre><code class=\"language-shell\">~]# cat \/etc\/sysctl.d\/99-oracle-database-preinstall-19c-sysctl.conf\n# sysctl settings are defined through files in\n# \/usr\/lib\/sysctl.d\/, \/run\/sysctl.d\/, and \/etc\/sysctl.d\/.\n#\n# Vendors settings live in \/usr\/lib\/sysctl.d\/.\n# To override a whole file, create a new file with the same in\n# \/etc\/sysctl.d\/ and put new settings there. To override\n# only specific settings, add a file with a lexically later\n# name in \/etc\/sysctl.d\/ and put new settings there.\n#\n# For more information, see sysctl.conf(5) and sysctl.d(5).\n\n# oracle-database-preinstall-19c setting for fs.file-max is 6815744\nfs.file-max = 6815744\n\n# oracle-database-preinstall-19c setting for kernel.sem is &#039;250 32000 100 128&#039;\nkernel.sem = 250 32000 100 128\n\n# oracle-database-preinstall-19c setting for kernel.shmmni is 4096\nkernel.shmmni = 4096\n\n# oracle-database-preinstall-19c setting for kernel.shmall is 1073741824 on x86_64\nkernel.shmall = 1073741824\n\n# oracle-database-preinstall-19c setting for kernel.shmmax is 4398046511104 on x86_64\nkernel.shmmax = 4398046511104\n\n# oracle-database-preinstall-19c setting for kernel.panic_on_oops is 1 per Orabug 19212317\nkernel.panic_on_oops = 1\n\n# oracle-database-preinstall-19c setting for net.core.rmem_default is 262144\nnet.core.rmem_default = 262144\n\n# oracle-database-preinstall-19c setting for net.core.rmem_max is 4194304\nnet.core.rmem_max = 4194304\n\n# oracle-database-preinstall-19c setting for net.core.wmem_default is 262144\nnet.core.wmem_default = 262144\n\n# oracle-database-preinstall-19c setting for net.core.wmem_max is 1048576\nnet.core.wmem_max = 1048576\n\n# oracle-database-preinstall-19c setting for net.ipv4.conf.all.rp_filter is 2\nnet.ipv4.conf.all.rp_filter = 2\n\n# oracle-database-preinstall-19c setting for net.ipv4.conf.default.rp_filter is 2\nnet.ipv4.conf.default.rp_filter = 2\n\n# oracle-database-preinstall-19c setting for fs.aio-max-nr is 1048576\nfs.aio-max-nr = 1048576\n\n# oracle-database-preinstall-19c setting for net.ipv4.ip_local_port_range is 9000 65500\nnet.ipv4.ip_local_port_range = 9000 65500<\/code><\/pre>\n<ul>\n<li>c. \u5b89\u5168\u9650\u5236<\/li>\n<\/ul>\n<pre><code class=\"language-shell\">~]# cat \/etc\/security\/limits.d\/oracle-database-preinstall-19c.conf\n\n# oracle-database-preinstall-19c setting for nofile soft limit is 1024\noracle   soft   nofile    1024\n\n# oracle-database-preinstall-19c setting for nofile hard limit is 65536\noracle   hard   nofile    65536\n\n# oracle-database-preinstall-19c setting for nproc soft limit is 16384\n# refer orabug15971421 for more info.\noracle   soft   nproc    16384\n\n# oracle-database-preinstall-19c setting for nproc hard limit is 16384\noracle   hard   nproc    16384\n\n# oracle-database-preinstall-19c setting for stack soft limit is 10240KB\noracle   soft   stack    10240\n\n# oracle-database-preinstall-19c setting for stack hard limit is 32768KB\noracle   hard   stack    32768\n\n# oracle-database-preinstall-19c setting for memlock hard limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90 % of RAM\noracle   hard   memlock    134217728\n\n# oracle-database-preinstall-19c setting for memlock soft limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90% of RAM\noracle   soft   memlock    134217728\n\n# oracle-database-preinstall-19c setting for data soft limit is &#039;unlimited&#039;\noracle   soft   data    unlimited\n\n# oracle-database-preinstall-19c setting for data hard limit is &#039;unlimited&#039;\noracle   hard   data    unlimited<\/code><\/pre>\n<h3><span class=\"ez-toc-section\" id=\"%E4%B8%89%E3%80%81%E9%9D%99%E9%BB%98%E5%AE%89%E8%A3%85Oracle%E8%BD%AF%E4%BB%B6\"><\/span>\u4e09\u3001\u9759\u9ed8\u5b89\u88c5Oracle\u8f6f\u4ef6<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"31_%E5%88%9B%E5%BB%BA%E7%9B%AE%E5%BD%95\"><\/span>3.1. \u521b\u5efa\u76ee\u5f55<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"language-shell\"># \u4ee5 root \u7528\u6237\u6267\u884c\u5982\u4e0b\u547d\u4ee4\nmkdir -p \/u01\/app\/oraInventory\nmkdir -p \/u01\/app\/oracle\/product\/19c\/db_1\nchown -R oracle:oinstall \/u01\/app\/oraInventory\nchown -R oracle:oinstall \/u01\/app\/oracle<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"32_%E9%85%8D%E7%BD%AEOracle%E7%94%A8%E6%88%B7%E7%9A%84%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F\"><\/span>3.2. \u914d\u7f6eOracle\u7528\u6237\u7684\u73af\u5883\u53d8\u91cf<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"language-shell\"># \u4ee5 oracle \u7528\u6237\u6267\u884c\u5982\u4e0b\u547d\u4ee4\nvim .bash_profile\n\n## \u672b\u5c3e\u6dfb\u52a0\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u5185\u5bb9\u5982\u4e0b\uff1a\numask 022\n#oracle\u6570\u636e\u5e93\u5b89\u88c5\u76ee\u5f55\nexport ORACLE_BASE=\/u01\/app\/oracle\n#oracle\u6570\u636e\u5e93\u8def\u5f84\nexport ORACLE_HOME=$ORACLE_BASE\/product\/19c\/db_1\n#oracle\u542f\u52a8\u6570\u636e\u5e93\u5b9e\u4f8b\u540d\nexport ORACLE_SID=zyzh\n#xterm\u7a97\u53e3\u6a21\u5f0f\u5b89\u88c5\nexport ORACLE_TERM=xterm\n#\u914d\u7f6e\u65f6\u95f4\u683c\u5f0f\nNLS_DATE_FORMAT=&quot;YYYY:MM:DDHH24:MI:SS&quot;\n#\u6dfb\u52a0\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\nexport PATH=$ORACLE_HOME\/bin:\/usr\/sbin:$PATH\n#\u6dfb\u52a0\u7cfb\u7edf\u73af\u5883\u53d8\u91cf\nexport LD_LIBRARY_PATH=$ORACLE_HOME\/lib:\/lib:\/usr\/lib\n#\u9632\u6b62\u5b89\u88c5\u8fc7\u7a0b\u51fa\u73b0\u4e71\u7801\n#export LANG=en_US.gbk\nexport LANG=en_US.UTF-8\n#\u8bbe\u7f6eOracle\u5ba2\u6237\u7aef\u5b57\u7b26\u96c6\uff0c\u5fc5\u987b\u4e0eOracle\u5b89\u88c5\u65f6\u8bbe\u7f6e\u7684\u5b57\u7b26\u96c6\u4fdd\u6301\u4e00\u81f4\uff0c\n#export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK\nexport NLS_LANG=AMERICAN_AMERICA.UTF8<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"33_%E7%94%9F%E6%95%88%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F\"><\/span>3.3. \u751f\u6548\u73af\u5883\u53d8\u91cf<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"language-shell\"># \u91cd\u65b0\u767b\u5f55\u6216\u8005\u6267\u884csource \u7acb\u5373\u751f\u6548\nsource ~\/.bash_profile<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"34_%E8%A7%A3%E5%8E%8BOracle%E5%AE%89%E8%A3%85%E8%BD%AF%E4%BB%B6%E5%88%B0ORACLE_HOME%E7%9B%AE%E5%BD%95\"><\/span>3.4. \u89e3\u538bOracle\u5b89\u88c5\u8f6f\u4ef6\u5230ORACLE_HOME\u76ee\u5f55<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>1\uff09\u4eceOracle\u5b98\u7f51\u4e0b\u8f7dOracle19c\u7684\u5b89\u88c5\u5305\u5230\/media\u76ee\u5f55\u4e0b\u3002<br \/>\n\u5b98\u65b9\u4e0b\u8f7d\u5730\u5740\uff1a<a target=\"_blank\" href=\"https:\/\/www.oracle.com\/database\/technologies\/oracle-database-software-downloads.html\">https:\/\/www.oracle.com\/database\/technologies\/oracle-database-software-downloads.html<\/a><\/p>\n<p>2\uff09\u89e3\u538bOracle\u5b89\u88c5\u8f6f\u4ef6\u5230ORACLE_HOME\u76ee\u5f55<\/p>\n<pre><code class=\"language-shell\"># \u4ee5 oracle \u7528\u6237\u6267\u884c\u5982\u4e0b\u547d\u4ee4\nunzip \/media\/LINUX.X64_193000_db_home.zip -d \/u01\/app\/oracle\/product\/19c\/db_1\/<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"35_%E5%87%86%E5%A4%87%E5%93%8D%E5%BA%94%E6%96%87%E4%BB%B6\"><\/span>3.5. \u51c6\u5907\u54cd\u5e94\u6587\u4ef6<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<ul>\n<li>\u4fee\u6539\u54cd\u5e94\u6587\u4ef6 <code>db_install.rsp<\/code><\/li>\n<li>\u7edf\u4e00\u590d\u5236\u54cd\u5e94\u6587\u4ef6\u5230 <code>\/home\/oracle\/<\/code> \u4e0b\u9762\uff0c\u7136\u540e\u518d\u6388\u6743\u548c\u4fee\u6539\u54cd\u5e94\u6587\u4ef6Oracle 11\/12\u89e3\u538b\u540eresponse\u76ee\u5f55\uff0c\u4e0b\u9762\u5305\u542b <code>dbca.rsp<\/code> (\u7528\u6765\u521b\u5efa\u6570\u636e\u5e93\u7684), <code>db_install.rsp<\/code> (\u7528\u6765\u5b89\u88c5Oracle\u8f6f\u4ef6\uff09\uff0c<code>netca.rsp<\/code>\uff08\u7528\u6765\u521b\u5efa\u76d1\u542c\u5668\uff09 \u4e09\u4e2a\u6587\u4ef6<\/li>\n<li>Oracle 19c\u89e3\u538b\u540eresponse\u76ee\u5f55\u4e0b\uff0c\u53ea\u5305\u542b <code>db_install.rsp<\/code> (\u7528\u6765\u5b89\u88c5Oracle\u8f6f\u4ef6\uff09\uff0c<code>dbca.rsp<\/code> \u5728 <code>$ORACLE_HOME\/assistants\/dbca\/dbca.rsp<\/code><\/li>\n<\/ul>\n<p>\u4fee\u6539\u7684\u9009\u9879\u5217\u8868\uff0c\u4ec5\u5b89\u88c5Oracle Database 19c\u8f6f\u4ef6\uff1a<\/p>\n<pre><code class=\"language-shell\"># \u5728 oracle \u7528\u6237\u4e0b\u6267\u884c\u5982\u4e0b\u547d\u4ee4\n cd $ORACLE_HOME\nfind .\/ -name db_install.rsp\n.\/install\/response\/db_install.rsp\n.\/inventory\/response\/db_install.rsp\n\ncp -r $ORACLE_HOME\/install\/response \/home\/oracle\nvim \/home\/oracle\/response\/db_install.rsp\n\noracle.install.option=INSTALL_DB_SWONLY\nUNIX_GROUP_NAME=oinstall\nINVENTORY_LOCATION=\/u01\/app\/oraInventory\nORACLE_HOME=\/u01\/app\/oracle\/product\/19c\/db_1\nORACLE_BASE=\/u01\/app\/oracle\noracle.install.db.InstallEdition=EE\noracle.install.db.OSDBA_GROUP=dba\noracle.install.db.OSOPER_GROUP=oper\noracle.install.db.OSBACKUPDBA_GROUP=backupdba\noracle.install.db.OSDGDBA_GROUP=dgdba\noracle.install.db.OSKMDBA_GROUP=kmdba\noracle.install.db.OSRACDBA_GROUP=racdba\noracle.install.db.rootconfig.executeRootScript=true\noracle.install.db.rootconfig.configMethod=ROOT<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"36_%E6%89%A7%E8%A1%8CrunInstaller%E5%91%BD%E4%BB%A4\"><\/span>3.6. \u6267\u884crunInstaller\u547d\u4ee4<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"language-shell\"># \u4ee5 oracle \u7528\u6237\u6267\u884crunInstaller\u547d\u4ee4\n$ORACLE_HOME\/runInstaller -silent -ignorePrereq -responseFile \/home\/oracle\/response\/db_install.rsp<\/code><\/pre>\n<p><a href=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2022\/04\/wp_editor_md_3753f1bff973fdc1aa7b703925a6d551.jpg\" data-fancybox=\"images\" data-fancybox=\"images\"><img decoding=\"async\" src=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2022\/04\/wp_editor_md_3753f1bff973fdc1aa7b703925a6d551.jpg\" alt=\"\" \/><\/a><\/p>\n<h4><span class=\"ez-toc-section\" id=\"37_%E5%90%AF%E5%8A%A8%E7%9B%91%E5%90%AC\"><\/span>3.7. \u542f\u52a8\u76d1\u542c<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<pre><code class=\"language-shell\"># \u4ee5 oracle \u7528\u6237\u6267\u884c\u5982\u4e0b\u547d\u4ee4\nlsnrctl start\nnetstat -an |grep 1521<\/code><\/pre>\n<p><a href=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2022\/04\/wp_editor_md_1e03334c4d0f3b3dfe85433a9ba43af2.jpg\" data-fancybox=\"images\" data-fancybox=\"images\"><img decoding=\"async\" src=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2022\/04\/wp_editor_md_1e03334c4d0f3b3dfe85433a9ba43af2.jpg\" alt=\"\" \/><\/a><\/p>\n<h3><span class=\"ez-toc-section\" id=\"%E5%9B%9B%E3%80%81%E5%88%9B%E5%BB%BA%E6%95%B0%E6%8D%AE%E5%BA%93\"><\/span>\u56db\u3001\u521b\u5efa\u6570\u636e\u5e93<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<h4><span class=\"ez-toc-section\" id=\"41_%E9%85%8D%E7%BD%AE%E5%88%9B%E5%BB%BA%E6%95%B0%E6%8D%AE%E5%BA%93%E7%9A%84%E5%93%8D%E5%BA%94%E6%96%87%E4%BB%B6\"><\/span>4.1. \u914d\u7f6e\u521b\u5efa\u6570\u636e\u5e93\u7684\u54cd\u5e94\u6587\u4ef6<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p>\u9759\u9ed8\u65b9\u5f0f\u4f7f\u7528dbca.rsp\u6765\u521b\u5efa\u6570\u636e\u5e93<\/p>\n<pre><code class=\"language-shell\"># \u4ee5 oracle \u7528\u6237\u6267\u884c\u5982\u4e0b\u547d\u4ee4\ncp $ORACLE_HOME\/assistants\/dbca\/dbca.rsp \/home\/oracle\/response\/<\/code><\/pre>\n<p>\u8bbe\u7f6e\u4ee5\u4e0b\u53c2\u6570\uff08<strong>\u6ce8\u610f\uff1aOracle11g\u5b89\u88c5\u65f6\u5b57\u7b26\u4e32\u53c2\u6570\u5e26\u5f15\u53f7\u8f93\u5165\uff0c\u4f46Oracle 19c\u9700\u8981\u5220\u9664\u5f15\u53f7\uff0c\u5426\u5219\u4f1a\u62a5\u9519\uff0c\u53d8\u91cf\u8bbe\u7f6e\u8def\u5f84\u662f\u4e5f\u4e0d\u652f\u6301$ORACLE_BASE\u7684\u5199\u6cd5<\/strong>\uff09<\/p>\n<pre><code class=\"language-shell\"># \u4ee5 oracle \u7528\u6237\u6267\u884c\u5982\u4e0b\u547d\u4ee4\nvim \/home\/oracle\/response\/dbca.rsp\ngdbName=zyzh\nsid=zyzh\n# \u6570\u636e\u5e93\u7c7b\u578b\uff1aSI\/RAC\/RACONENODE,\u8fd9\u91cc\u4f7f\u7528\u5355\u5b9e\u4f8b\u6570\u636e\u5e93\ndatabaseConfigType=SI\n# \u662f\u5426\u521b\u5efa\u4e3a\u5bb9\u5668\u6570\u636e\u5e93\ncreateAsContainerDatabase=TRUE\n# \u521b\u5efa\u5bb9\u5668\u6570\u636e\u5e93\u7684\u4e2a\u6570\nnumberOfPDBs=1\n# \u5bb9\u5668\u6570\u636e\u5e93\u7684\u540d\u79f0\npdbName=study1\n# PDB\u6570\u636e\u5e93\u662f\u5426\u4f7f\u7528\u672c\u5730undo\nuseLocalUndoForPDBs=TRUE\n# PDB\u6570\u636e\u5e93\u7ba1\u7406\u5458\u5bc6\u7801\npdbAdminPassword=Hz571xy00yz\n#Oracle\u81ea\u5e26\u7684\u9ed8\u8ba4\u5efa\u5e93\u6a21\u677f General_Purpose.dbc\uff0c\u6587\u4ef6\u4f4d\u4e8e $Oracle_HOME\/assistants\/dbca\/templates\/General_Purpose.dbc\uff0c\u8fd9\u91cc\u8bbe\u7f6e\u7b49\u540c\u4e8e dbca \u52a0\u53c2\u6570 -templateName General_Purpose.dbc\ntemplateName=General_Purpose.dbc\n# CDB\u4e2dsys\u7528\u6237\u7684\u5bc6\u7801, Silent mode.\u5bc6\u7801\u9700\u8981\u6ce8\u610f\u7684\u662f\u4e0d\u80fd\u5e26\u6709\u7279\u6b8a\u7b26\u53f7\nsysPassword=Hz571xy00yz\n# CDB\u4e2dsystem\u7528\u6237\u7684\u5bc6\u7801\nsystemPassword=Hz571xy00yz\n# \u662f\u5426\u914d\u7f6eem\nemConfiguration=NONE\n# CDB\u4e2ddbsnmp\u7528\u6237\u7684\u5bc6\u7801\ndbsnmpPassword=Hz571xy00yz\n# datafileDestination \u4e3a\u6240\u6709\u6570\u636e\u6587\u4ef6\u7684\u76ee\u6807\u4f4d\u7f6e\uff0c\u5982\u679c\u4e0d\u8bbe\u7f6e\u9ed8\u8ba4\u4e3a $ORACLE_BASE\/oradata\ndatafileDestination=\/data\/19cData\/oraData\n#recoveryAreaDestination \u4e3a\u6062\u590d\u533a\u4f4d\u7f6e\uff0c\u5982\u679c\u4e0d\u8bbe\u7f6e\u9ed8\u8ba4\u4e3a $ORACLE_BASE\/flash_recovery_area\nrecoveryAreaDestination=\/data\/19cData\/flash_recovery_area\n# \u5b58\u50a8\u7684\u7c7b\u578b\u4e3a\u6587\u4ef6\u7cfb\u7edf\nstorageType=FS\n# CDB\u6570\u636e\u5e93\u5b57\u7b26\u96c6\ncharacterSet=AL32UTF8\n# CDB\u56fd\u5bb6\u5b57\u7b26\u96c6\uff0c\u9ed8\u8ba4\u4e3a\uff1aAL16UTF16\nnationalCharacterSet=AL16UTF16\n# \u6570\u636e\u5e93\u7c7b\u578b\ndatabaseType=OLTP\n# Oracle\u5185\u5b58\u7ba1\u7406\u6a21\u5f0f\uff1a\u662f\u5426\u4e3aAMM\nautomaticMemoryManagement=FALSE\n# totalMemory \uff0c\u7269\u7406\u5185\u5b58*80%\uff0c\u6ce8\u610f\uff1a\u5982\u679c\u8bbe\u7f6e\u8d85\u8fc7 kernel.shmmax \u5efa\u5e93\u65f6\u4f1a\u62a5\u9519\ntotalMemory=8192<\/code><\/pre>\n<h4><span class=\"ez-toc-section\" id=\"42_%E4%BD%BF%E7%94%A8dbcarsp%E9%9D%99%E9%BB%98%E5%BB%BA%E5%BA%93\"><\/span>4.2. \u4f7f\u7528dbca.rsp\u9759\u9ed8\u5efa\u5e93<span class=\"ez-toc-section-end\"><\/span><\/h4>\n<p><strong>\u6ce8\u610f\uff1a#responseFile\u5fc5\u987b\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84<\/strong><\/p>\n<pre><code class=\"language-shell\"># \u4ee5 oracle \u7528\u6237\u6267\u884c\u5982\u4e0b\u547d\u4ee4\ndbca -silent -createDatabase -responseFile \/home\/oracle\/response\/dbca.rsp<\/code><\/pre>\n<p><a href=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2022\/04\/wp_editor_md_1de06bb127232590fb11012e9aa2e4c4.jpg\" data-fancybox=\"images\" data-fancybox=\"images\"><img decoding=\"async\" src=\"http:\/\/dba.qishuo.xin\/wp-content\/uploads\/2022\/04\/wp_editor_md_1de06bb127232590fb11012e9aa2e4c4.jpg\" alt=\"\" \/><\/a><\/p>\n<p>DBCA\u9759\u9ed8\u5efa\u5e93\u7684\u65e5\u5fd7\u5728\u54ea\u91cc\uff1f<\/p>\n<pre><code class=\"language-shell\">11g\u5f00\u59cb\uff1a$ORACLE_BASE\/cfgtoollogs\/dbca\n10g\uff1a$ORACLE_HOME\/cfgtoollogs\/dbca<\/code><\/pre>\n<p>\u4ece\u8be5\u65e5\u5fd7\u4e2d\u53ef\u4ee5\u627e\u5230DBCA\u9759\u9ed8\u5efa\u5e93\u7684\u8be6\u7ec6\u8fc7\u7a0b\uff0c\u503c\u5f97\u6211\u4eec\u6df1\u5165\u5206\u6790\u3002<\/p>\n<h3><span class=\"ez-toc-section\" id=\"5_%E9%99%84%E5%BD%95\"><\/span>5. \u9644\u5f55<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>\u7f16\u5199\u65e5\u671f\uff1a2020-12-26<\/strong><br \/>\n\u53c2\u8003\uff1a<br \/>\n<a target=\"_blank\" href=\"https:\/\/www.dqzboy.com\/%E9%9D%99%E9%BB%98%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2oracle-19c%E7%89%88%E6%9C%AC\">https:\/\/www.dqzboy.com\/%E9%9D%99%E9%BB%98%E5%AE%89%E8%A3%85%E9%83%A8%E7%BD%B2oracle-19c%E7%89%88%E6%9C%AC<\/a><br \/>\nOEL7.6\u5b89\u88c5Oracle Database 19C\uff08VERSION 19.3.0.0\uff09\uff1a<a target=\"_blank\" href=\"https:\/\/www.bbsmax.com\/A\/xl56QVLYJr\/\">https:\/\/www.bbsmax.com\/A\/xl56QVLYJr\/<\/a><br \/>\nOracle Database 19c Installation On CentOS7.7 In Silent Mode:<a target=\"_blank\" href=\"https:\/\/my.oschina.net\/u\/4407987\/blog\/3319216\">https:\/\/my.oschina.net\/u\/4407987\/blog\/3319216<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u670d\u52a1\u5668\u73af\u5883 1.1. \u670d\u52a1\u5668\u786c\u4ef6\u914d\u7f6e 1.2.&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,24],"tags":[192,16,193],"class_list":["post-1404","post","type-post","status-publish","format-standard","hentry","category-oracle","category-24","tag-19c","tag-oracle","tag-193"],"_links":{"self":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/1404","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1404"}],"version-history":[{"count":22,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/1404\/revisions"}],"predecessor-version":[{"id":3418,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=\/wp\/v2\/posts\/1404\/revisions\/3418"}],"wp:attachment":[{"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1404"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1404"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/dba.qishuo.xin\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1404"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}