{"id":974,"date":"2024-06-05T20:34:25","date_gmt":"2024-06-05T12:34:25","guid":{"rendered":"https:\/\/cn.raksmart.com\/blog\/host\/4159.html"},"modified":"2024-06-05T20:34:25","modified_gmt":"2024-06-05T12:34:25","slug":"rlwrap%e7%9a%84%e5%ae%89%e8%a3%85%e4%b8%8e%e6%b3%a8%e6%84%8f%e4%ba%8b%e9%a1%b9","status":"publish","type":"post","link":"https:\/\/cn.raksmart.com\/blog\/knowledge\/974.html","title":{"rendered":"Rlwrap\u7684\u5b89\u88c5\u4e0e\u6ce8\u610f\u4e8b\u9879"},"content":{"rendered":"<div class=\"entry-content e-content\" itemprop=\"description articleBody\">\n<p>\u6709\u4eba\u95ee\u6211\u600e\u4e48\u5728<strong>linux\u7cfb\u7edf<\/strong>\u4e0b\u7684sqlplus\u5b9e\u73b0\u50cf<strong>window\u7cfb\u7edf<\/strong>\u4e00\u6837\u5bf9\u6267\u884c\u8bed\u53e5\u8bb0\u5f55\u524d\u540e\u7ffb\u6eda\uff0c\u672c\u6587<a href=\"https:\/\/www.raksmart.com\/cps\/7821\" target=\"_blank\" rel=\"noopener\">Raksmart<\/a><a rel=\"noreferrer noopener\" aria-label=\"\u7f8e\u56fd\u670d\u52a1\u5668\uff08\u5728\u65b0\u7a97\u53e3\u6253\u5f00\uff09\" href=\"https:\/\/cn.raksmart.com\/\" target=\"_blank\">\u7f8e\u56fd\u670d\u52a1\u5668<\/a>\u544a\u8bc9\u4f60\uff1a<\/p>\n<p>rlwrap\u5c31\u80fd\u5b9e\u73b0\u8be5\u529f\u80fd<\/p>\n<p>\u6240\u4ee5\u5c31\u5bf9rlwrap\u8f6f\u4ef6\u8fdb\u884c\u5b89\u88c5\u7684\u8be6\u89e3<\/p>\n<p>\u9644\u4e0arlwrap\u5b89\u88c5\u5305\u7684\u5730\u5740\uff1a<\/p>\n<p>http:\/\/pan.baidu.com\/s\/1o8PMT3G<\/p>\n<p><strong>\u73b0\u5728\u5f00\u59cb\u5b89\u88c5<\/strong><\/p>\n<p> \u5148\u628a\u5b89\u88c5\u5305\u653e\u5230\/tmp\/soft\u76ee\u5f55\u4e0b<\/p>\n<p>[root@localhost<br \/>\nDesktop]# cd \/tmp\/soft\/<\/p>\n<p>[root@localhost<br \/>\nsoft]# ls<\/p>\n<p>rlwrap-0.37.tar.gz<br \/><strong> <\/strong><strong>\u89e3\u5305<\/strong><\/p>\n<p>[root@localhost<br \/>\nsoft]# tar -xvf rlwrap-0.37.tar.gz<\/p>\n<p>[root@localhost<br \/>\nsoft]# ls<\/p>\n<p>rlwrap-0.37\u00a0<br \/>\nrlwrap-0.37.tar.gz<\/p>\n<p>\u6267\u884c.\/configure\u4e4b\u524d\u8981\u5148\u5b89\u88c5<\/p>\n<p>libtermcap-devel\u548creadline-devel\u8fd9\u4e24\u4e2a\u5305\uff0c\u4e0d\u7136\u4f1a\u62a5\u4ee5\u4e0b\u9519\u8bef<\/p>\n<p><strong>You need the GNU readline library(ftp:\/\/ftp.gnu.org\/gnu\/readline\/ ) to build this program!<br \/> <\/strong><br \/> <strong>\u914d\u7f6e<\/strong><\/p>\n<p>[root@localhost<br \/>\nrlwrap-0.37]# .\/configure<\/p>\n<p>checking build<br \/>\nsystem type\u2026 x86_64-unknown-linux-gnu<\/p>\n<p>checking host<br \/>\nsystem type\u2026 x86_64-unknown-linux-gnu<\/p>\n<p>\u2026\u2026\u2026\u2026.<\/p>\n<p>Now do:<\/p>\n<p>\u00a0 \u00a0<br \/>\nmake (or gmake)\u00a0 to build rlwrap<\/p>\n<p>\u00a0 \u00a0<br \/>\nmake check\u00a0 \u00a0 \u00a0 \u00a0for instructions how to test it<\/p>\n<p>\u00a0 \u00a0<br \/>\nmake install\u00a0 \u00a0 \u00a0to install it<br \/>\n\u5f00\u59cb\u7f16\u8bd1\u5b89\u88c5<\/p>\n<p>[root@localhost<br \/>\nrlwrap-0.37]# make<\/p>\n<p>make\u00a0<br \/>\nall-recursive<\/p>\n<p>make[1]:<br \/>\nEntering directory `\/tmp\/soft\/rlwrap-0.37\u2032<\/p>\n<p>\u2026\u2026\u2026<\/p>\n<p>make[2]: Leaving<br \/>\ndirectory `\/tmp\/soft\/rlwrap-0.37\u2032<\/p>\n<p>make[1]: Leaving<br \/>\ndirectory `\/tmp\/soft\/rlwrap-0.37\u2032<\/p>\n<p>[root@localhost rlwrap-0.37]# make install<br \/> \u8fd9\u6837\u5c31\u5b89\u88c5\u5b8c\u4e86<br \/> \u5207\u6362\u5230oracle\u7528\u6237\uff0c\u8fdb\u5165\u6570\u636e\u5e93\uff0c\u968f\u4fbf\u6267\u884c\u51e0\u6761\u547d\u4ee4  \u5173\u4e8e\u66f4\u591a\u5185\u5bb9\u8bf7\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/knowledge\/666.html\">\u4ec0\u4e48\u662fMYSQL\u6570\u636e\u5e93<\/a><\/p>\n<p>[root@localhost<br \/>\nrlwrap-0.37]# su \u2013 oracle<\/p>\n<p>[oracle@localhost<br \/>\n~]$ rlwrap sqlplus \/ as sysdba<\/p>\n<p>SQL&gt; select *<br \/>\nfrom scott.emp;<\/p>\n<p>SQL&gt; select *<br \/>\nfrom scott.dept;<\/p>\n<p>\u518d\u6309\u5411\u4e0a\u7684\u7bad\u5934\uff0d\u53d1\u73b0\u53ef\u4ee5\u60f3\u5728<strong>window<\/strong>\u4e0b\u4e00\u6837\u7ffb\u6eda\u4e86\u3002<\/p>\n<p>ps\uff1a\u5728rman\u4e0b\u4e5f\u53ef\u8fd0\u884c<\/p>\n<p>\u4f46\u662f\u8fd9\u6837\u6bcf\u6b21\u542f\u52a8sqlplus\u90fd\u8981\u52a0rlwrap\u4e86\uff0c\u4e0d\u4f1a\u5f88\u9ebb\u70e6\u5417\uff1f<\/p>\n<p>\u6ca1\u5173\u7cfb\uff0c\u4f7f\u7528alias\u547d\u4e2a\u522b\u540d\u5199\u5230oracle\u7528\u6237\u7684\u914d\u7f6e\u6587\u4ef6\u4e0b\u5c31\u89e3\u51b3\u4e86<\/p>\n<p>\u540c\u7406\uff0crman\u4e5f\u662f<\/p>\n<p>\u628a\u4ee5\u4e0b\u4e24\u53e5\u52a0\u5230\/home\/oracle \/.bash_profile\u6587\u4ef6\u5c3e\u90e8<\/p>\n<p>alias<br \/>\nsqlplus=\u2019rlwrap sqlplus\u2019<\/p>\n<p>alias<br \/>\nrman=\u2019rlwrap rman\u2019<\/p>\n<p>\u518d\u4f7f\u5176\u751f\u6548<\/p>\n<p>[oracle@localhost<br \/>\n~]$ source .bash_profile<\/p>\n<p>\u8fd9\u6837\u76f4\u63a5sqlplus\u5c31\u53ef\u4ee5\u5b9e\u73b0\u5176\u529f\u80fd\u5566<\/p>\n<p>ps\uff1a\u6700\u540e\uff0crlwrap\u8981\u5728root\u7528\u6237\u4e0b\u88c5\uff0c\u4e0d\u8981\u5728oracle\u7528\u6237\u4e0b\u88c5<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u5f88\u591a\u4eba\u90fd\u4f1a\u72af\u8fd9\u4e2a\u9519\u8bef\uff0c\u5bfc\u81f4\u5b89\u88c5\u5931\u8d25\u63a8\u8350\u9605\u8bfb\uff1a<a href=\"https:\/\/cn.raksmart.com\/blog\/knowledge\/958.html\">CPANEL\u9762\u677f\u521b\u5efa\u548c\u5bfc\u5165\u6570\u636e\u5e93<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u4eba\u95ee\u6211\u600e\u4e48\u5728linux\u7cfb\u7edf\u4e0b\u7684sqlplus\u5b9e\u73b0\u50cfwindow\u7cfb\u7edf\u4e00\u6837\u5bf9\u6267\u884c\u8bed\u53e5\u8bb0\u5f55\u524d\u540e\u7ffb\u6eda\uff0c\u672c\u6587\u2026 <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[1005],"class_list":["post-974","post","type-post","status-publish","format-standard","hentry","category-knowledge","tag-rlwrap"],"_links":{"self":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/comments?post=974"}],"version-history":[{"count":0,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/posts\/974\/revisions"}],"wp:attachment":[{"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/media?parent=974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/categories?post=974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.raksmart.com\/blog\/wp-json\/wp\/v2\/tags?post=974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}