暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

安装rlwrap实现sql语句上下翻页左右移动功能

原创 Leo 2022-10-06
345

文档课题:安装rlwrap实现sql语句上下翻页左右移动功能.

系统:centos 7.9

数据库:oracle 11.2.0.4

安装包:rlwrap-0.42.tar.gz

1、安装包处理

sftp> lcd F:\package

sftp> cd /root

sftp> put rlwrap-0.42.tar.gz

# tar -zxf rlwrap-0.42.tar.gz

2、readline-devel

readline-devel包检查.

# yum -y install readline*

Loaded plugins: fastestmirror, langpacks

Loading mirror speeds from cached hostfile

Package readline-6.2-11.el7.x86_64 already installed and latest version

Package readline-devel-6.2-11.el7.x86_64 already installed and latest version

Nothing to do

# yum list all|grep readline

readline.x86_64                         6.2-11.el7                     @anaconda

readline-devel.x86_64                   6.2-11.el7                     @local

3、安装rlwrap

# cd /root/rlwrap-0.42

# ./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

……(省略若干)

 

# make

make  all-recursive

make[1]: Entering directory `/root/rlwrap-0.42'

Making all in doc

make[2]: Entering directory `/root/rlwrap-0.42/doc'

sed -e 's#@DATADIR@#/usr/local/share#'  rlwrap.man > rlwrap.1

make[2]: Leaving directory `/root/rlwrap-0.42/doc'

Making all in src

……(省略若干)

 

# make install

 

[oracle@hisdb1 ~]$ vi .bash_profile

按如下命名别名.

alias sas='rlwrap sqlplus / as sysdba'

alias rman='rlwrap rman'

[oracle@hisdb1 ~]$ source .bash_profile

 

4、验证结果

如下所示,sql语句使用左右键移动光标.


「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论