Centos7如何設置腳本開機自啟動?


1. 在需要設置為開機啟動的腳本中加入必須的chkconfig啟動腳本規范,如下:

#!/bin/bash
# chkconfig: 2345 80 12 # description: auto start shell script

2. 使用chkconfig將腳本加入自動啟動列表

# mv your.sh /etc/rc.d/init.d

# chkconfig /etc/rc.d/init.d/your.sh


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM