Installing rlwrap on Linux saves you time

Small Blog entry to spread the word. I hate having to manage a Linux system without this 😉 

rlwrap is an utility that allows you to use up and down arrows in the various commands like sqlplus, rman, adrci, … 
To enable it, you only have to do the following : 

  • Install readline-devel

    (root) # yum install readline-devel

  • Download latest rlwrap from http://utopia.knoware.nl/~hlub/uck/rlwrap/ and unzip it somewhere and Compile it.

    (root) # ./configure
    (root) # make
    (root) # make install

  • For OL6 you can use this RPM instead of manually making it:
         http://rpm.pbone.net/index.php3/stat/4/idpl/15282330/dir/redhat_el_6/com/rlwrap-0.37-1.el6.i686.rpm.html

    Then install it with :

    (root) # yum install rlwrap-0.37-1.el6.i686.rpm

  • Configure aliases in .bash_profile so that rlwrap gets enabled when you start the command

    alias sqlplus=”rlwrap sqlplus”
    alias dgmgrl=”rlwrap dgmgrl”
    alias rman=”rlwrap rman”
    alias lsnrctl=”rlwrap lsnrctl”
    alias asmcmd=”rlwrap asmcmd”
    alias adrci=”rlwrap adrci”
    alias impdp=”rlwrap impdp”
    alias expdp=”rlwrap expdp”

You’ll never go back again 😉

Advertisements