需要安装两个包
1.readline,配置好yum直接安装
[root@test152 ~]# yum install readline*
2.rlwrap
这个下载连接当前有效,找了很多没找到有用的
https://files-cdn.cnblogs.com/files/killkill/rlwrap-0.30.tar.gz.zip
[root@test152 ~]# tar -zxvf rlwrap-0.30.tar.gz.zip
[root@test152 ~]# cd rlwrap-0.30
[root@test152 rlwrap-0.30]# ./configure
…
configure: creating ./config.status
config.status: creating makefile
config.status: creating doc/makefile
config.status: creating src/makefile
config.status: creating doc/rlwrap.man
config.status: creating distribution/rlwrap.spec
config.status: creating config.h
config.status: executing depfiles commands
now do:
make (or gmake) to build rlwrap
make check for instructions how to test it
make install to install it
[root@test152 rlwrap-0.30]# make
make all-recursive
make[1]: entering directory `/root/rlwrap-0.30′
making all in doc
make[2]: entering directory `/root/rlwrap-0.30/doc’
sed -e ‘s#@datadir@#/usr/local/share#’ rlwrap.man > rlwrap.1
make[2]: leaving directory `/root/rlwrap-0.30/doc’
making all in src
make[2]: entering directory `/root/rlwrap-0.30/src’
gcc -dhave_config_h -i. -i.. -ddatadir=\”/usr/local/share\” -g -o2 -mt main.o -md -mp -mf .deps/main.tpo -c -o main.o main.c
mv -f .deps/main.tpo .deps/main.po
gcc -dhave_config_h -i. -i.. -ddatadir=\”/usr/local/share\” -g -o2 -mt signals.o -md -mp -mf .deps/signals.tpo -c -o signals.o signals.c
mv -f .deps/signals.tpo .deps/signals.po
gcc -dhave_config_h -i. -i.. -ddatadir=\”/usr/local/share\” -g -o2 -mt readline.o -md -mp -mf .deps/readline.tpo -c -o readline.o readline.c
mv -f .deps/readline.tpo .deps/readline.po
gcc -dhave_config_h -i. -i.. -ddatadir=\”/usr/local/share\” -g -o2 -mt pty.o -md -mp -mf .deps/pty.tpo -c -o pty.o pty.c
mv -f .deps/pty.tpo .deps/pty.po
gcc -dhave_config_h -i. -i.. -ddatadir=\”/usr/local/share\” -g -o2 -mt completion.o -md -mp -mf .deps/completion.tpo -c -o completion.o completion.c
mv -f .deps/completion.tpo .deps/completion.po
gcc -dhave_config_h -i. -i.. -ddatadir=\”/usr/local/share\” -g -o2 -mt term.o -md -mp -mf .deps/term.tpo -c -o term.o term.c
mv -f .deps/term.tpo .deps/term.po
gcc -dhave_config_h -i. -i.. -ddatadir=\”/usr/local/share\” -g -o2 -mt ptytty.o -md -mp -mf .deps/ptytty.tpo -c -o ptytty.o ptytty.c
mv -f .deps/ptytty.tpo .deps/ptytty.po
gcc -dhave_config_h -i. -i.. -ddatadir=\”/usr/local/share\” -g -o2 -mt utils.o -md -mp -mf .deps/utils.tpo -c -o utils.o utils.c
mv -f .deps/utils.tpo .deps/utils.po
gcc -dhave_config_h -i. -i.. -ddatadir=\”/usr/local/share\” -g -o2 -mt string_utils.o -md -mp -mf .deps/string_utils.tpo -c -o string_utils.o string_utils.c
mv -f .deps/string_utils.tpo .deps/string_utils.po
gcc -dhave_config_h -i. -i.. -ddatadir=\”/usr/local/share\” -g -o2 -mt malloc_debug.o -md -mp -mf .deps/malloc_debug.tpo -c -o malloc_debug.o malloc_debug.c
mv -f .deps/malloc_debug.tpo .deps/malloc_debug.po
gcc -ddatadir=\”/usr/local/share\” -g -o2 -o rlwrap main.o signals.o readline.o pty.o completion.o term.o ptytty.o utils.o string_utils.o malloc_debug.o -lutil -lreadline -lcurses
make[2]: leaving directory `/root/rlwrap-0.30/src’
make[2]: entering directory `/root/rlwrap-0.30′
make[2]: leaving directory `/root/rlwrap-0.30′
make[1]: leaving directory `/root/rlwrap-0.30′
[root@test152 rlwrap-0.30]# make check
making check in doc
make[1]: entering directory `/root/rlwrap-0.30/doc’
make[1]: nothing to be done for `check’.
make[1]: leaving directory `/root/rlwrap-0.30/doc’
making check in src
make[1]: entering directory `/root/rlwrap-0.30/src’
make[1]: nothing to be done for `check’.
make[1]: leaving directory `/root/rlwrap-0.30/src’
make[1]: entering directory `/root/rlwrap-0.30′
make check-tests
make[2]: entering directory `/root/rlwrap-0.30′
*****************************************************************************
* *
* testing rlwrap from within “make” causes problems with signal handling *
* therefore, you should do it by hand: *
* $ src/rlwrap perl test/testclient *
* *
*****************************************************************************
pass: test/testit
==================
all 1 tests passed
==================
make[2]: leaving directory `/root/rlwrap-0.30′
make[1]: leaving directory `/root/rlwrap-0.30′
[root@test152 rlwrap-0.30]# make install
making install in doc
make[1]: entering directory `/root/rlwrap-0.30/doc’
make[2]: entering directory `/root/rlwrap-0.30/doc’
make[2]: nothing to be done for `install-exec-am’.
test -z “/usr/local/share/man/man1” || /bin/mkdir -p “/usr/local/share/man/man1”
/usr/bin/install -c -m 644 ‘./rlwrap.1’ ‘/usr/local/share/man/man1/rlwrap.1’
make[2]: leaving directory `/root/rlwrap-0.30/doc’
make[1]: leaving directory `/root/rlwrap-0.30/doc’
making install in src
make[1]: entering directory `/root/rlwrap-0.30/src’
make[2]: entering directory `/root/rlwrap-0.30/src’
test -z “/usr/local/bin” || /bin/mkdir -p “/usr/local/bin”
/usr/bin/install -c ‘rlwrap’ ‘/usr/local/bin/rlwrap’
make[2]: nothing to be done for `install-data-am’.
make[2]: leaving directory `/root/rlwrap-0.30/src’
make[1]: leaving directory `/root/rlwrap-0.30/src’
make[1]: entering directory `/root/rlwrap-0.30′
make[2]: entering directory `/root/rlwrap-0.30′
make[2]: nothing to be done for `install-exec-am’.
test -z “/usr/local/share/rlwrap” || /bin/mkdir -p “/usr/local/share/rlwrap”
/usr/bin/install -c -m 644 ‘completions/ftp’ ‘/usr/local/share/rlwrap/ftp’
/usr/bin/install -c -m 644 ‘completions/testclient’ ‘/usr/local/share/rlwrap/testclient’
/usr/bin/install -c -m 644 ‘completions/coqtop’ ‘/usr/local/share/rlwrap/coqtop’
make[2]: leaving directory `/root/rlwrap-0.30′
make[1]: leaving directory `/root/rlwrap-0.30′
[root@test152 ~]# su – oracle
[oracle@test152 ~]$ vi .bash_profile
…
alias sqlplus=’rlwrap sqlplus’
alias rman=’rlwrap rman’
[oracle@test152 ~]$ source .bash_profile
然后,可以上下翻浪了