rlwrap解决 Oracle sqlplus 在linux 上下文切换乱码问题
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了rlwrap解决 Oracle sqlplus 在linux 上下文切换乱码问题相关的知识,希望对你有一定的参考价值。
【本文谢绝转载原文来自http://990487026.blog.51cto.com】
rlwrap官网:
http://utopia.knoware.nl/~hlub/uck/rlwrap/
开始干活吧!
系统属性:
CentOS 6.8_X64,基于桌面,附加开发工具包安装.
下载源码,编译,安装:
[[email protected] ~]$ mkdir /tmp/mytest [[email protected]oracle11 ~]$ 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 build this 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 $? 0 root权限来安装 [[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 /nolog SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 31 16:08:43 2016 Copyright (c) 1982, 2009, Oracle. All rights reserved. SQL> conn / as sysdba Connected to an idle instance. SQL> SQL> conn as sysdba
上下左右键回来了
本文出自 “魂斗罗” 博客,谢绝转载!
以上是关于rlwrap解决 Oracle sqlplus 在linux 上下文切换乱码问题的主要内容,如果未能解决你的问题,请参考以下文章
CentOS 6.5 安装 rlwrap软件for sqlplus
oracle 的sqlplus 工具进行翻译的rlwrap 安装教程