rlwrap 安装应用

来源:互联网 发布:mysql全文检索 编辑:程序博客网 时间:2024/05/23 21:24
在Linux下面使用sqlplus很不爽,上下键,退格键都不能用,严重降低生产效率。
某一天终于发现了这个rlwrap这个好东西,特写此文记录。
由于时间关系,可以从这里下载安装包。
下载后,将.zip扩展名去掉,传到Linux服务器上面。
先装上一些安装rpm
一:安装readline
OS的安装光盘里提供了readline包.
[root@oracle11g ~]# rpm -Uvh readline*error: Failed dependencies: libtermcap-devel is needed by readline-devel-5.1-1.1.i386.rpm[root@oracle11g ~]# rpm -Uvh libtermcap-devel-2.0.8-46.1.i386.rpm[root@oracle11g ~]# rpm -Uvh readline*package readline-5.1-1.1 is already installed[root@oracle11g ~]# rpm -Uvh readline-devel-5.1-1.1.i386.rpm
二:安装rlwrap
[root@oracle11g ~]# tar -zxvf rlwrap-0.30.tar.gz[root@oracle11g ~]# cd rlwrap-0.30[root@oracle11g rlwrap-0.30]# ./configure[root@oracle11g rlwrap-0.30]# make[root@oracle11g rlwrap-0.30]# make install
三:方便使用rlwrap
[root@oracle11g rlwrap-0.30]# vi /home/oracle/.bash_profile添加alias sqlplus='rlwrap sqlplus'alias rman='rlwrap rman'
 

Linux下的SQL Plus 终于可以像Windows下的那样使用了。

==========================================

一、安装准备:

首先需要安装readline包和libtermcap-devel包:

[root@RAC1 Server]# rpm -ivh readline-5.1-1.1.x86_64.rpm 
[root@RAC1 Server]# rpm -ivh readline-devel-5.1-1.1.x86_64.rpm 

[root@RAC1 Server]# rpm -ivh libtermcap-devel-2.0.8-46.1.x86_64.rpm 

二、下载安装

Download:
http://utopia.knoware.nl/~hlub/uck/rlwrap/
[root@RAC1 ~]# tar -zxvf rlwrap-0.30.tar.gz

[root@RAC1 ~]# cd rlwrap-0.30

 三、编译安装

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

[root@RAC1 rlwrap-0.37]# make

[root@RAC1 rlwrap-0.37]# .make install

[root@RAC1 rlwrap-0.30]# 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                  --history-no-dupes=
  -f        --file=
  -F          --history-format=
  -h                         --help
  -H                   --history-filename=
  -i                         --case-insensitive
  -l                   --logfile=
  -n                         --no-warnings
  -p[ANSI colour spec]       --prompt-colour[=ANSI colour spec]
  -P                  --pre-given=
  -q                  --quote-characters=
  -m[newline substitute]     --multi-line[=newline substitute]
  -r                         --remember
  -v                         --version
  -s                      --histsize= (negative: readonly)
  -t                   --set-term-name=
bug reports, suggestions, updates:
http://utopia.knoware.nl/~hlub/uck/rlwrap/


[root@RAC1 rlwrap-0.30]# vi /home/oracle/.bash_profile
添加
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'


这样就可以正常使用sqlplus的上翻下翻退格等功能


原创粉丝点击