安装rlwrap(解决Sqlplus 方向键出现乱码)

1. 进入   http://utopia.knoware.nl/~hlub/rlwrap/  下载安装文件

2. 解压文件   tar zxvf rlwrap-0.37.tar.gz

3. 安装rlwrap依赖的两个包

[root@localhost ~]# yum search readline
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: repo.umbeehosting.com
* base: repo.umbeehosting.com
* extras: mirror.krystal.co.uk
* updates: mirror.simwood.com
============================================================= Matched: readline =============================================================
compat-readline43.i386 : The readline 4.3 library for compatibility with older software.
lftp.i386 : A sophisticated file transfer program
php-readline.i386 : Standard PHP module provides readline library support
readline.i386 : A library for editing typed command lines.
readline-devel.i386 : Files needed to develop programs which use the readline library.

[root@localhost ~]# yum install compat-readline43.i386

[root@localhost ~]# yum install readline-devel.i386

4. 安装rlwrap

[oracle@localhost rlwrap-0.41]$ pwd
/data/software/rlwrap-0.41
[oracle@localhost rlwrap-0.41]$  ./configure && make && make install

5. 验证安装是否成功
[oracle@localhost rlwrap-0.41]$ which rlwrap
/usr/local/bin/rlwrap
[oracle@localhost rlwrap-0.41]$ rlwrap
Usage: rlwrap [options] command ...

Options:
  -a[password prompt]        --always-readline[=password prompt]
  -A                         --ansi-colour-aware
  -b                  --break-chars=
  -c                         --complete-filenames
  -C                 --command-name=
  -D  <0|1|2>                --history-no-dupes=<0|1|2>
  -e                --extra-char-after-completion=
  -f        --file=
  -g                 --forget-matching=
  -h                         --help
  -H                   --history-filename=
  -i                         --case-insensitive
  -I                         --pass-sigint-as-sigterm
  -l                   --logfile=
  -n                         --no-warnings
  -N                         --no-children
  -o                         --one-shot
  -O                 --only-cook=
  -p[colour]                 --prompt-colour[=colour]
  -P                  --pre-given=
  -q                  --quote-characters=
  -m[newline substitute]     --multi-line[=newline substitute]
  -M  <.ext>                 --multi-line-ext=<.ext>
  -r                         --remember
  -R                         --renice
  -v                         --version
  -s                      --histsize= (negative: readonly)
  -S                 --substitute-prompt=
  -t                   --set-term-name=
  -w                      --wait-before-prompt= (msec, <0  : patient mode)
  -W                         --polling
  -z         --filter= (-z listing lists installed filters)

bug reports, suggestions, updates:

6 修改oracle用户初始化参数文件

[oracle@localhost ~]$ vi .bash_profile

添加

alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'

使参数文件立即生效

source .bash_profile

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28719055/viewspace-1249968/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/28719055/viewspace-1249968/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值