http://utopia.knoware.nl/~hlub/uck/rlwrap/ 下载rlwrap-0.42.tar.gz
找到centos7 安装的iso中的 Packages的 ncurses-devel-5.9-13.20130511.el7.x86_64.rpm
rpm -ivh ncurses-devel-5.9-13.20130511.el7.x86_64.rpm
找到系统是否安装了 readline
rpm -qa | grep readline
结果 安装了 readline-6.2-9.el7.x86_64.rpm
需要在iso包中找到readline-devel-6.2-9.el7.x86_64.rpm
rpm -ivh readline-devel-6.2-9.el7.x86_64.rpm
安装完成后
解压 tar zxvf rlwrap-0.42.tar.gz
进去目录 cd rlwrap
./configure && make && make install
安装完成后
[root@localhost rlwrap-0.42]# which rlwrap
/usr/local/bin/rlwrap
[root@localhost rlwrap-0.42]#
vi .bash_profile 添加以下内容
stty erase ^h
alias sqlplus="rlwrap sqlplus"
alias rman="rlwrap rmain"
http://blog.csdn.net/liaomin416100569/article/details/44423847