1 下載安裝包rlwrap: rlwrap-0.30.tar.gz
http://utopia.knoware.nl/~hlub/uck/rlwrap/sql
2 install rlwrap:
# tar -xzvf rlwrap-0.30.tar.gz
# cd rlwrap-0.30
# ./configure
# make
# make check
# make install
(若是提示You need the GNU readline library (ftp://ftp.gnu.org/gnu/readline/ ) to build this program 說明須要安裝readline, readline-devel和
libtermcap-devel)
3 使用
切換到oracle用戶,編輯.bash_profile文件,
#su - oracle
#vi .bash_profile
在後邊加上以下內容:
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
stty erase ^h