CENTOS下 ORACLE安裝rlwrap工具

在linux下面使用sqlpus連接數據庫處理,實在不是很方便,還好有一個工具rlwrap,通過這個能夠調用歷史命令和回調功能,能夠極大的提高效率。

1、  下載

http://utopia.knoware.nl/~hlub/uck/rlwrap/下載rlwrap-0.37.tar.gz

 

2、  解壓縮安裝

[root@localhosttmp]# tar -zxvf rlwrap-0.37.tar.gz

 

[root@localhosttmp]# cd rlwrap-0.37

[[email protected]]# ls

[[email protected]]# ./configure

[[email protected]]#make

[[email protected]]#make install

3、  驗證安裝結果

[root@localhost rlwrap-0.37]#su – oracle

[oracle@localhost ~]$ rlwrap sqlplus

SQL*Plus: Release 9.2.0.4.0 - Production on Tue Jan 10 21:51:09 2012

Copyright (c) 1982, 2002, Oracle Corporation.  All rights reserved.

Enter user-name: / as sysdba

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - Production
With the Partitioning and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

SQL> select sysdate from dual;

SYSDATE
---------
10-JAN-12

SQL> select sysdate from dual;

SYSDATE
---------
10-JAN-12

 

4、安裝報錯

    rlwrap:error while loadingshared libraries:libreadline.so.5:cannot open shared object file:No suchfile or directory

   解決辦法:

   在oracle下的.bash_profile中$PATH路徑中增加/usr/local/bin路徑

    PATH=/usr/local/bin:$PATH;export PATH

 

5、 編輯oracle用戶下的.bash_profile

增加

alias sqlplus=’rlwrap sqlplus’

alias rman=’rlwrap rman’

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章