在 Linux 系統上自動啟動伺服器
您可以使用 systemd 或 system V 起始設定系統,在 Linux® 作業系統上自動啟動伺服器。
使用 systemd 起始設定自動啟動伺服器
若要使用 systemd 起始設定系統在 Linux® 作業系統上自動啟動伺服器,請配置並執行 dsmserv.rc Script。
開始之前
請確定 /usr/bin/systemctl 或 /bin/systemctl 公用程式已安裝在系統上。
請確定伺服器實例是以名稱與實例擁有者相同的非 root 使用者 ID 來執行。
關於這項作業
您可以使用 dsmserv.rc Script 來自動啟動或停止伺服器實例。
程序
對於您要自動啟動的每一個伺服器實例,請完成下列步驟:
使用 System V 起始設定自動啟動伺服器
若要使用 System V 起始設定系統在 Linux 作業系統上自動啟動伺服器,請配置並執行 dsmserv.rc Script。
開始之前
請確定核心參數設定正確。
請確定伺服器實例在實例擁有者使用者 ID 下執行。
請確定已正確設定存取權和使用者限制。
關於這項作業
dsmserv.rc Script 可用來手動啟動伺服器,或是在 /etc/rc.d/init.d 目錄中新增項目來自動啟動伺服器。 該 Script 與 Linux 公用程式一起運作,例如 CHKCONFIG 及 SERVICE。
程序
對於您要自動啟動的每一個伺服器實例,請完成下列步驟:
範例
此範例使用下列其中一個值:
- 實例使用者是 tsminst1。
- 伺服器實例目錄是 /home/tsminst1/tsminst1。
- dsmserv.rc Script 副本命名為
tsminst1
。 - CHKCONFIG 公用程式用來配置 Script,以在執行層次 3、4 及 5 啟動。
cp /opt/tivoli/tsm/server/bin/dsmserv.rc /etc/rc.d/init.d/tsminst1
sed -i 's/dsmserv_instancename.pid/dsmserv_tsminst1.pid/' /etc/rc.d/init.d/tsminst1
chkconfig --list tsminst1
service tsminst1 supports chkconfig, but is not referenced in
any runlevel (run 'chkconfig --add tsminst1')
chkconfig --add tsminst1
chkconfig --list tsminst1
tsminst1 0:off 1:off 2:off 3:off 4:off 5:off 6:off
chkconfig --level 345 tsminst1 on
chkconfig --list tsminst1
tsminst1 0:off 1:off 2:off 3:on 4:on 5:on 6:off