{"id":418,"date":"2014-06-05T19:12:22","date_gmt":"2014-06-05T11:12:22","guid":{"rendered":"http:\/\/carlos.aboutme.com.hk\/blog\/?p=418"},"modified":"2015-12-01T18:15:23","modified_gmt":"2015-12-01T10:15:23","slug":"%e5%9c%a8-linux-%e4%b8%8a%e5%ae%89%e8%a3%9d-oracle-database-%e7%9a%84%e5%b0%8f%e7%b6%93%e9%a9%97","status":"publish","type":"post","link":"https:\/\/carlos.aboutmy.info\/blog\/?p=418","title":{"rendered":"\u5728 Linux \u4e0a\u5b89\u88dd Oracle Database \u7684\u5c0f\u7d93\u9a57"},"content":{"rendered":"<p>Oracle Database \u7528\u5c31\u7528\u5f97\u591a\u3002Enterprise Edition \u5c31\u672a\u5b89\u904e\uff0c\u53ea\u662f\u5b89\u904e Express\u3002\u8981\u5b89\u88dd Oracle\uff0c\u6709\u4e00\u5927\u5806\u624b\u7e8c\u3002\u4f8b\u5982\uff1a\u52a0 user\u3001\u6539 .bash_profile\u3001\u6539 Kernel \u53c3\u6578\u7b49\u7b49\uff0c\u4f46\u4e00\u5982\u5176\u4ed6 Linux \u8edf\u4ef6\uff0c\u6700\u7169\u7684\u662f dependencies\u3002<\/p>\n<p>\u5982\u679c\u7528\u985e CentOS Linux\uff0c\u6700\u7c21\u55ae\u7684\u662f\u5f9e Oracle \u4e2d\u5b89\u88dd\u4e00\u500b\u53eb oracle-rdbms-server-11gR2-preinstall \u7684\u5957\u4ef6\u3002\u5957\u4ef6\u53ea\u662f\u5e7e\u5341KB\uff0c\u53ea\u662f\u4f62\u6703\u4ee4\u4f60\u5b89\u88dd\u4e00\u4e9b\u9700\u8981\u7684\u5957\u4ef6\u3002<\/p>\n<p># Download Repos<br \/>\n<code>wget --no-check-certificate https:\/\/public-yum.oracle.com\/public-yum-ol6.repo -O \/etc\/yum.repos.d\/public-yum-ol6.repo<\/code><\/p>\n<p># Download GPG Key<br \/>\n<code>wget https:\/\/public-yum.oracle.com\/RPM-GPG-KEY-oracle-ol6 -O \/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-oracle<\/code><\/p>\n<p># \u5b89\u88dd oracle-rdbms-server-11gR2-preinstall<br \/>\n<code>yum install oracle-rdbms-server-11gR2-preinstall<\/code><\/p>\n<p>\u4f46\u9019\u500b\u6642\u5019\u6211\u4e0d\u6703\u771f\u7684\u5b89\u88dd\u5b83\uff0c\u800c\u662f cancel \u5f8c\u81ea\u884c\u88dc\u5b89\u9700\u8981\u7684\u5957\u4ef6\u3002\u518d\u628a \/etc\/yum.repos.d\/public-yum-ol6.repo \u522a\u9664\u53c8\u6216\u6539\u70ba .bak\u3002\u5426\u5247\uff0c\u52a0\u5165 Oracle Respo \u5f8c\uff0c\u4f60\u7684 CentOS \u6703\u88ab\u5b89\u88dd\u5176\u4ed6 Oracle \u5957\u4ef6\u800c\u6539\u70ba Oracle Linux \u4e86<\/p>\n<p>\u6b63\u5f0f\u5b89\u88dd\u524d\uff0c\u8981\u66f4\u6539 user \u7684 .bash_profile\uff0c\u901a\u5e38\u6703\u5efa\u7acb\u4e00\u500b\u53eb Oracle \u7684\u7528\u6236\u4f86\u5b89\u88dd Oracle Database\uff0c\u6240\u4ee5\u5c31\u662f\u66f4\u6539 \/home\/oracle\/.bash_profile\uff0c\u66f4\u6539\u5f8c\uff0c\u9700\u8981\u767b\u51fa\u518d\u767b\u5165\u3002<\/p>\n<p><code><br \/>\n# Oracle Settings<br \/>\nTMP=\/tmp; export TMP<br \/>\nTMPDIR=$TMP; export TMPDIR<\/p>\n<p>ORACLE_HOSTNAME=localhost; export ORACLE_HOSTNAME<br \/>\nORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME<br \/>\nORACLE_BASE=\/home\/oracle\/app\/oracle; export ORACLE_BASE # \u6709\u4eba\u6703\u5b89\u5230 \/u01\/app\/oracle\uff0c\u65b9\u4fbf mount \u53bb\u5176\u4ed6\u5730\u65b9<br \/>\nORACLE_HOME=$ORACLE_BASE\/product\/11.2.0\/dbhome_1; export ORACLE_HOME<br \/>\nORACLE_SID=DB11G; export ORACLE_SID<br \/>\nPATH=\/usr\/sbin:$PATH; export PATH<br \/>\nPATH=$ORACLE_HOME\/bin:$PATH; export PATH<\/p>\n<p>LD_LIBRARY_PATH=$ORACLE_HOME\/lib:\/lib:\/usr\/lib; export LD_LIBRARY_PATH<br \/>\nCLASSPATH=$ORACLE_HOME\/jlib:$ORACLE_HOME\/rdbms\/jlib; export CLASSPATH export PATH<br \/>\n<\/code><\/p>\n<p>\u5b89\u88dd Oracle Database \u5f8c\uff0c\u767c\u73fe\u6709\u500b\u53eb Example \u7684 tablespace\uff0c\u5b83\u4e0d\u80fd\u76f4\u63a5\u88ab\u522a\u9664\uff0c\u8981\u522a\u9664\u5b83\uff0c\u8981\u7528 sysdba \u57f7\u884c\u4e0b\u5217 SQLs<br \/>\n<code><br \/>\nDROP USER oe CASCADE;<br \/>\nDROP USER IX CASCADE;<br \/>\nDROP USER HR CASCADE;<br \/>\nDROP USER PM CASCADE;<br \/>\nDROP USER SH CASCADE;<br \/>\nDROP TABLESPACE EXAMPLE INCLUDING CONTENTS AND DATAFILES;<br \/>\n<\/code><\/p>\n<p>References:<br \/>\n<a href=\"http:\/\/www.tecmint.com\/oracle-database-11g-release-2-installation-in-linux\/\" title=\"http:\/\/www.tecmint.com\/oracle-database-11g-release-2-installation-in-linux\/\" target=\"_blank\"><a href=\"http:\/\/www.tecmint.com\/oracle-database-11g-release-2-installation-in-linux\/\" title=\"http:\/\/www.tecmint.com\/oracle-database-11g-release-2-installation-in-linux\/\">http:\/\/www.tecmint.com\/oracle-database-11g-release-2-installation-in-linux\/<\/a><\/a><\/p>\n<p><a href=\"https:\/\/community.oracle.com\/thread\/1108714?tstart=0\" title=\"https:\/\/community.oracle.com\/thread\/1108714?tstart=0\" target=\"_blank\">https:\/\/community.oracle.com\/thread\/1108714?tstart=0<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oracle Database \u7528\u5c31\u7528\u5f97\u591a\u3002Enterprise Edition \u5c31\u672a\u5b89\u904e\uff0c\u53ea\u662f\u5b89\u904e Express\u3002\u8981\u5b89\u88dd Oracle\uff0c\u6709\u4e00\u5927\u5806\u624b\u7e8c\u3002\u4f8b\u5982\uff1a\u52a0 user\u3001\u6539 .bash_profile\u3001\u6539 Kernel \u53c3\u6578\u7b49\u7b49\uff0c\u4f46\u4e00\u5982\u5176\u4ed6 Linux \u8edf\u4ef6\uff0c\u6700\u7169\u7684\u662f dependencies\u3002 \u5982\u679c\u7528\u985e CentOS Linux\uff0c\u6700\u7c21\u55ae\u7684\u662f\u5f9e Oracle \u4e2d\u5b89\u88dd\u4e00\u500b\u53eb oracle-rdbms-server-11gR2-preinstall \u7684\u5957\u4ef6\u3002\u5957\u4ef6\u53ea\u662f\u5e7e\u5341KB\uff0c\u53ea\u662f\u4f62\u6703\u4ee4\u4f60\u5b89\u88dd\u4e00\u4e9b\u9700\u8981\u7684\u5957\u4ef6\u3002 # Download Repos wget &#8211;no-check-certificate https:\/\/public-yum.oracle.com\/public-yum-ol6.repo -O \/etc\/yum.repos.d\/public-yum-ol6.repo # Download GPG Key wget https:\/\/public-yum.oracle.com\/RPM-GPG-KEY-oracle-ol6 -O \/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-oracle # \u5b89\u88dd oracle-rdbms-server-11gR2-preinstall yum install oracle-rdbms-server-11gR2-preinstall \u4f46\u9019\u500b\u6642\u5019\u6211\u4e0d\u6703\u771f\u7684\u5b89\u88dd\u5b83\uff0c\u800c\u662f cancel \u5f8c\u81ea\u884c\u88dc\u5b89\u9700\u8981\u7684\u5957\u4ef6\u3002\u518d\u628a \/etc\/yum.repos.d\/public-yum-ol6.repo \u522a\u9664\u53c8\u6216\u6539\u70ba .bak\u3002\u5426\u5247\uff0c\u52a0\u5165 Oracle Respo \u5f8c\uff0c\u4f60\u7684 CentOS \u6703\u88ab\u5b89\u88dd\u5176\u4ed6 Oracle\u2026 <span class=\"read-more\"><a href=\"https:\/\/carlos.aboutmy.info\/blog\/?p=418\">Read More &raquo;<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18,17],"tags":[],"_links":{"self":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/418"}],"collection":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=418"}],"version-history":[{"count":6,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/418\/revisions"}],"predecessor-version":[{"id":425,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/418\/revisions\/425"}],"wp:attachment":[{"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=418"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=418"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/carlos.aboutmy.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}