linux下單例項資料庫開機自啟動設定
root@org54 ~]# vi/etc/oratab --把N改為Y,如下提示
# This file is used by ORACLEutilities. It is created by root.sh
# and updated by the Database ConfigurationAssistant when creating
# a database.
# A colon, ':', is used as the fieldterminator. A new line terminates
# the entry. Lines beginning with a pound sign, '#', arecomments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are thesystem identifier and home
# directory of the databaserespectively. The third filed indicates
# to the dbstart utility that the databaseshould , "Y", or should not,
# "N", be brought up at systemboot time.
#
# Multiple entries with the same$ORACLE_SID are not allowed.
#
#
#game:/u01/app/oracle/product/10.2.0/db_1:N --dbca建立庫時註冊的預設資訊
--格式:$ORACLE_SID:$ORACLE_HOME:<N|Y>
--<N|Y>選項代表開機是否自啟動
instance_name:/u01/app/oracle/product/10.2.0/db_1:Y
2.編輯/dbstart
[oracle@org54 bin]$ cd$ORACLE_HOME/bin
[oracle@org54 bin]$ ls-ll |grep dbstart
-rwxr-xr-x 1 oracle oinstall 10415 Jan 1 2000 dbstart
[oracle@org54 bin]$ vi dbstart
--dbstart為開機自啟動指令碼,讓系統開機就去執行dbstart指令碼檔案,它會去讀oratab檔案,讀到Y就會把對應的例項開機自啟動
找到並修改ORACLE_HOME_LISTNER=$ORACLE_HOME根據設定的監聽調整路徑
3.編輯/rc.d/rc.local
[root@org54 ~]# vi/etc/rc.d/rc.local --新增如下兩行資訊,啟動例項、啟動監聽
#!/bin/sh
#
# This script will be executed *after* allthe other init scripts.
# You can put your own initialization stuffin here if you don't
# want to do the full Sys V style initstuff.
touch /var/lock/subsys/local
modprobe hangcheck-timer hangcheck_tick=30hangcheck_margin=180
su - oracle -c " /u01/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start"
su - oracle -c " /u01/app/oracle/product/11.2.0/dbhome_1/bin/dbstart"
4.重啟驗證一下
#reboot
小結:
linux下設定例項自啟動有關指令碼:
oratab:例項是否自啟動的註冊資訊
dbstart:開機啟動指令碼檔案會讀取oratab資訊
rc.local:開機後立即要做的檔案
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/25116248/viewspace-1797173/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- TongWeb在Linux下設定開機自啟動WebLinux
- Linux CentOS開機啟動項設定命令:chkconfigLinuxCentOS
- Linux MySQL 服務設定開機自啟動LinuxMySql
- Linux Redis 服務設定開機自啟動LinuxRedis
- Linux平臺Oracle開機自啟動設定LinuxOracle
- linux設定開機啟動Linux
- windows下redis設定redis開機自啟動WindowsRedis
- 3.1.5.4 啟動例項並mount 資料庫資料庫
- 3.1.5.1 關於啟動資料庫例項資料庫
- linux設定開機自啟動指令碼的最佳方式Linux指令碼
- Linux 下軟體開機自啟動Linux
- win10開機啟動項怎麼設定 win10設定開機啟動項的方法Win10
- win10開機啟動項怎麼設定_如何設定win10系統開機啟動項Win10
- 3.1.5.3 在不掛載資料庫的情況下啟動例項資料庫
- win10開機啟動項怎麼設定 win10新增開機啟動項Win10
- 設定開機自啟動nginx和httpdNginxhttpd
- Ubuntu 設定開機自啟動指令碼Ubuntu指令碼
- Oracle 單機架構下,多個例項可以同時開啟同一套資料庫檔案嗎?Oracle架構資料庫
- 2.4.15 Step 14: (可選) 開啟自動例項啟動
- windows10開機啟動項在哪裡_windows10開機啟動項怎麼設定Windows
- win10開機啟動項如何管理_win10開機啟動項怎麼設定Win10
- win10怎麼新增開機啟動項 win10開機啟動項如何設定Win10
- win10開機啟動項怎麼設定 win10開機啟動項在哪裡Win10
- win10開機啟動項管理在哪裡設定 win10如何管理開機自啟動軟體Win10
- frp設定開機自啟FRP
- Linux部署的WGCLOUD的探針agent如何設定開機自啟動LinuxGCCloud
- Oracle Linux 7.1 透過systemctl將Weblogic設定為開機自啟動OracleLinuxWeb
- linux server設定開機自動連線WIFILinuxServerWiFi
- systemctl 命令設定開機自啟動失敗
- centos7.5 設定Mysql開機自啟動CentOSMySql
- oracle資料庫跨平臺(AIX)從RAC恢復至(linux)下的單例項Oracle資料庫AILinux單例
- Linux 新增開機自啟動Linux
- Linux開機自啟動配置Linux
- 設定windows系統下的tomcat開機自啟WindowsTomcat
- 設定msyqlphp-fpm開機自動啟動指令碼PHP指令碼
- Javaweb的例項--訂單管理系統--設計資料庫JavaWeb資料庫
- win10開機啟動項優化設定_win10開機啟動項怎麼優化Win10優化
- win10開機啟動項資料夾路徑_win10開機啟動項資料夾在哪Win10
- MacOS技巧|Mac上設定開機啟動項小技巧Mac