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.
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
/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'
alias rman='rlwrap rman'
使参数文件立即生效
source .bash_profile
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/28719055/viewspace-1249968/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/28719055/viewspace-1249968/