Latest News

Home » 電腦技術問題 » 【Linux】在 Debian 9 (Stretch) 中啟用消失的 rc.local

【Linux】在 Debian 9 (Stretch) 中啟用消失的 rc.local


強大的信心,能克服來自內心的惡魔,產生無往不勝的勇氣。
寧願辛苦一陣子,不要辛苦一輩子。
遠大的目的非常重要,一定要有成功的企圖心,而且越大越好。
人生最大的敵人是自己怯懦。
每天只看目的,別老想障礙。


 Debian 9 (Stretch)預設不使用 rc.local, 所以會找不到/etc/rc.local 檔.
但是還是有辦法可以使用rc.local

首先自己先創造/etc/rc.local檔 :
————————————————
# cat <<EOF >/etc/rc.local

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

exit 0
EOF
————————————————
設定可執行權限:

# chmod +x /etc/rc.local

然後啟用rc-local 這個服務即可

# systemctl start rc-local
————————————————
觀察rc-local 這個服務是否已經啟動:

# systemctl status rc-local

● rc-local.service – /etc/rc.local Compatibility
   Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)
  Drop-In: /lib/systemd/system/rc-local.service.d
       └─debian.conf
   Active: active (exited) since Wed 2017-08-16 14:12:44 CST; 5s ago
  Process: 1256 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS)

Aug 16 14:12:44 vmsrv systemd[1]: Starting /etc/rc.local Compatibility…
Aug 16 14:12:44 vmsrv systemd[1]: Started /etc/rc.local Compatibility.
————————————————
參考資料: Where is rc.local in Debian 9 (Debian Stretch)
https://stackoverflow.com/questions/44797694/where-is-rc-local-in-debian-9-debian-stretch

About

發佈留言

slot gacor 777 slot gacor maxwin slot mahjong https://smpit.alhikmahmp.sch.id/ https://darululumponcol.com/ https://xlcarsgroup.co.uk/sbobet/ https://xlcarsgroup.co.uk/sababet/ https://smalabunpatti.sch.id/agencasino/ https://smalabunpatti.sch.id/bandarcasino/ https://zakatydsf.or.id/bolaparlay/ https://zakatydsf.or.id/parlaybola/ Bocoran Situs Terbaru Tiksujp Slot Toto 4D Slot Hongkong Gacor Maxwin Istanapetir Live Casino Terpercaya https://desategalsari.id/pelayanan/ https://mindfuledgeconsulting.com/sbobeterbaik/ https://mindfuledgeconsulting.com/sbobeterpercaya/ Bandar Togel Resmi Situs Slot Gacor 777 Bandar Slot Gacor Maxwin Link Slot Gacor Slot Thailand Gacor Maxwin Slot Thailand Gacor slot maxwin https://likein.id/ Slot Gacor Gampang Menang Slot Gacor 2024 Slot Gacor 2024 Slot Gacor Hari Ini Slot Gacor 2024 Slot Gacor 2024 Slot Gacor 2024 Slot Gacor Gampang Menang Cheat Slot Gacor Situs Resmi Slot 777 Istanapetir Situs Slot Gacor 4D Slot Gacor Thailland Istanapetir slot thailand slot gacor maxwin slot gacor 777 cupangjp slot gacor 777 Cheat Slot Gacor Maxwin Apk Cheat Resmi Slot Gacor Maxwin Slot Gacor Maxwin 2025 Slot Server Tokyo Link Resmi Slot Tergacor Server Thailand 777 Situs Slot gacor Maxwin Terbaru ISTANAPETIR ISTANA PETIR Slot Jp Maxwin Situs Resmi Thailand Slot Resmi Maxwin Server Thailand SLOT GACOR 777 APK SLOT TOTO 4D https://pertanian.hsu.go.id/vendor/ SLOT GACOR SLOT GACOR MAXWIN 777 slot mahjong ways scatter hitam agen slot gacor 777 slot gacor 4d slot toto 4d slot gacor 777 slot gacor 777 slot gacor maxwin slot thailand 777 cupangjp slot toto cupangjp cupangjp cupangjp cupangjp cupangjp cupangjp slot thailand slot gacor cupangjp slot thailand slot luar negeri slot mahjong ways 777 Situs Tergacor 2025 Agen Slot Gacor Maxwin Mahjong Gacor SlotGacor 2025 slot demo slot thailand slot rtp tinggi https://www.opdagverden.dk/ https://pertanian.hsu.go.id/vendor/ https://kesbangpol.sulselprov.go.id/app/ https://kesbangpol.sulselprov.go.id/wp-content/data/ https://kesbangpol.sulselprov.go.id/dashboard/ https://kesbangpol.sulselprov.go.id/vendor/ https://kesbangpol.sulselprov.go.id/assets/ https://info.syekhnurjati.ac.id/vendor/