【本文谢绝转载原文来自http://990487026.blog.51cto.com】
rlwrap官网:
http://utopia.knoware.nl/~hlub/uck/rlwrap/
开始干活吧!
系统属性:
CentOS 6.8_X64,基于桌面,附加开发工具包安装.
下载源码,编译,安装:
[oracle@oracle11~]$mkdir/tmp/mytest [oracle@oracle11~]$cd/tmp/mytest [oracle@oracle11mytest]$wgethttp://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.42.tar.gz [oracle@oracle11mytest]$echo$? 0 [oracle@oracle11mytest]$tarxfrlwrap-0.42.tar.gz [oracle@oracle11mytest]$cdrlwrap-0.42 [oracle@oracle11rlwrap-0.42]$./configure YouneedtheGNUreadlinelibrary(ftp://ftp.gnu.org/gnu/readline/)tobuild thisprogram! [oracle@oracle11rlwrap-0.42]$echo$? 1 提示我缺readlinelibrary,切换到root下 [root@oracle11~]#yuminstall-yreadline-devel [oracle@oracle11rlwrap-0.42]$./configure [oracle@oracle11rlwrap-0.42]$echo$? 0 编译环境检查通过! 那么久开始编译吧: [oracle@oracle11rlwrap-0.42]$make [oracle@oracle11rlwrap-0.42]$echo$? 0 root权限来安装 [root@oracle11~]#cd/tmp/mytest/rlwrap-0.42 [root@oracle11rlwrap-0.42]#makeinstall [root@oracle11rlwrap-0.42]#echo$? 0
测试:
[root@oracle11rlwrap-0.42]#rlwrap Usage:rlwrap[options]command... Options: -a[passwordprompt]--always-readline[=passwordprompt] -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<completionlist>--file=<completionlist> -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[newlinesubstitute]--multi-line[=newlinesubstitute] -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:patientmode) -W--polling -z<filtercommand>--filter=<filtercommand>(-zlistinglistsinstalledfilters) bugreports,suggestions,updates: http://utopia.knoware.nl/~hlub/uck/rlwrap/
设置别名:
[oracle@oracle11rlwrap-0.42]$echo"aliassqlplus='rlwrapsqlplus'">>/home/oracle/.bashrc [oracle@oracle11rlwrap-0.42]$cd [oracle@oracle11~]$source.bashrc
测试我的上下左右键:
[oracle@oracle11~]$sqlplus/nolog sql*Plus:Release11.2.0.1.0ProductiononWedAug3116:08:432016 Copyright(c)1982,2009,Oracle.Allrightsreserved. sql>conn/assysdba Connectedtoanidleinstance. sql> sql>connassysdba
上下左右键回来了