操作环境
Centos 7,VMware® Workstation 15 Pro,rlwrap安装包
安装步骤
使用XFTP工具将安装包导入到系统的/tmp/目录下
解压
# tar -zxvf rlwrap-0.37.tar.gz
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
rlwrap-0.37/doc/Makefile.in
...
切换到rlwrap-0.37目录下,运行 ./configure,出现报错
# cd rlwrap-0.37/
# ./configure
You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program!
安装依赖包
# yum install -y libtermcap-devel
# yum -y install readline*
然后重新执行./configure,成功
# ./configure
Now do:
make (or gmake) to build rlwrap
make check for instructions how to test it
make install to install it
然后建立rlwrap,安装rlwrap,查看rlwrap的版本号,成功!
# make
make all-recursive
make[1]: Entering directory `/tmp/rlwrap-0.37'
Making all in doc
make[2]: Entering directory `/tmp/rlwrap-0.37/doc'
sed -e 's#@DATADIR@#/usr/local/share#' rlwrap.man > rlwrap.1
make[2]: Leaving directory `/tmp/rlwrap-0.37/doc'
Making all in src
...
# make install
Making install in doc
make[1]: Entering directory `/tmp/rlwrap-0.37/doc'
make[2]: Entering directory `/tmp/rlwrap-0.37/doc'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/share/man/man1" || /usr/bin/mkdir -p "/usr/local/share/man/man1"
/usr/bin/install -c -m 644 rlwrap.1 '/usr/local/share/man/man1'
...
# rlwrap -v
rlwrap 0.37
切换到Oracle用户下,打开.bash_profile,在结尾写入alias sqlplus='rlwrap sqlplus'和alias rman='rlwrap rman',保存生效
# su - oracle
$ vi .bash_profile
$ source .bash_profile
登录Oracle数据库,发现可以正常使用上翻的功能了~