試驗環境:
試驗環境 | 軟體版本 |
---|---|
作業系統 | CentOS 7 |
ogg安裝目錄 | /home/oracle/ggs |
資料庫 | oracle |
- 使用 oracle 使用者登陸 CentOS
- 在 /home/oracle 目錄建立 info.txt 檔案
注:請根據實際環境更改目錄,檔案應與ogg目錄同級
// 建立 info.txt 檔案
[[email protected] ~]$ touch info.txt
// 編輯 info.txt 檔案
[[email protected] ~]$ nano info.txt
[[email protected] ~]$ chmod +x info.txt
添加配置:
sh date
start mgr
- 在 /home/oracle 目錄建立 startmgr.sh 檔案
// 建立 info.txt 檔案
[[email protected] ~]$ touch startmgr.sh
// 編輯 info.txt 檔案
[[email protected] ~]$ nano startmgr.sh
[[email protected] ~]$ chmod +x startmgr.sh
添加配置:
/home/oracle/ggs/ggsci paramfile /home/oracle/info.txt >> /home/oracle/ggstartoutput.txt
- 切換到 root 使用者,編輯 /home/etc/rc.local 檔案
[[email protected] etc]# nano rc.local
添加配置:
su - oracle -c “/home/oracle/startmgr.sh”
- 測試
停止 mgr 程序
用root使用者執行:su - oracle -c “/home/oracle/startmgr.sh”
檢視 mgr 程序是否啟動