oracle中快速實(shí)現(xiàn)命令記錄與刪除鍵,以及使用腳本快速配置

環(huán)境:centos6

在西安等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場(chǎng)前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站制作 網(wǎng)站設(shè)計(jì)制作按需策劃設(shè)計(jì),公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),高端網(wǎng)站設(shè)計(jì),成都全網(wǎng)營(yíng)銷推廣,外貿(mào)網(wǎng)站制作,西安網(wǎng)站建設(shè)費(fèi)用合理。

一:命令記錄

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.設(shè)置sqlplus的系統(tǒng)別名:
# vim /home/oracle/.bash_profile
在頭部或尾部添加:

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

二:刪除鍵

sqlplus下使用Backspace來刪除字符,使用stty命令重新定義^H,可以在使用sqlplus之前執(zhí)行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

參考網(wǎng)址:

http://www.ha97.com/4856.html

當(dāng)前文章:oracle中快速實(shí)現(xiàn)命令記錄與刪除鍵,以及使用腳本快速配置
網(wǎng)站地址:http://muchs.cn/article22/gjgdjc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供云服務(wù)器域名注冊(cè)、商城網(wǎng)站、微信公眾號(hào)、建站公司App設(shè)計(jì)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

商城網(wǎng)站建設(shè)