如何安装rlwrap工具解决linux下使用sqlplus的问题

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:860

如何安装rlwrap工具解决linux下使用sqlplus的问题

rlwrap工具可以解决linux下sqlplus 提供浏览历史命令行的功能,和删除先前输入错误的字母等问题
1.安装
需要readline包 这个安装光盘就有
[root@asm RedHat]# cd RPMS/
[root@asm RPMS]# rpm -Uvh readline*
warning: readline-4.3-13.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
error: Failed dependencies:
libtermcap-devel is needed by readline-devel-4.3-13.i386
Suggested resolutions:
/var/spool/up2datelibtermcap-devel-2.0.8-39.i386.rpm
[root@asm RPMS]# rpm -Uvh libtermcap-devel-2.0.8-39.i386.rpm
warning: libtermcap-devel-2.0.8-39.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:libtermcap-devel ########################################### [100%]
[root@asm RPMS]# rpm -Uvh readline*
warning: readline-4.3-13.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
package readline-4.3-13 is already installed
[root@asm RPMS]# rpm -Uvh readline-devel-4.3-13.i386.rpm
warning: readline-devel-4.3-13.i386.rpm: V3 DSA signature: NOKEY, key ID db42a60e
Preparing... ########################################### [100%]
1:readline-devel ########################################### [100%]

安装rlwrap包
rlwrap-0.28.tar.gz下载地址:[url]http://utopia.knoware.nl/~hlub/uck/rlwrap/
[root@asm oracle]# tar -zxvf rlwrap-0.28.tar.gz
[root@asm oracle]# cd rlwrap-0.28
[root@asm rlwrap-0.28]# ls
aclocal.m4 bash30-005.patch ChangeLog config.h.in configure.ac distribution INSTALL Makefile.in README test tools
AUTHORS BUGS completions configure COPYING doc Makefile.am NEWS src TODO
[root@asm rlwrap-0.28]# ./configure
[root@asm rlwrap-0.28]# make
[root@asm rlwrap-0.28]# make install
[root@asm rlwrap-0.28]# rlwrap
Usage: rlwrap [options] command ...
Options:
-a[password:] --always-readline[=password:]
-b --break_chars=
-c --complete-filenames
-C --command-name=
-D <0|1|2> --history-no-dupes=<0|1|2>
-f --file=
-F --history-format= -h --help
-H --history-filename=
-i --case-insensitive
-l --logfile=
-n --no-warnings
-P --pre-given=
-m[newline substitute] --multi-line[=newline substitute]
-r --remember
-v --version
-s --histsize= (negative: readonly)
bug reports, suggestions, updates:
http://utopia.knoware.nl/~hlub/uck/rlwrap/

[root@asm rlwrap-0.28]# vi /home/oracle/.bash_profile 加入下面两句
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
linux sqlplus 下就能和cmd 下sqlplus 正常操作了

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】