在CentOS下為sqlplus和rman 添加rlwrap

來源:互聯網
上載者:User

標籤:style   http   os   使用   ar   sp   div   c   on   

在Linux中sqlplus和rman無法像我們在shell中,能使用方向鍵和退格鍵對語句驚醒一些更改。

這實在是很苦惱的事情。不過有rlwrap來對sqlplus和rman進行一些擴充,讓我的操作不那麼苦逼了。下面是在Centos6中安裝rlwarp的方法。 1.安裝readline-devel    shell>su - root    shell>yum install readline-devel 2.下載rlwrap    在http://utopia.knoware.nl/~hlub/uck/rlwrap/ 找到最新的rlwrap源碼包    shell> wget http://utopia.knoware.nl/~hlub/uck/rlwrap/rlwrap-0.41.tar.gz 3.解壓編譯安裝    shell> tar zxvf rlwrap-0.41.tar.gz    shell>./configure    shell>make & make install
 4.如果上面的步驟都沒有報錯了吧,我們就可以為sqlplus添加rlwrap支援了,下面以oracle使用者為例     shell>su - oracle
     shell>vim ~/.bash_profile      為sqlplus和rman添加rlwrap支援,在bash_profile添加如下內容        alias sqlp=‘rlwrap sqlplus‘         alias rman=‘rlwrap rman‘ 5.重新用oracle這個使用者登陸,或者我們應用下.bash_profile,再次使用sqlp和rman就發現可以使用方向鍵和退格鍵了。     應用.bash_profile的兩種方法    shell>./.bash_profile     shell>source .bash_profile

在CentOS下為sqlplus和rman 添加rlwrap

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.