[转]sqlplus中不能上下键选择前一条命令解决方法
2013-04-02 00:52
393 查看
安装一个叫rlwrap的工具:http://utopia.knoware.nl/~hlub/uck/rlwrap/已经上传到本文附件:后缀为.rar,主要是51cto不支持.tar.gz后缀,实际上是一个tar.gz压缩包 tar -zxvf rlwrap-0.30.tar.gz
cd rlwrap-0.30
./configure
make
make install
注:ubuntu 可以 apt-get install rlwrap 安装
把下两句写入运行oracle的用户.bash_profle(~/.bashrc都得)文件中:alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman' 这样就能使用上下键切换到历史命令去了。同时还能使用回退键修改错误的命令。否则需要使用ctrl+回退键才行。 要使用回退键,还有另外一个方法:在oracle用户的.bash_profile 中添加stty erase ^h再执行# . ~oracle/.bash_profile但是这样不能使用上下键。本文出自 “jasonyong” 博客,请务必保留此出处/article/6927428.html
linux中的ORACLE
sqlplus默认不支持向系统或WINDOWS那要向上、向下查询命令记录
不果可以安装一个程序来支持
它就是 rlwrap
从网上找个安装包,解压
一:安装rlwrap
checking for tgetent in -lncurses... no
checking for tgetent in -ltermcap... no
configure: WARNING: No termcap nor curses library found
checking for readline in -lreadline... no
configure: error:
You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program!
那你就要安装readline-devel-5.1-1.1.i386包
但安装它还要有个前提是已安装
libtermcap-devel-2.0.8-46.1.i386包
系统中如果安装就查看是否安装devel版如
readline-5.1-1.1
readline-devel-5.1-1.1
二配置环境变量
cd rlwrap-0.30
./configure
make
make install
注:ubuntu 可以 apt-get install rlwrap 安装
把下两句写入运行oracle的用户.bash_profle(~/.bashrc都得)文件中:alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman' 这样就能使用上下键切换到历史命令去了。同时还能使用回退键修改错误的命令。否则需要使用ctrl+回退键才行。 要使用回退键,还有另外一个方法:在oracle用户的.bash_profile 中添加stty erase ^h再执行# . ~oracle/.bash_profile但是这样不能使用上下键。本文出自 “jasonyong” 博客,请务必保留此出处/article/6927428.html
linux中的ORACLE
sqlplus默认不支持向系统或WINDOWS那要向上、向下查询命令记录
不果可以安装一个程序来支持
它就是 rlwrap
从网上找个安装包,解压
一:安装rlwrap
[root@oracle11g ~]# tar -zxvf rlwrap-0.30.tar.gz [root@oracle11g ~]# cd rlwrap-0.30 [root@oracle11g rlwrap-0.30]# ./configure [root@oracle11g rlwrap-0.30]# make [root@oracle11g rlwrap-0.30]# make install如果在make 时提示
checking for tgetent in -lncurses... no
checking for tgetent in -ltermcap... no
configure: WARNING: No termcap nor curses library found
checking for readline in -lreadline... no
configure: error:
You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program!
那你就要安装readline-devel-5.1-1.1.i386包
但安装它还要有个前提是已安装
libtermcap-devel-2.0.8-46.1.i386包
系统中如果安装就查看是否安装devel版如
readline-5.1-1.1
readline-devel-5.1-1.1
二配置环境变量
[root@oracle11g rlwrap-0.30]# vi /home/oracle/.bash_profile 添加 alias sqlplus='rlwrap sqlplus' alias rman='rlwrap rman'
Linux下的SQL Plus 终于可以像Windows下的那样使用了。
相关文章推荐
- Oracle sqlplus中不能上下键选择前一条命令解决方法
- 【转】sqlplus中不能上下键选择前一条命令解决方法
- sqlplus中不能上下键选择前一条命令解决方法
- sqlplus中不能上下键选择前一条命令解决方法
- [转]sqlplus中不能上下键选择前一条命令解决方法
- 解决sqlplus中不能上下翻阅历史命令的问题
- Linux环境下的SQL*PLUS及RMAN中不能使用上下方向键查看命令历史的解决方法
- rlwrap解决sqlplus上下键和backspace键找历史命令
- kvm虚拟机不能使用virsh shutdownw命令关闭虚拟机的解决方法
- VC++6.0选择打开文件命令时停止工作解决方法
- Linux下sqlplus不能使用光标箭头解决方法
- 解决:编辑一条彩信,附件选择添加音频,返回到编辑界面选择play,不能播放,没有声音
- vs2015第二次装安装不能选择路径问题解决方法
- Oracle下sqlplus无法使用命令退格删除和历史记录的解决方法--使用rlwrap
- Ubuntu vi 上下左右变ABCD问题及不能用退格键问题的解决方法
- VC++6.0选择打开文件命令时停止工作解决方法
- cmd命令不能用的解决方法
- Linux Oracle下sqlplus无法使用命令退格删除和历史记录的解决方法(使用rlwrap)
- android keytool 不是内部命令或外部命令在 (win7下不能用的解决方法)
- 修改了etc下面sudoers权限造成SUDO命令不能用解决方法