This article from http://www.cnblogs.com/mchina/archive/2013/03/08/2934473.html
Thank the original author here.
I. Yum Mode installation
There is no rlwrap this package in the default Yum repository of the CentOS system and needs to be installed through a third party yum source.
A. Installing a third-party yum Source
# RPM-IVH http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# RPM--IMPORT/ETC/PKI/RPM-GPG/RPM-GPG-KEY-EPEL-6//import KEY
The default is to create a Epel.repo and Epel-testing.repo two profiles under/etc/yum.repos.d/.
B. Installing Rlwrap and ReadLine
# yum Install rlwrap ReadLine readline-devel
C. Write the command to ~/.BASHRC
Alias sqlplus= "Rlwrap Sqlplus"
Alias rman= "Rlwrap Rman"
II. Source Package Installation
Other Linux distributions if the source does not have rlwrap and readline (such as the SUSE Enterprise Edition default does not have these two packages), to download the two source packages separately compiled installation.
A. Installing the ReadLine
# wget ftp://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz# tar zxvf readline-6.2.tar.gz# cd readline-6.2/#./configure # make# make Install
B. Installing Rlwrap
# wget http://utopia.knoware.nl/~hlub/rlwrap/rlwrap-0.37.tar.gz# tar zxvf rlwrap-0.37.tar.gz# cd rlwrap-0.37/#./ configure# make# make Install
Install Rlwrap on Cent OS