解决oracle不能上下箭头翻历史命令问题

解决命令行中上下键不能翻历史命令的问题

安装过程:
将软件拷贝到/root下
挂载光盘到/media/mnt下

#mkdir /media/mnt
#mount /dev/cdrom /media/cdrom
#vim /etc/yum.repos.d/test.repo
[aaa]
name=aaa
baseurl=file:///media/cdrom/
enabled=1
gpgcheck=0

添加本地yum源

[root@oracle ~]## yum -y install readline*
[root@oracle ~]# cd /opt
[root@oracle opt]# tar zxvf rlwrap-0.42.tar.gz
[root@oracle opt]# cd rlwrap-0.42/
[root@oracle rlwrap-0.42]# ./configure && make && make install

这样就可以使用 rlwarp 了

[root@oracle rlwrap-0.42]# su oracle
[oracle@oracle rlwrap-0.42]$ vi ~oracle/.bash_profile
[oracle@oracle rlwrap-0.42]$ vi ~/.bashrc

在末尾添加

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

保存退出
使文件立即生效

[oracle@oracle opt]$ source ~oracle/.bash_profile
[oracle@oracle rlwrap-0.42]$ source ~oracle/.bashrc 

安装完rlwrap后,有些可能使用SecureCRT会再次出现乱码,这是修改一下SecureCRT的字符编码:
【选项】->【会话选项】->【终端】->【外观】+

原文博客快速通道

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值