sqlplus补丁包rlwrap-0.37的安装步骤(解决SQL的删除、上翻历史命令等)

一、下载rlwrap-0.37.tar.gz

1、解压压缩包
# tar xzvf rlwrap-0.37.tar.gz


2、进入解压目录 rlwrap-0.37
#./configure
#make
#make install

如果在执行configure时失败( make 不通过),就看一下失败提示。一般是需要安装一些依赖包,到 centos6.3 的第一张光盘里的Packages目录下找需要的包并安装。下面是我安装需要的包:


二、安装依赖包

[root@localhost Packages]# rpm -ivh readline-6.0-4.el6.x86_64.rpm
warning: readline-6.0-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
    package readline-6.0-4.el6.x86_64 is already installed
[root@localhost Packages]# rpm -ivh ncurses-5.7-3.20090208.el6.x86_64.rpm
warning: ncurses-5.7-3.20090208.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
    package ncurses-5.7-3.20090208.el6.x86_64 is already installed

[root@localhost Packages]# rpm -ivh ncurses-devel-5.7-3.20090208.el6.x86_64.rpm
warning: ncurses-devel-5.7-3.20090208.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:ncurses-devel          ########################################### [100%]
[root@localhost Packages]# rpm -ivh readline-devel-6.0-4.el6.x86_64.rpm warning: readline-devel-6.0-4.el6.x86_64.rpm: Header V3 RSA/SHA1 Signature, key ID c105b9de: NOKEY
Preparing...                ########################################### [100%]
   1:readline-devel         ########################################### [100%]
[root@localhost Packages]#


然后再到目录 rlwrap-0.37 下:
#./configure
#make
#make install


四、在下面的文本里添加如下语句

[root@asm rlwrap-0.37]# vi /home/oracle/.bash_profile   加入下面两句

alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'


本文出自 “IT人生” 博客,谢绝转载!

你可能感兴趣的:(sqlplus)