转至: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

linux中rlwrap安装的更多相关文章

  1. linux中编译安装Apache、PHP、MySQL(上)

    1.简介 在阿里云买了个云服务器,一直没时间折腾.过了近十天了吧,才有时间好好玩玩这个云服务器.自己是做Web开发的,所以我需要的开发环境是LAMP.之前打算是采用yum安装,不过yum安装apach ...

  2. Linux中redis安装配置及使用详解

    Linux中redis安装配置及使用详解 一. Redis基本知识 1.Redis 的数据类型 字符串 , 列表 (lists) , 集合 (sets) , 有序集合 (sorts sets) , 哈 ...

  3. Linux中Nginx安装与配置详解

    转载自:http://www.linuxidc.com/Linux/2016-08/134110.htm Linux中Nginx安装与配置详解(CentOS-6.5:nginx-1.5.0). 1 N ...

  4. Linux中如何安装Apache服务器

    Linux中如何安装Apache服务器 由于学习的需要,所有手动安装了一下Apache源码包,安装过程中的问题千奇百怪,但是如果弄清楚了问题出在哪里,那么也不是太难.如果有学习者出现安装中的问题,可仔 ...

  5. Linux课程---11、Linux中软件安装和调试

    Linux课程---11.Linux中软件安装和调试 一.总结 一句话总结: 启动过程:1.安装软件,2.修改配置文件,3.启动服务 查看过程:4.查看进程,5.查看端口 关闭过程:6.关闭软件,7. ...

  6. linux中Nginx安装

    linux中Nginx安装 编译安装 ​ Nginx的优点太多,这里不再赘述,详情请看这篇博客深入理解nginx. ​ Nginx的安装有rpm包安装.编译安装和docker安装.本文将介绍编译安装方 ...

  7. linux中RabbitMQ安装教程

    linux中RabbitMQ安装教程 在做一个微服务项目时候用到消息队列,于是深入了解了消息队列知识,并在linux上安装了Rabbitmq,本博客介绍Rabbitmq的安装教程,想要深入了解消息队列 ...

  8. linux中rpm安装

    目录 一:linux中rpm安装 1.rpm简介 2.区别 3.RPM命令五种基本模式 二:RPM安装全面解析 1,下载软件包 2, 安装软件包 3, 尝试卸载 4, 更新(升级) 5,软件包名称: ...

  9. 【转】Linux中如何安装.rpm、.tar、.tar.gz和tar.bz2

    我以下面三个包为例:(三个包都在/etc/opt下)A.example-1.2.3-1.rpmB.example-1.2.3-1.tarC.example-1.2.3-1.tar.gz 1.对于rpm ...

随机推荐

  1. 五种IO模型(Model)

    目录 一:IO模型简介 1.五种IO Model: 二:五种IO模型简介 1.阻塞IO 2.非阻塞IO 3.多路复用IO 4.信号驱动IO模型 5.异步IO 三:5种I/O模型的比较 一:IO模型简介 ...

  2. 分治FFT小记🐤

    分治FFT:在 $O(n \log^2 n)$ 的时间内求出类似于 $f_i=\sum\limits_{j=0}^{i-1}g(i-j)f(j)$ 之类的递推式 思想:同 CDQ 分治的思想,先分成左 ...

  3. X-former:不止一面,你想要的Transformer这里都有

    原创作者 | FLPPED 参考论文: A Survey of Transformers 论文地址: https://arxiv.org/abs/2106.04554 研究背景: Transforme ...

  4. 【XR-2】伤痕

    不难发现,直接漫无目的地构造不是一个好的选择,因为我们并不知道选择四座城市方案的上界是什么,因此下面可以来先分析一下这个方案的上界. 首先可以考虑这使得这四个点的导出子图是强连通的方案数,但是经过尝试 ...

  5. Network Kit与三七游戏共创流畅游戏体验,无惧网络延迟

    本文分享于HMS Core联盟论坛<[开发者说]无惧高网络吞吐量,HMS Core Network Kit与三七游戏共创流畅游戏体验>的采访整理. 三七游戏拥有<斗罗大陆·魂师对决& ...

  6. JQuery扩展方法实现Form表单与Json互相转换

    1.把表单转换出json对象 //把表单转换出json对象 $.fn.toJson = function () { var self = this, json = {}, push_counters ...

  7. StarUML官网地址 http://staruml.io/

    StarUML官网地址 http://staruml.io/

  8. 远程连接MySQL报错1045解决方案

    MySQL远端操作步骤: 方法一: USE mysql: GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH ...

  9. 通过导入Jar包的方式使用JSONObject

    如果想要在Java中使用JSONObject,而且只想通过导入jar包的方式下,那么仅仅导入Json的jar包还是不够的. 不然会报:java.lang.ClassNotFoundException: ...

  10. NSString 类介绍及用法

    1.NSString常见方法 NSString是 Objective-C 中核心处理字符串的类之一 创建常量字符串,注意使用"@"符号. NSString *astring = @ ...