{"id":6114,"date":"2024-11-14T08:28:03","date_gmt":"2024-11-14T00:28:03","guid":{"rendered":"https:\/\/fwq.ai\/blog\/6114\/"},"modified":"2024-11-14T08:28:03","modified_gmt":"2024-11-14T00:28:03","slug":"oracle%e5%a6%82%e4%bd%95%e8%bf%9e%e6%8e%a5%e4%ba%91%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/6114\/","title":{"rendered":"oracle\u5982\u4f55\u8fde\u63a5\u4e91\u670d\u52a1\u5668"},"content":{"rendered":"<blockquote><p>\n  \u901a\u8fc7 oracle \u5ba2\u6237\u7aef\u8fde\u63a5\u5230\u4e91\u670d\u52a1\u5668\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a\u521b\u5efa ssh \u5bc6\u94a5\u5e76\u590d\u5236\u516c\u94a5\u5230\u4e91\u670d\u52a1\u5668\u3002\u914d\u7f6e oracle \u5ba2\u6237\u7aef\uff0c\u6dfb\u52a0\u4e91\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4fe1\u606f\u5230 tnsnames.ora \u6587\u4ef6\u3002\u5728 oracle \u5ba2\u6237\u7aef\u4e2d\u521b\u5efa\u65b0\u7684\u6570\u636e\u5e93\u8fde\u63a5\uff0c\u8f93\u5165\u7528\u6237\u540d\u3001\u5bc6\u7801\u548c dsn\u3002\u70b9\u51fb\u201c\u786e\u5b9a\u201d\u5e76\u9a8c\u8bc1\u8fde\u63a5\u6210\u529f\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202406\/13\/2024061300092077176.jpg\" class=\"aligncenter\" title=\"oracle\u5982\u4f55\u8fde\u63a5\u4e91\u670d\u52a1\u5668\u63d2\u56fe\" alt=\"oracle\u5982\u4f55\u8fde\u63a5\u4e91\u670d\u52a1\u5668\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u901a\u8fc7 Oracle \u8fde\u63a5\u5230\u4e91\u670d\u52a1\u5668<\/strong><\/p>\n<p>\u4f7f\u7528 Oracle \u5ba2\u6237\u7aef\u8fde\u63a5\u5230\u4e91\u670d\u52a1\u5668\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a<\/p>\n<p><strong>1. \u521b\u5efa SSH \u5bc6\u94a5<\/strong><\/p>\n<ul>\n<li>\u5728\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u751f\u6210 SSH \u5bc6\u94a5\uff1assh-keygen -t rsa -b 2048<\/li>\n<li>\u5c06\u516c\u94a5\u590d\u5236\u5230\u4e91\u670d\u52a1\u5668\uff08\u66ff\u4ee3 {user} \u548c {host}\uff09\uff1assh-copy-id {user}@{host}<\/li>\n<\/ul>\n<p><strong>2. \u914d\u7f6e Oracle \u5ba2\u6237\u7aef<\/strong><\/p>\n<ul>\n<li>\u5728\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5 Oracle \u5ba2\u6237\u7aef<\/li>\n<li>\n<p>\u7f16\u8f91 tnsnames.ora \u6587\u4ef6\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u6761\u76ee\uff1a<\/p>\n<pre>HOST = {host}\nPORT = 1521\nSID = {database_name}<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/li>\n<li>\n<p>\u5176\u4e2d\uff1a<\/p>\n<ul>\n<li>{host} \u662f\u4e91\u670d\u52a1\u5668\u7684\u4e3b\u673a\u540d\u6216 IP \u5730\u5740<\/li>\n<li>{database_name} \u662f Oracle \u6570\u636e\u5e93\u5b9e\u4f8b\u7684\u540d\u79f0<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><strong>3. \u8bbe\u7f6e\u8fde\u63a5\u4fe1\u606f<\/strong><\/p>\n<ul>\n<li>\u5728 Oracle \u5ba2\u6237\u7aef\u4e2d\uff0c\u521b\u5efa\u65b0\u7684\u6570\u636e\u5e93\u8fde\u63a5<\/li>\n<li>\n<p>\u8f93\u5165\u4ee5\u4e0b\u4fe1\u606f\uff1a<\/p>\n<ul>\n<li>\u7528\u6237\u540d\uff1a \u6570\u636e\u5e93\u7528\u6237<\/li>\n<li>\u5bc6\u7801\uff1a \u6570\u636e\u5e93\u5bc6\u7801<\/li>\n<li>DSN\uff1aHOST={host};PORT=1521;SID={database_name}<\/li>\n<\/ul>\n<\/li>\n<li>\u70b9\u51fb\u201c\u786e\u5b9a\u201d\u8fde\u63a5<\/li>\n<\/ul>\n<p><strong>4. \u9a8c\u8bc1\u8fde\u63a5<\/strong><\/p>\n<ul>\n<li>\u8fde\u63a5\u6210\u529f\u540e\uff0c\u5e94\u80fd\u591f\u5728 Oracle \u5ba2\u6237\u7aef\u4e2d\u770b\u5230\u4e91\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\u5e93\u5bf9\u8c61\u3002<\/li>\n<\/ul>\n<p><strong>\u63d0\u793a\uff1a<\/strong><\/p>\n<ul>\n<li>\u786e\u4fdd\u4e91\u670d\u52a1\u5668\u4e0a\u7684 Oracle \u6570\u636e\u5e93\u5df2\u542f\u52a8\u5e76\u6b63\u5728\u4fa6\u542c\u8fde\u63a5\u3002<\/li>\n<li>\u68c0\u67e5\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u7684\u9632\u706b\u5899\u8bbe\u7f6e\uff0c\u786e\u4fdd\u5141\u8bb8 Oracle \u5ba2\u6237\u7aef\u8fde\u63a5\u5230\u4e91\u670d\u52a1\u5668\u3002<\/li>\n<li>\u4f7f\u7528\u6b63\u786e\u7684\u7528\u6237\u540d\u548c\u5bc6\u7801\u8fde\u63a5\u5230\u6570\u636e\u5e93\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u8fde\u63a5\u4e91\u670d\u52a1\u5668\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u901a\u8fc7 oracle \u5ba2\u6237\u7aef\u8fde\u63a5\u5230\u4e91\u670d\u52a1\u5668\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a\u521b\u5efa ssh \u5bc6\u94a5\u5e76\u590d\u5236\u516c\u94a5\u5230\u4e91\u670d\u52a1\u5668\u3002\u914d\u7f6e oracle \u5ba2\u6237\u7aef\uff0c\u6dfb\u52a0\u4e91\u670d\u52a1\u5668\u7684\u8fde\u63a5\u4fe1\u606f\u5230 tnsnames.ora \u6587\u4ef6\u3002\u5728 oracle \u5ba2\u6237\u7aef\u4e2d\u521b\u5efa\u65b0\u7684\u6570\u636e\u5e93\u8fde\u63a5\uff0c\u8f93\u5165\u7528\u6237\u540d\u3001\u5bc6\u7801\u548c dsn\u3002\u70b9\u51fb\u201c\u786e\u5b9a\u201d\u5e76\u9a8c\u8bc1\u8fde\u63a5\u6210\u529f\u3002 \u5982\u4f55\u901a\u8fc7 Oracle \u8fde\u63a5\u5230\u4e91\u670d\u52a1\u5668 \u4f7f\u7528 Oracle \u5ba2\u6237\u7aef\u8fde\u63a5\u5230\u4e91\u670d\u52a1\u5668\u9700\u8981\u4ee5\u4e0b\u6b65\u9aa4\uff1a 1. \u521b\u5efa SSH \u5bc6\u94a5 \u5728\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u751f\u6210 SSH \u5bc6\u94a5\uff1assh-keygen -t rsa -b 2048 \u5c06\u516c\u94a5\u590d\u5236\u5230\u4e91\u670d\u52a1\u5668\uff08\u66ff\u4ee3 {user} \u548c {host}\uff09\uff1assh-copy-id {user}@{host} 2. \u914d\u7f6e Oracle \u5ba2\u6237\u7aef \u5728\u672c\u5730\u8ba1\u7b97\u673a\u4e0a\u5b89\u88c5 Oracle \u5ba2\u6237\u7aef \u7f16\u8f91 tnsnames.ora \u6587\u4ef6\uff0c\u6dfb\u52a0\u4ee5\u4e0b\u6761\u76ee\uff1a HOST = {host} PORT = 1521 SID = {database_name} \u767b\u5f55\u540e\u590d\u5236 \u5176\u4e2d\uff1a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-6114","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=6114"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/6114\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=6114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=6114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=6114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}