在 Red Hat Enterprise Linux AS V3.0 上安裝 Oracle 10g 資料庫

來源:互聯網
上載者:User
  一、安裝過程參考Oracle網站上的文章 《在 Linux x86 上安裝 Oracle 資料庫 10g》:     http://www.oracle.com/technology/global/cn/pub/articles/smiley_10gdb_install.html   二、安裝結束後,設定自動啟動Oracle服務: 建立或修改 /etc/oratab 檔案:  
orcl:/u01/app/oracle/product/10.2.0/db_1:Y
   其中,orcl 是Oracle資料庫的sid,/u01/app/oracle/oracle/product/10.2.0/db_1是Oracle資料庫的Oracle_home,Y表示要求在系統啟動的時候啟動Oracle資料庫。 在 /etc/rc.d/init.d 下建立自動啟動指令碼 oracle:
#!/bin/bash## chkconfig: 35 50 50# description: Oracle database server# # source function library. /etc/init.d/functions ## Change the value of ORACLE to the login name of the# oracle owner at your site.#ORACLE=oracle ## Change the value of ORACLE_HOME to specify the correct Oracle home# directory for your installation.#ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 export ORACLEexport ORACLE_HOME RETVAL=0prog="Oracle" start() {        echo -n $"Starting $prog: "        if [ $UID -ne 0 ]; then                RETVAL=1                failure        else                su - $ORACLE -c "lsnrctl start"                        RETVAL=$?                if [ $RETVAL -eq 0 ]; then                    su - $ORACLE -c "dbstart"                    RETVAL=$?                fi;                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/oracle        fi;        echo         return $RETVAL} stop() {        echo -n $"Stopping $prog: "        if [ $UID -ne 0 ]; then                RETVAL=1                failure        else                su - $ORACLE -c "dbshut"                RETVAL=$?                if [ $RETVAL -eq 0 ]; then                    su - $ORACLE -c "lsnrctl stop"                    RETVAL=$?                fi;                                [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/oracle        fi;        echo        return $RETVAL} restart(){    stop    start} case "$1" in start)    start    ;; stop)    stop    ;; restart)    restart    ;; status)    status oracle    RETVAL=$?    ;; *)    echo $"Usage: $0 {start|stop|status|restart}"    RETVAL=1esac exit $RETVAL
 安裝 service:
chmod 755 /etc/rc.d/init.d/oraclechkconfig --add oracle

聯繫我們

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