Linux自動服務


1. 檢查服務情況
    # chkconfig list httpd

2. 將該服務的腳本文件拷到/etc/rc.d/init.d下

3. 添加服務
    # chkconfig --add httpd

4. 刪除服務
    # chkconfig --del httpd

5. 設置服務啟動環境--啟動
    # chkconfig --level 35 httpd on

6. 設置服務啟動環境--關閉
    # chkconfig --level 35 httpd on       //3代表命令行模式加載服務, 5代表圖形模式加載服務

7. 關閉服務
    # chkconfig --level 35 httpd off