標籤:rlwrap解決 oracle sqlplus 在linux 環境切換亂碼問題
【本文謝絕轉載原文來自http://990487026.blog.51cto.com】
rlwrap官網:
http://utopia.knoware.nl/~hlub/uck/rlwrap/
650) this.width=650;" src="http://s5.51cto.com/wyfs02/M02/86/A7/wKioL1fGkiTC9ymmAAClyF2GjdY178.png" title="linux_sqlplus000.png" alt="wKioL1fGkiTC9ymmAAClyF2GjdY178.png" />
開始幹活吧!
系統屬性:
CentOS 6.8_X64,基於案頭,附加開發套件安裝.
下載源碼,編譯,安裝:
[[email protected] ~]$ mkdir /tmp/mytest[[email protected] ~]$ cd /tmp/mytest[[email protected] mytest]$ wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.42.tar.gz[[email protected] mytest]$ echo $?0[[email protected] mytest]$ tar xf rlwrap-0.42.tar.gz [[email protected] mytest]$ cd rlwrap-0.42[[email protected] rlwrap-0.42]$ ./configure You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to buildthis program![[email protected] rlwrap-0.42]$ echo $?1提示我缺readline library,切換到root下[[email protected] ~]# yum install -y readline-devel[[email protected] rlwrap-0.42]$ ./configure [[email protected] rlwrap-0.42]$ echo $?0編譯環境檢查通過!那麼久開始編譯吧:[[email protected] rlwrap-0.42]$ make[[email protected] rlwrap-0.42]$ echo $?0root許可權來安裝[[email protected] ~]# cd /tmp/mytest/rlwrap-0.42[[email protected] rlwrap-0.42]# make install [[email protected] rlwrap-0.42]# echo $?0
測試:
[[email protected] rlwrap-0.42]# rlwrap Usage: rlwrap [options] command ...Options: -a[password prompt] --always-readline[=password prompt] -A --ansi-colour-aware -b <chars> --break-chars=<chars> -c --complete-filenames -C <name|N> --command-name=<name|N> -D <0|1|2> --history-no-dupes=<0|1|2> -e <char|‘‘> --extra-char-after-completion=<char|‘‘> -f <completion list> --file=<completion list> -g <regexp> --forget-matching=<regexp> -h --help -H <file> --history-filename=<file> -i --case-insensitive -I --pass-sigint-as-sigterm -l <file> --logfile=<file> -m[newline substitute] --multi-line[=newline substitute] -M <.ext> --multi-line-ext=<.ext> -n --no-warnings -N --no-children -o --one-shot -O <regexp> --only-cook=<regexp> -p[colour] --prompt-colour[=colour] -P <input> --pre-given=<input> -q <chars> --quote-characters=<chars> -r --remember -R --renice -s <N> --histsize=<N> (negative: readonly) -S <prompt> --substitute-prompt=<prompt> -t <name> --set-term-name=<name> -U --mirror-arguments -v --version -w <N> --wait-before-prompt=<N> (msec, <0 : patient mode) -W --polling -z <filter command> --filter=<filter command> (-z listing lists installed filters)bug reports, suggestions, updates:http://utopia.knoware.nl/~hlub/uck/rlwrap/
設定別名:
[[email protected] rlwrap-0.42]$ echo "alias sqlplus=‘rlwrap sqlplus‘" >> /home/oracle/.bashrc[[email protected] rlwrap-0.42]$ cd[[email protected] ~]$ source .bashrc
測試我的上下左右鍵:
[[email protected] ~]$ sqlplus /nologSQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 31 16:08:43 2016Copyright (c) 1982, 2009, Oracle. All rights reserved.SQL> conn / as sysdbaConnected to an idle instance.SQL> SQL> conn as sysdba
上下左右鍵回來了
650) this.width=650;" src="http://s5.51cto.com/wyfs02/M00/86/A7/wKioL1fGkxOxOKBFAABhhlU2P_w505.png" title="linux_sqlplus.png" alt="wKioL1fGkxOxOKBFAABhhlU2P_w505.png" />
本文出自 “魂鬥羅” 部落格,謝絕轉載!
rlwrap解決 Oracle sqlplus 在linux 環境切換亂碼問題