安裝rlwrap工具,讓Oracle數(shù)據(jù)庫操作更便捷

操作環(huán)境

Centos 7,VMware? Workstation 15 Pro,rlwrap安裝包

安裝步驟

使用XFTP工具將安裝包導(dǎo)入到系統(tǒng)的/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目錄下,運(yùn)行 ./configure,出現(xiàn)報(bào)錯(cuò)

# 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*

然后重新執(zhí)行./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的版本號(hào),成功!

# 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,在結(jié)尾寫入alias sqlplus='rlwrap sqlplus'和alias rman='rlwrap rman',保存生效

# su - oracle
$ vi .bash_profile
$ source .bash_profile

登錄Oracle數(shù)據(jù)庫,發(fā)現(xiàn)可以正常使用上翻的功能了~

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容