Linux 上安裝 rlwrap

來源:互聯網
上載者:User

標籤:style   class   code   http   tar   ext   

1.安裝rlwrap的初衷;
2.安裝rlwrap工具和遇到的問題;
3.使用rlwrap 工具;

1.安裝rlwrap的初衷:
在Windows 下使用SQLPLUS都是可以使用上下左右方向鍵前後左右翻轉移動,每句命令也是可以往前或往後修改,但Linux 下卻不行,一直要使用SQLPLUS,這樣做有些難受,網上查詢了下,可以使用rlwrap 解決這個問題,安裝中遇到些問題記錄如下,方便以後查閱;
 
2.安裝rlwrap工具和遇到的問題:
2.1到rlwrap官網(http://utopia.knoware.nl/~hlub/uck/rlwrap)下載rlwrap工具,目前版本是0.4.1;
2.2 解壓rlwrap工具包:

[[email protected] ~]#tar -zxvf rlwrap-0.41.tar.gz 
 
[[email protected] ~]#cd rlwrap-0.41
 
[[email protected] rlwrap-0.41]# ./configure 
如果最後提示 You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build this program!
則還需要安裝:readline
[[email protected] rlwrap-0.41]# yum -y install readline*
關聯包:
ncurses-devel-5.7-3.20090208.el6.x86_64
readline-devel-6.0-4.el6.x86_64
readline-static-6.0-4.el6.x86_64
readline-static-6.0-4.el6.x86_64
readline-devel-6.0-4.el6.x86_64
ncurses-devel-5.7-3.20090208.el6.x86_64 
那如果這些包安裝失敗,可以到官網上找這些包下載獨立安裝,安裝無誤後,在一次嘗試:
[[email protected] rlwrap-0.41]# ./configure 
沒有任何錯誤後 make
[[email protected] rlwrap-0.41]# make
[[email protected] rlwrap-0.41]# make install
至此rlwrap工具安裝成功,鍵入rlwrap 後能看到相應提示;

3.使用rlwrap 工具:
輸入 rlwrap 後跟 sqlplus,sqlplus後面的參數和平常的一樣,不一樣的地方就是多了首碼,多了個伴;

[[email protected] rlwrap-0.41]$ rlwrap sqlplus /
 
SQL*Plus: Release 11.2.0.1.0 Production on Fri Jun 13 22:32:30 2014
 
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
 
 
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
[email protected]>
 

從此方向鍵的約束徹底解放,不用再擔心輸錯和找不到前幾句命令了,好好研究吧!!!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.