CentOS 6.5 下設定Oracle 12c 開機自動啟動

來源:互聯網
上載者:User

CentOS 6.5 下設定Oracle 12c 開機自動啟動

在Linux系統中,安裝好Oracle資料庫服務後,並不像在Windows系統下一樣,Oracle服務在預設情況下會隨時系統的啟動自動啟動。Linux系統中,是需要使用者去手動進行設定,才能實現Oracle開機自動啟動的。本文將一步一步教你如何進行設定。

方法與步驟

首先,必須保證你在CentOS 6.5 Linux中已經安裝好了Oracle 12c,並且手機能啟動Oracle。

1、以root使用者登入到Linux系統

2、鍵入命令“vi /etc/oratab”(使用vi編輯器編輯檔案/etc/oratab),

3、進入vi編輯器後,找到“orcl:/u01/app/oracle/product/12.1.0/dbhome_1:N”,改為“orcl:/u01/app/oracle/product/12.1.0/dbhome_1:Y”。修改完成後,儲存退出vi。

說明:orcl為執行個體名;/u01/app/oracle/product/12.1.0/dbhome_1為oracle安裝目錄;會因安裝的情況不同而有所不同。

4、鍵入命令“vi /etc/rc.d/rc.local”,

5、在vi編輯器中,添加:

su oracle -lc "/u01/app/oracle/product/12.1.0/dbhome_1/bin/lsnrctl start"

su oracle -lc /u01/app/oracle/product/12.1.0/dbhome_1/bin/dbstart

說明:/u01/app/oracle/product/12.1.0/dbhome_1為oracle的安裝目錄,要根據實際情況進行修改。

儲存並退出vi。

重啟試試吧~祝成功!

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.