您好,登錄后才能下訂單哦!
環境:centos6
一:命令記錄
1.使用yum安裝readline-devel
yum install readline-devel
2.源碼編譯安裝rlwrap
# wget http://utopia.knoware.nl/~hlub/rlwrap/rlwrap-0.37.tar.gz
# tar -xf rlwrap-0.37.tar.gz
# cd rlwrap-0.37/
# ./configure
# make && make install
3.設置sqlplus的系統別名:# vim /home/oracle/.bash_profile
在頭部或尾部添加:
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
二:刪除鍵
sqlplus下使用Backspace來刪除字符,使用stty命令重新定義^H,可以在使用sqlplus之前執行stty erase ^H,也可以把這一句放到oracle用戶的.bash_profile文件里。
三:腳本快速配置
#/bin/bash
#description:quick configure the oracle del and history command record
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH
#the centos6 has already installed the readline,so we needn't to install the readline again
#yum install readline
#use the yum to install readline-devel
yum install readline-devel
#use the tar file to install rlwrap
cd /usr/local/src
wget http://utopia.knoware.nl/~hlub/rlwrap/rlwrap-0.37.tar.gz
tar -xf rlwrap-0.37.tar.gz
cd rlwrap-0.37/
./configure
make && make install
#configure the .bash_profile
cat >> /home/oracle/.bash_profile <<EOF
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
stty erase ^H #it used to configure the delete of configure
EOF
參考網址:
http://www.ha97.com/4856.html
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。