您的位置:首页 > 数据库 > Oracle

linux下启动oracle sqlplus使用方向键出现[^A[B^[B^[D^ ^H的解决方法

2013-11-01 14:41 671 查看
今天安装好了虚拟机和oracle 11g 准备开始进一步的学习oracle

当我进入sqlPlus 敲击的第一条命令时输入错了一个字母 习惯性的使用方向键去出现了[^A[B^[B^[D^ ^H 乱码

在网上找了好多方法但是只有这个适合我用.. 其他的反正我试了都比这个要麻烦

首先下载:rlwrap-0.37.tar.gz (这个只有245KB)

下载地址:http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.37.tar.gz

然后呢上传到linx 

开始解压和安装rlwrap

[root@mypl ~]# tar -zxvf rlwrap-0.37.tar.gz

[root@mypl ~]# cd rlwrap-0.37

[root@mypl rlwrap-0.30]# ./configure

[root@mypl rlwrap-0.30]# make

[root@mypl rlwrap-0.30]# make install

[root@mypl rlwrap-0.30]# rlwrap

Usage: rlwrap [options] command ...

Options:

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

  -A               --ansi-colour-aware

  -b <chars>             --break-chars=<chars>

  -c               --complete-filenames

  -C <name|N>         --command-name=<name|N>

  -D <0|1|2>             --history-no-dupes=<0|1|2>

  -f <completion list>   --file=<completion list>

  -F <format string>     --history-format=<format string>

  -h               --help

  -H <file>           --history-filename=<file>

  -i               --case-insensitive

  -l <file>           --logfile=<file>

  -n               --no-warnings

  -p[ANSI colour spec]   --prompt-colour[=ANSI colour spec]

  -P <input>             --pre-given=<input>

  -q <chars>             --quote-characters=<chars>

  -m[newline substitute]     --multi-line[=newline substitute]

  -r               --remember

  -v               --version

  -s <N>             --histsize=<N> (negative: readonly)

  -t <name>           --set-term-name=<name>

最后设置一下环境变量就好啦

root@mypl rlwrap-0.30]# vi /home/oracle/.bash_profile

在最后添加下面两行:

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

然后wq保存退出;

好了到这就结束了,赶紧开始oracle之旅吧
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: