安裝完oracle後,使用sqlplus指令行登入oracle,預設不能上下翻看曆史記錄、不能使用backspace删除。下面介紹一個rlwrap工具的安裝過程。
1、下載下傳rlwrap:
wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.42.tar.gz
2、解壓
tar -xvzf rlwrap-0.42.tar.gz
3、安裝:
cd rlwrap-0.42
./configure
這時,在configure時會提示缺少依賴包。
checking for readline in -lreadline... no
configure: error:
You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program!
1)使用yum安裝依賴:
yum install readline-devel
2)執行:
make
make install
4、把下兩句寫入運作oracle的使用者.bash_profle(.bash_history)檔案中:
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
這樣,就可以使用上下翻看曆史指令 和 倒退鍵了。