欢迎光临
我们一直在努力

linux怎么安装rlwrap

本篇内容主要讲解“linux怎么安装rlwrap”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“linux怎么安装rlwrap”吧!

rlwrap可以在SQL plus里进行上下键翻命令,和windows一样

1、首先安装readline
#  wget ftp://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz
# tar -xzvf readline-6.2.tar.gz
# cd readline-6.2
# ./configure
#  make
#  make install

2、安装rlwrap
#wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.42.tar.gz
# tar -xzvf rlwrap-0.42
# cd rlwrap-0.42
# ./configure

configure: error:
You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program!

解决办法:
安装这个包

# yum install libtermcap-devel

下面继续安装rlwrap
# make

# make install

3、 .bash_profile中进行设置。
alias sqlplus='/usr/local/bin/rlwrap sqlplus'
alias rman='/usr/local/bin/rlwrap rman'

4、修改一下
[root@localhost readline-6.2]# cp /etc/ld.so.conf /etc/ld.so.conf.bak
[root@localhost readline-6.2]# vi /etc/ld.so.conf
添加一行

/usr/local/lib

5、使得生效
[root@localhost readline-6.2]# ldconfig

6、验证
[root@localhost readline-6.2]# su – oracle
[oracle@localhost ~]$ sqlplus

SQL*Plus: Release 12.2.0.1.0 Production on Tue May 1 04:13:00 2018

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

到此,相信大家对“linux怎么安装rlwrap”有了更深的了解,不妨来实际操作一番吧!这里是云搜网网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。