Using rlwrap for rman and maybe sqlplus, RHEL, CentOS, Oracle Linux 6 & 7, and Amazon Linux 1, and 2

FYI newest verision of sqlplus installed with 12.2 has command recall built in – but not rman… and anything older and rman you want this…
RLWrap Installation From EPEL
Extra Packages for Enterprise Linux (or EPEL) a set of additional packages for Enterprise Linux, including, but not limited to, Red Hat Enterprise Linux (RHEL), CentOS and Scientific Linux (SL), Oracle Linux (OL)
Configure the EPEL yum repository, as described here. Don’t worry that it is listed as a, i386 package. It just installs the yum repository.

# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
 # rpm -Uvh epel-release-latest-6.noarch.rpm
For RHEL 6.x, CentOS, Amazon Linux 1
 # wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
 # or
 # yum localinstall epel-release-latest-7.noarch.rpm
 # rpm -Uvh epel-release-latest-6.noarch.rpm
For Oracle Linux 7, Amazon Linux 2, CentOS 7, RHEL 7
# wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
 # rpm -Uvh epel-release-latest-7.noarch.rpm
 # or
 # yum localinstall epel-release-latest-7.noarch.rpm
 With the repository in place you can install rlwrap using the following command.
# yum install rlwrap
 If you are using Oracle Linux 7 you can enable the "ol7_developer_EPEL" repository in the "/etc/yum.repos.d/public-yum-ol7.repo" file, which is a clone of EPEL provided by Oracle. And then you can the do a normal YUM install.
Run the following commands, or append then to the ".bash_profile" or .bashrc of the oracle software owner.
alias rlsqlplus='rlwrap sqlplus'
 alias rlrman='rlwrap rman'
Start SQL*Plus or RMAN using "rlsqlplus" and "rlrman" respectively, providing a basic command history and the current line will be editable using the arrow and delete keys.

Leave a Comment

Scroll to Top