首页 技术 正文
技术 2022年11月19日
0 收藏 437 点赞 3,333 浏览 4034 个字

转至:https://www.cnblogs.com/hw-1015/p/6601294.html

在linux上使用sqlplus命令的时候,上下键、空格键、删除键都不能使用,非常麻烦。安装了rlwrap之后,这一问题得到解决

在安装rlwrap之前需要安装readline

yum install readline

接着安装rlwrap

可以使用rlwrap的rpm包安装

本次使用源码包

使用root上传源码包rlwrap-0.37.tar.gz

tar -zxvf rlwrap-0.37.tar.gz

cd rlwrap-0.37

[root@oracle11gr203db rlwrap-0.37]# ./configure

checking build system type… x86_64-unknown-linux-gnu

checking host system type… x86_64-unknown-linux-gnu

checking for a BSD-compatible install… /usr/bin/install -c

checking whether build environment is sane… yes

checking for a thread-safe mkdir -p… /bin/mkdir -p

checking for gawk… gawk

checking whether make sets $(MAKE)… yes

checking whether make sets $(MAKE)… (cached) yes

checking whether build environment is sane… yes

………

checking for tgetent in -lcurses… no

checking for tgetent in -lncurses… no

checking for tgetent in -ltermcap… no

configure: WARNING: No termcap nor curses library found

checking for readline in -lreadline… no

configure: error:

You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build

this program!

(上述命令执行后检查配置出错)

检查是否已经安装下面的三个安装包:

libtermcap-devel-2.0.8-39.i386.rpm

readline-4.3-13.i386.rpm

readline-devel-4.3-13.i386.rpm

以上安装包在安装光盘中可以找到

[root@oracle11gr203db Packages]# rpm -qa|grep readline

readline-devel-6.0-4.el6.x86_64

readline-6.0-4.el6.i686

readline-6.0-4.el6.x86_64

重新安装:

[root@oracle11gr203db rlwrap-0.37]# ./configure

checking build system type… x86_64-unknown-linux-gnu

checking host system type… x86_64-unknown-linux-gnu

checking for a BSD-compatible install… /usr/bin/install -c

checking whether build environment is sane… yes

checking for a thread-safe mkdir -p… /bin/mkdir -p

checking for gawk… gawk

checking whether make sets $(MAKE)… yes

checking whether make sets $(MAKE)… (cached) yes

………

checking for tgetent… no

checking for tgetent in -lcurses… yes

checking for readline in -lreadline… yes

checking whether your readline headers know about rl_set_screen_size… yes

checking whether your readline library knows about rl_set_screen_size… checking for rl_set_screen_size… yes

checking whether your readline knows about rl_variable_value… yes

checking whether your readline knows about rl_readline_version… yes

Will rlwrap find command’s working directory under /proc/<commands pid>/cwd? let’s see…

checking for /proc/4018/cwd/configure.ac… yes

configure: creating ./config.status

config.status: creating Makefile

config.status: creating filters/Makefile

config.status: creating doc/Makefile

config.status: creating src/Makefile

config.status: creating doc/rlwrap.man

config.status: creating config.h

config.status: executing depfiles commands

Now do:

make (or gmake) to build rlwrap

make check for instructions how to test it

make install to install it

[root@oracle11gr203db rlwrap-0.37]#

[root@oracle11gr203db rlwrap-0.37]# make

[root@oracle11gr203db rlwrap-0.37]# make install

验证安装结果

[root@oracle11gr203db rlwrap-0.37]# su – oracle

[oracle@oracle11gr203db ~]$ rlwrap

Usage: rlwrap [options] command …

Options:

-a[password:] –always-readline[=password:]

-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>

-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>

-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>

-m[newline substitute] –multi-line[=newline substitute]

-r –remember

-R –renice

-v –version

-s <N> –histsize=<N> (negative: readonly)

-S <prompt> –substitute-prompt=<prompt>

-t <name> –set-term-name=<name>

-w <N> –wait-before-prompt=<N> (msec, <0 : patient mode)

-z <filter command> –filter=<filter command>

bug reports, suggestions, updates:

http://utopia.knoware.nl/~hlub/uck/rlwrap/

[oracle@oracle11gr203db ~]$

编辑oracle用户下的.bash_profile

增加

alias sqlplus=’rlwrap sqlplus’

alias rman=’rlwrap rman’

参考文档:

Linux 安装 rlwrap工具

http://blog.csdn.net/xiegh2014/article/details/52202516

linux上 rlwrap安装

http://blog.csdn.net/qdseashore/article/details/52534388

RedHat Enterprise Linux下安装rlwrap工具

http://www.linuxidc.com/Linux/2011-07/38076.htm

如何安装rlwrap

http://jingyan.baidu.com/article/90808022edddf0fd91c80fdd.html

相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,088
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,565
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,413
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,186
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,822
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,905