A Oracle DBA's BLOG

Welcome to my ORACLE DBA blog. You will be Amazing!!!

Thursday, March 8, 2012

Installing RLWRAP command on linux

In this article we shell see how to install Rlwrap(read line wrapper) which very useful program on Linux and use it.
So, all you need download Rlwrap.tar.gz from this site and complete it.
1) Download Rlwrap/

Or if you are on ubuntu OS use: sudo apt-get install rlwrap

2)
[oracle@orcl tmp]$   tar -xvf rlwrap-0.37.tar
rlwrap-0.37/
rlwrap-0.37/completions/
rlwrap-0.37/completions/testclient
rlwrap-0.37/completions/coqtop
rlwrap-0.37/doc/
rlwrap-0.37/doc/rlwrap.man.in
rlwrap-0.37/doc/Makefile.am

3) Now trun to root user and configure Rlwrap
[oracle@orcl rlwrap-0.37]$./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking whether build environment is sane... yes.................................................................................................................................................................................

Now do:
    make (or gmake)  to build rlwrap
    make check       for instructions how to test it
    make install     to install it
4) Now we have to use make
# make
# make check
# make install
5) this step i'll set bash_profile in order to use rlwrap
[oracle@orcl ]$ vi .bash_profile

alias sql='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'
And set it [oracle@orcl ]$. .bash_profile

Now you can use the alias for easy way :) 

I think, DBAs Love that rlwrap :)







No comments:

Post a Comment