1、解压缩 rlwrap-0.42.tar.gz
tar -zxvf rlwrap-0.42.tar.gz
2、编译安装
#./configure
#make
#make check
#make install
/configure后报如下错误:
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!
解决办法
# yum -y install readline*
安装完成以后再次执行
#./configure
# make
# make install
3、添加到环境变量
[oracle@cdgq ~]$ vim .bash_profile
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
[oracle@cdgq ~]$ source .bash_profile
4、验证安装结果
#which rlwrap