{"id":623,"date":"2016-09-04T09:28:03","date_gmt":"2016-09-04T01:28:03","guid":{"rendered":"http:\/\/www.821121.com\/?p=623"},"modified":"2020-12-11T10:02:28","modified_gmt":"2020-12-11T02:02:28","slug":"oracle11g%e5%8d%95%e5%ae%9e%e4%be%8b%e5%9c%a8linux6%e4%b8%8a%e5%ae%89%e8%a3%85%e9%83%a8%e7%bd%b2%e6%96%87%e6%a1%a3","status":"publish","type":"post","link":"http:\/\/www.821121.com\/?p=623","title":{"rendered":"Oracle11g\u5355\u5b9e\u4f8b\u5728linux6\u4e0a\u5b89\u88c5\u90e8\u7f72\u6587\u6863"},"content":{"rendered":"<pre><code class=\"language-sql\">\u57fa\u672c\u4fe1\u606f\uff1a\nhost:whs\nip\uff1a192.168.0.28     \u7cfb\u7edf\uff1alinux6.8   \u6570\u636e\u5e93\uff1aoracle11g\u5355\u5b9e\u4f8b    sys\u5bc6\u7801\uff1aoracle123  \ndb_name=orcl<\/code><\/pre>\n<pre><code class=\"language-sql\">\u9884\u51c6\u5907:\u6302\u8f7d\u5149\u76d8\n\u63d2\u5165\u5149\u76d8\uff0c\u53f3\u4e0b\u65b9\u5f00\u5361\u955c\u50cf\u6587\u4ef6\u3002\n\u7528root\u6743\u9650\u8fdb\u5165\n1. \u521b\u5efa\u6302\u8f7d\u70b9\nmkdir \/mnt\/cdrom\n\u5728 \/mnt \u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u7a7a\u6587\u4ef6\u5939cdrom\u4f5c\u4e3a\u5149\u76d8\u7684\u6302\u8f7d\u70b9\uff08\u4efb\u4f55\u4e00\u4e2a\u7a7a\u76ee\u5f55\u90fd\u53ef\u4ee5\u4f5c\u4e3a\u6302\u8f7d\u70b9\uff09\u3002\n\n2. \u6253\u5f00\u5149\u9a71\uff0c\u653e\u5165\u5149\u76d8\n\u5982\u679c\u7528\u7684\u662fVMware\u4e2d\u7684\u865a\u62df\u673a\uff0c\u8fdb\u5165\u865a\u62df\u673a\u8bbe\u7f6e\uff0c\u9009\u62e9\u201cCD\/DVD\u201d\u786c\u4ef6\uff0c\u52fe\u9009\u201c\u5df2\u8fde\u63a5\u201d\u548c\u201c\u542f\u52a8\u65f6\u8fde\u63a5\u201d\uff0c\u5728\u8fde\u63a5\u5904\uff0c\u9009\u62e9\u201c\u4f7f\u7528ISO\u6620\u50cf\u6587\u4ef6\u201d\uff0c\u6d4f\u89c8\u9009\u62e9\u672c\u5730\u7535\u8111\u4e2d\u4e0b\u8f7d\u597d\u7684ISO\u5149\u76d8\u955c\u50cf\u6587\u4ef6\uff0c\u786e\u5b9a\u5373\u53ef\u3002\n\n3. \u6267\u884c\u6302\u8f7d\u547d\u4ee4\nmount -t iso9660 \/dev\/sr0 \/mnt\/cdrom\n\u6216\u8005\nmount \/dev\/sr0 \/mnt\/cdrom\niso9660 \u662f\u5149\u76d8\u7684\u9ed8\u8ba4\u6587\u4ef6\u7cfb\u7edf\u3002 \n\u7531\u4e8elinux\u7cfb\u7edf\u53ef\u4ee5\u81ea\u52a8\u8bc6\u522b\u5149\u76d8\u7684\u6587\u4ef6\u7cfb\u7edf\uff0c\u6545\u201c-t iso9660\u201d\u4e5f\u53ef\u4ee5\u7701\u7565\u4e0d\u5199\u3002\n\u5149\u76d8\u7684\u8bbe\u5907\u6587\u4ef6\u540d\u662f\u56fa\u5b9a\u7684\uff0c\u4e00\u822c\u4e3a\/dev\/cdrom\u6216\/dev\/sr0\u3002\n\u6302\u8f7d\u6210\u529f\u540e\uff0c\u5c31\u53ef\u4ee5\u901a\u8fc7\u6302\u8f7d\u70b9\u8bfb\u53d6\u5149\u76d8\u91cc\u9762\u7684\u6570\u636e\u3002\n\n4. \u67e5\u770b\u5149\u76d8\u4e2d\u7684\u6570\u636e\ncd \/mnt\/cdrom\nls -l\n\u6ce8\u610f\uff1a\u64cd\u4f5c\u5b8c\u6210\u4e4b\u540e\uff0c\u5982\u679c\u8981\u53d6\u51fa\u5149\u76d8\uff0c\u5fc5\u987b\u89e3\u9664\u6302\u8f7d\u3002\n\n5. \u89e3\u9664\u6302\u8f7d\n\u4e0d\u80fd\u5728\u6302\u8f7d\u70b9\u76ee\u5f55\u4e0b\u89e3\u9664\u6302\u8f7d\uff0c\u5fc5\u987b\u5148\u5207\u6362\u5230\u5176\u4ed6\u76ee\u5f55\uff08\u5982\u7528\u6237\u5bb6\u76ee\u5f55\uff09\u3002\ncd \n\u5207\u6362\u5230\u7528\u6237\u5bb6\u76ee\u5f55\numount \/dev\/sr0\n\u6216\u8005 \numount \/mnt\/cdrom<\/code><\/pre>\n<h1>1\u3001\u5b89\u88c5yum\u8f6f\u4ef6\u5305<\/h1>\n<pre><code class=\"language-sql\">mkdir \/mnt\/cdrom\nmount \/dev\/sr0 \/mnt\/cdrom\n\ncd \/etc\/yum.repos.d\/\nrm -rf *\n\nvi \/etc\/yum.repos.d\/ol.repo\n[local-source]\nname=ol\nbaseurl=file:\/\/\/mnt\/cdrom\/\nebabled=1\ngpgcheck=0\ngpgkey=file:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-oracle\n\n\u5b89\u88c5rpm\u4f9d\u8d56\u5305\uff0811g\uff09\nyum install binutils* compat-libstdc*  gcc* gcc-c++* glibc* ksh* libgcc* libstdc++*  libaio* make* sysstat* elfutils-libelf-devel* elfutils-libelf* xterm<\/code><\/pre>\n<h1>2\u3001\u521b\u5efa\u7528\u6237\u3001\u7ec4\u3001\u76ee\u5f55<\/h1>\n<pre><code class=\"language-sql\">groupadd -g 1000 oinstall\ngroupadd -g 1001 dba\nuseradd -u 1101 -g oinstall -G dba oracle\n\nmkdir -p \/u01\/app\/oracle\nchown -R oracle:oinstall \/u01\/app\/oracle \nchmod -R 775 \/u01\/app\/oracle\n\nmkdir -p \/u01\/app\/oraInventory\nchown -R oracle:oinstall \/u01\/app\/oraInventory\nchmod -R 775 \/u01\/app\/oraInventory\n\npasswd oracle<\/code><\/pre>\n<h1>3\u3001\u914d\u7f6e\u7cfb\u7edf\u53c2\u6570<\/h1>\n<h2>3.1\u4fee\u6539\u4e3b\u673a\u540d<\/h2>\n<pre><code class=\"language-sql\">vi \/etc\/hosts\n192.168.0.28 oracle\uff08\u6b64\u5904\u4e3a\u4e3e\u4f8b\uff0c\u5b9e\u9645\u9700\u914d\u7f6e\u5f53\u524d\u865a\u62df\u673a\u7684IP\u4e0eHOSTNAME\uff09\n\nvi \/etc\/sysconfig\/network\noracle<\/code><\/pre>\n<h2>3.2\u914d\u7f6e\u7cfb\u7edf\u6587\u4ef6<\/h2>\n<pre><code class=\"language-sql\">(--\/etc\/security\/limits.conf \u662f Linux \u8d44\u6e90\u4f7f\u7528\u914d\u7f6e\u6587\u4ef6\uff0c\u7528\u6765\u9650\u5236\u7528\u6237\u5bf9\u7cfb\u7edf\u8d44\u6e90\u7684\u4f7f\u7528 \n--https:\/\/www.cnblogs.com\/pzk7788\/p\/7250723.html\uff09\n\nvi \/etc\/security\/limits.conf\n\n\u6dfb\u52a0\noracle soft nproc 2047\noracle hard nproc 16384\noracle soft nofile 1024\noracle hard nofile 65536\n\nvi \/etc\/pam.d\/login\u6dfb\u52a0\uff1a\nsession required pam_limits.so\n\n\u8bbe\u7f6e\u5185\u6838\u53c2\u6570\uff0c\u7f16\u8f91\u6587\u4ef6\u5e76\u4f7f\u4e4b\u751f\u6548\uff0c\u5176\u503c\u4e0d\u5c0f\u4e8e\u5982\u4e0b\u8bbe\u7f6e\u3002\n\u4ee5\u4e0b\u662f\u53c2\u8003\u5185\u5bb9\nvi \/etc\/sysctl.conf\nfs.aio-max-nr = 1048576\nfs.file-max = 6815744\nkernel.shmall = 2097152\nkernel.shmmax = 1043648512\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 = 1048576\n\n\u914d\u7f6e\u751f\u6548 \nsysctl -p\n\nvi \/etc\/profile\u6dfb\u52a0\uff1a\nif [ $USER = &quot;oracle&quot; ]; then\n    if [ $SHELL = &quot;\/bin\/ksh&quot; ]; then\n       ulimit -u 16384\n       ulimit -n 65536\n    else\n       ulimit -u 16384 -n 65536\n    fi\nfi\n<\/code><\/pre>\n<h2>3.3\u7981\u7528SELinux\u3001iptable<\/h2>\n<pre><code class=\"language-sql\">\u5efa\u8bae\u7981\u7528\u6b64\u529f\u80fd\u3002\nvi \/etc\/selinux\/config\nSELINUX=disabled\n\u9700\u8981\u91cd\u542f\u3002\nservice iptables stop\nchkconfig iptables off<\/code><\/pre>\n<h2>3.4\u505c\u6b62ntp\u670d\u52a1\u548c\u5220\u9664\u914d\u7f6e\u6587\u4ef6\u53capid\u6587\u4ef6\uff08\u770b\u60c5\u51b5\u914d\u7f6e\uff09<\/h2>\n<p>service ntpd stop<br \/>\nchkconfig ntpd off<br \/>\nrm -rf \/etc\/ntpd.conf<br \/>\nrm -rf \/var\/run\/ntpd.pid<\/p>\n<h2>3.5 oracle\u7528\u6237\u73af\u5883\u53d8\u91cf\u914d\u7f6e<\/h2>\n<pre><code class=\"language-sql\">oracle\u7528\u6237 \nvi ~\/.bash_profile  \u7f16\u8f91\u540esource ~\/.bash_profile\nexport TMP=\/tmp \nexport TMPDIR=$TMP \nexport ORACLE_SID=orcl\nexport ORACLE_BASE=\/u01\/app\/oracle \nexport ORACLE_HOME=$ORACLE_BASE\/product\/11.2.0.4\/db_1\/\/\u8fd9\u8fb9\u8def\u5f84\u548c\u540d\u79f0\u8981\u6ce8\u610f\nexport TNS_ADMIN=$ORACLE_HOME\/network\/admin \nexport PATH=\/usr\/sbin:$PATH \nexport PATH=$ORACLE_HOME\/bin:$PATH \nexport LD_LIBRARY_PATH=$ORACLE_HOME\/lib:\/lib:\/usr\/lib \nexport CLASSPATH=$ORACLE_HOME\/JRE:$ORACLE_HOME\/jlib:$ORACLE_HOME\/rdbms\/jlib \numask 022<\/code><\/pre>\n<h1>4\u3001\u5b89\u88c511.2.0.4\u6570\u636e\u5e93\u8f6f\u4ef6<\/h1>\n<pre><code class=\"language-sql\">\u4e0a\u4f20\u8f6f\u4ef6\u5305\u5230\/soft\u7684\u76ee\u5f55\u4e0b\n\u8d4b\u4e88oracle\u7528\u6237  \u8c03\u7528\u548c\u89e3\u538b\u4e0b\u9762\u4e24\u4e2a\u5305\u7684\u6743\u9650\u3002   \nchmod -R oracle:install \u6240\u5728web\u6587\u4ef6\u5939 \u6216\u6587\u4ef6\u540d\u3002\n# su - oracle\n$ cd \/soft\n$ unzip p13390677_112040_Linux-x86-64_1of7.zip\n$ unzip p13390677_112040_Linux-x86-64_2of7.zip\n\nChown -R oracle:oinstall \/soft\/database\nChmod 777 \/soft\/database\n\n\u8f6f\u4ef6\u524d\u63d0\u9700\u8981\uff1aXmanager 5\u3001Xmanager 6\u6216VNC\uff0c\u80fd\u591f\u53ef\u89c6\u5316\u5b89\u88c5\n\n\u4ee5\u4e0b\u64cd\u4f5c\u5728Xmananger\u53ef\u89c6\u5316\u4e2d\u8fdb\u884c\ncd database\/\nsh runInstaller<\/code><\/pre>\n<p>\u5982\u56fe\u6240\u793a\uff1a<br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044639994.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044646696.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044653246.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044660048.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044672029.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044700798.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044710178.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044719889.png\" alt=\"file\" \/><br \/>\n\u4ee5\u4e0b\u56fe\u4e2d\u5ffd\u7565\u5982\u4e0b\u62a5\u9519<br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044727460.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044734749.png\" alt=\"file\" \/><br \/>\n\u4ee5\u4e0b\u811a\u672c\u7528root\u7528\u6237\u6267\u884c\u3002<br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044788665.png\" alt=\"file\" \/><br \/>\n\u70b9\u51fb\u786e\u8ba4\uff0c\u6570\u636e\u5e93\u8f6f\u4ef6\u5b89\u88c5\u5b8c\u6bd5<\/p>\n<h1>5\u3001\u521b\u5efa\u6570\u636e\u5e93\u5b9e\u4f8b<\/h1>\n<p>\u53ef\u89c6\u5316\u5b89\u88c5<br \/>\ndbca<br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044856839.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044862506.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044870149.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044879875.png\" alt=\"file\" \/><br \/>\n\u8fd9\u91ccSID\u548coracle\u7528\u6237\u7684\u73af\u5883\u53d8\u91cfORACLE_SID\u5bf9\u5e94<br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044896386.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044907150.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044927720.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044933091.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044951243.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044957499.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044964104.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044968733.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044975202.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607044990173.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607045006540.png\" alt=\"file\" \/><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/2020\/12\/image-1607045019473.png\" alt=\"file\" \/><\/p>\n<p>lsnrctl start<br \/>\n\u5f00\u542f\u76d1\u542c\u3002<\/p>\n<p>\u516d \u3001 \u68c0\u6d4boracle\u6570\u636e\u5e93\u662f\u5426\u5df2\u7ecf\u5b89\u88c5\u6210\u529f\u3002<br \/>\nsqlplus \/ as sysdba<br \/>\nselect * from dual;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u57fa\u672c\u4fe1\u606f\uff1a host:whs ip\uff1a192.168<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18,37,40],"tags":[],"class_list":["post-623","post","type-post","status-publish","format-standard","hentry","category-oracle-11g","category--oracle-11g"],"_links":{"self":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=623"}],"version-history":[{"count":1,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/623\/revisions"}],"predecessor-version":[{"id":652,"href":"http:\/\/www.821121.com\/index.php?rest_route=\/wp\/v2\/posts\/623\/revisions\/652"}],"wp:attachment":[{"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=623"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.821121.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}