热门标签 | HotTags
当前位置:  开发笔记 > 前端 > 正文

linux中rlwrap安装

转至:https:www.cnblogs.comhw-1015p6601294.html在linux上使用sqlplus命令的时候,上下键、空格键、删除键都不能使用,非常麻烦。安装

转至: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//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 --break-chars=

-c --complete-filenames

-C --command-name=

-D <0|1|2> --history-no-dupes=<0|1|2>

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

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

-z --filter=

 

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

 



推荐阅读
author-avatar
鲁毅-beyond_512
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有