歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> RedHat Enterprise Linux下安裝rlwrap工具

RedHat Enterprise Linux下安裝rlwrap工具

日期:2017/2/28 16:11:47   编辑:Linux教程

rlwrap 可以用來支持Oracle下sqlplus歷史命令的回調功能,提高效率。

安裝rlwrap時,提示需要安裝readline

就用yum install readline 就可以了

1、 下載

免費下載地址在 http://linux.linuxidc.com/

用戶名與密碼都是www.linuxidc.com

具體下載目錄在 /pub/2011/07/04/rlwrap/

下載rlwrap-0.37.tar.gz,然後上傳到

/tmp 目錄下。

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

Usage: rlwrap [options] command ...

Options:

-a[password:] --always-readline[=password:]

-A --ansi-colour-aware

[oracle@localhost ~]$ rlwrap sqlplus / as sysdba;

SQL*Plus: Release 10.1.0.3.0 -Production on ??Υ 9? 3 12:49:42 2010

Copyright (c) 1982, 2004, Oracle. All rights reserved.

Connected to:

Oracle Database 10g EnterpriseEdition Release 10.1.0.3.0 - Production

With the Partitioning, OLAP and DataMining options

SQL> select status fromv$instance;

STATUS

------------

OPEN

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’

Copyright © Linux教程網 All Rights Reserved