解決linux oracle shell上下箭呼叫歷史命令
大家都知道linux下的shell環境中,使用sqlplus進行工作的時候無法像在windows環境下的使用上下鍵進行歷史命令切換,確實非常不方便,還好,有了rlwrap這個玩意兒,按照後進行簡單的環境配置,就可以解決這個問題了。
版本 rhel5u4
1、下載進行安裝
configure-->make-->make install
Last login: Sun Nov 28 20:21:41 2010
[root@gtlions ~]# ls
anaconda-ks.cfg Desktop install.log install.log.syslog rlwrap-0.37 rlwrap-0.37.tar.gz
[root@gtlions ~]# cd rlwrap-0.37
[root@gtlions rlwrap-0.37]# ls
aclocal.m4 BUGS completions configure COPYING filters Makefile.am NEWS README test tools
AUTHORS ChangeLog config.h.in configure.ac doc INSTALL Makefile.in PLEA src TODO
需要一下rpm包:
readline-5.1-3.el5
readline-devel-5.1-3.el5
readline-5.1-3.el5
readline-devel-5.1-3.el5
[root@gtlions rlwrap-0.37]# ./configure
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make sets $(MAKE)... (cached) yes
checking whether build environment is sane... yes
checking for style. of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style. of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style. of gcc... (cached) gcc3
checking how to run the C preprocessor... gcc -E
checking for perl... /usr/bin/perl
checking for strip... strip
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking libutil.h usability... no
checking libutil.h presence... no
checking for libutil.h... no
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking for sys/wait.h... (cached) yes
checking sys/resource.h usability... yes
checking sys/resource.h presence... yes
checking for sys/resource.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for stdint.h... (cached) yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking getopt.h usability... yes
checking getopt.h presence... yes
checking for getopt.h... yes
checking regex.h usability... yes
checking regex.h presence... yes
checking for regex.h... yes
checking curses.h usability... yes
checking curses.h presence... yes
checking for curses.h... yes
checking termcap.h usability... yes
checking termcap.h presence... yes
checking for termcap.h... yes
checking for term.h... yes
checking for ncurses/term.h... yes
checking argument type of tputs putc function... int
checking whether your getopt() correctly understands double colons in option string... yes
checking for an ANSI C-conforming const... yes
checking for pid_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking whether gcc needs -traditional... no
checking return type of signal handlers... void
checking for getopt_long... yes
checking for getopt_long... (cached) yes
checking for isastream... yes
checking for mkstemp... yes
checking for pselect... yes
checking for putenv... yes
checking for readlink... yes
checking for sched_yield... yes
checking for setenv... yes
checking for setitimer... yes
checking for setsid... yes
checking for setrlimit... yes
checking for sigaction... yes
checking for snprintf... yes
checking for strlcpy... no
checking for strlcat... no
checking for strnlen... yes
checking for system... yes
checking for openpty in -lutil... yes
checking for openpty... yes
checking for getpty... no
checking for grantpt... yes
checking for unlockpt... yes
checking for getpt... yes
checking for pty/tty type... checking pty.h usability... yes
checking pty.h presence... yes
checking for pty.h... yes
OPENPTY
configure: checking for pty ranges...
checking for tgetent... no
checking for tgetent in -lcurses... yes
checking for readline in -lreadline... yes
checking whether your readline headers know about rl_set_screen_size... yes
checking whether your readline library knows about rl_set_screen_size... checking for rl_set_screen_size... yes
checking whether your readline knows about rl_variable_value... yes
checking whether your readline knows about rl_readline_version... yes
Will rlwrap find command's working directory under /proc/
checking for /proc/4274/cwd/configure.ac... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating filters/Makefile
config.status: creating doc/Makefile
config.status: creating src/Makefile
config.status: creating doc/rlwrap.man
config.status: creating config.h
config.status: executing depfiles commands
Now do:
make (or gmake) to build rlwrap
make check for instructions how to test it
make install to install it
[root@gtlions rlwrap-0.37]# make
make all-recursive
make[1]: Entering directory `/root/rlwrap-0.37'
Making all in doc
make[2]: Entering directory `/root/rlwrap-0.37/doc'
sed -e 's#@DATADIR@#/usr/local/share#' rlwrap.man > rlwrap.1
make[2]: Leaving directory `/root/rlwrap-0.37/doc'
Making all in src
make[2]: Entering directory `/root/rlwrap-0.37/src'
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT signals.o -MD -MP -MF .deps/signals.Tpo -c -o signals.o signals.c
mv -f .deps/signals.Tpo .deps/signals.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT readline.o -MD -MP -MF .deps/readline.Tpo -c -o readline.o readline.c
mv -f .deps/readline.Tpo .deps/readline.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT pty.o -MD -MP -MF .deps/pty.Tpo -c -o pty.o pty.c
mv -f .deps/pty.Tpo .deps/pty.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT completion.o -MD -MP -MF .deps/completion.Tpo -c -o completion.o completion.c
mv -f .deps/completion.Tpo .deps/completion.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT term.o -MD -MP -MF .deps/term.Tpo -c -o term.o term.c
mv -f .deps/term.Tpo .deps/term.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT ptytty.o -MD -MP -MF .deps/ptytty.Tpo -c -o ptytty.o ptytty.c
mv -f .deps/ptytty.Tpo .deps/ptytty.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c
mv -f .deps/utils.Tpo .deps/utils.Po
gcc -DHAVE_CONFIG_H -I. -I.. -DDATADIR=\"/usr/local/share\" -g -O2 -MT string_utils.o -MD -MP -MF .deps/string_utils.Tpo -c -o string_utils.o string_utils.c
string_utils.c: In function
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15688952/viewspace-695575/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 解決Oracle Linux下SQL*Plus無法使用上下箭頭顯示歷史命令的問題OracleLinuxSQL
- Shell歷史命令
- rlwrap實現鍵盤上下箭頭,調出歷史執行的SQL命令SQL
- linux歷史命令Linux
- Oracle中檢視sql命令歷史,檢視rman命令歷史OracleSQL
- 利用Uniread 解決 Linux下的SQL*Plus 命令列歷史回撥功能LinuxSQL命令列
- uniread,讓你的sqlplus在LINUX下也能用箭頭回撥歷史命令SQLLinux
- Oracle歷史Oracle
- Linux中禁用命令歷史記錄Linux
- Python呼叫shell命令Python
- Linux下快速執行歷史命令的方法Linux
- Git基本命令 -- 歷史Git
- git檢視歷史命令Git
- 如何隱藏你的 Linux 的命令列歷史Linux命令列
- History(歷史)命令用法 15 例
- Linux中多種方法實時記錄歷史命令Linux
- 4個快速查詢Linux歷史命令的技巧(history)Linux
- Linux設定歷史命令顯示執行時間Linux
- Git(7)-- 檢視提交歷史(git log 命令詳解)Git
- shell指令碼自動記錄登入使用者ip和歷史命令指令碼
- Linux發展歷史Linux
- [oracle] 查詢歷史會話、歷史執行計劃Oracle會話
- 技術決定歷史
- 使用shell測試歷史資料樣本
- Oracle公司發展歷史Oracle
- linux下sqlplus調出歷史命令--rlwrap介紹LinuxSQL
- rlwrap - 支援oracle下sqlplus歷史命令的回撥功能OracleSQL
- 去掉input number的上下箭頭
- 【HIVE】hive 使用shell指令碼跑歷史資料Hive指令碼
- Oracle檢視歷史TOP SQLOracleSQL
- Linux Shell程式設計(1) – Bash 的基本功能:別名、快捷鍵、歷史命令、輸出重定向、管道符、Shell中特殊符號Linux程式設計符號
- oracle中使用rlwrap,將命令列歷史的檢視變為可能Oracle命令列
- Linux平臺SQL*PLUS利用鍵盤上的上下箭頭LinuxSQL
- windows下 power shell啟動,呼叫ssh命令Windows
- CodeMan的Linux問題解決與技巧集錦:Linux Shell下命令su出現authentication failure解決方法...LinuxAI
- 教你一些Linux中隱藏bash歷史命令的小技巧Linux
- git log提交歷史詳解Git
- websocket 歷史及使用詳解Web