linux安装rlwrap

rlwrap可以用来支持oracle下sqlplus历史命令的回调功能,提高效率。

1、下载

从http://utopia.knoware.nl/~hlub/uck/rlwrap/下载rlwrap-0.37.tar.gz,然后上传到

/tmp目录下。

2、解压缩安装

[root@localhosttmp]#tar-zxvfrlwrap-0.37.tar.gz

[root@localhosttmp]#cdrlwrap-0.37

[root@localhostrlwrap-0.37]#ls

[root@localhostrlwrap-0.37]#./configure

[root@localhostrlwrap-0.37]#make

[root@localhostrlwrap-0.37]#makeinstall

3、验证安装结果

[root@localhostrlwrap-0.37]#su–oracle

[oracle@localhost~]$rlwrap

Usage:rlwrap[options]command...

Options:

-a[password:]--always-readline[=password:]

-A--ansi-colour-aware

[oracle@localhost~]$rlwrapsqlplus/assysdba;

SQL*Plus:Release10.1.0.3.0-Productionon??Υ9?312:49:422010

Copyright(c)1982,2004,Oracle.Allrightsreserved.

Connectedto:

OracleDatabase10gEnterpriseEditionRelease10.1.0.3.0-Production

WiththePartitioning,OLAPandDataMiningoptions

SQL>selectstatusfromv$instance;

STATUS

------------

OPEN

4、安装报错

rlwrap:errorwhileloadingsharedlibraries:libreadline.so.5:cannotopensharedobjectfile:Nosuchfileordirectory

解决办法:

在oracle下的.bash_profile中$PATH路径中增加/usr/local/bin路径

PATH=/usr/local/bin:$PATH;

exportPATH

5、编辑oracle用户下的.bash_profile增加

aliassqlplus=’rlwrapsqlplus’

aliasrman=’rlwraprman’

转自http://www.cnblogs.com/lukeqinll/archive/2010/09/14/1826262.html

解决在sqlplus下输错命令后正常删除的方法

[oracle@oracle11g~]$vi/home/oracle/.bash_profile

添加

sttyerase^h