您的位置:首页 > 博客中心 > 数据库 >

在CentOS下为sqlplus和rman 添加rlwrap

时间:2022-03-14 00:34

在Linux中sqlplus和rman无法像我们在shell中,能使用方向键和退格键对语句惊醒一些更改。

这实在是很苦恼的事情。 不过有rlwrap来对sqlplus和rman进行一些扩展,让我的操作不那么苦逼了。 下面是在Centos6中安装rlwarp的方法。   1.安装readline-devel     shell>su - root     shell>yum install readline-devel   2.下载rlwrap     在 找到最新的rlwrap源码包     shell> wget    3.解压编译安装     shell> tar zxvf rlwrap-0.41.tar.gz     shell>./configure     shell>make & make install
  4.如果上面的步骤都没有报错了吧,我们就可以为sqlplus添加rlwrap支持了,下面以oracle用户为例      shell>su - oracle
     shell>vim ~/.bash_profile       为sqlplus和rman添加rlwrap支持,在bash_profile添加如下内容         alias sqlp=‘rlwrap sqlplus‘          alias rman=‘rlwrap rman‘   5.重新用oracle这个用户登陆,或者我们应用下.bash_profile,再次使用sqlp和rman就发现可以使用方向键和退格键了。      应用.bash_profile的两种方法     shell>./.bash_profile      shell>source .bash_profile

热门排行

今日推荐

热门手游