Linux下安装rlwrap

By   2016-04-22  

一:安装readline

OS的安装光盘里提供了readline包.

# RHEL 4
[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
# RHEL 5
[root@oracle11g ~]# rpm -ivh readline* libtermcap-devel*

二:安装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 可以使用退格键了

发表评论

邮箱地址不会被公开。