RunLevel

另外,還要注意 /etc/inetd.conf,在這個檔案裡也會啟動某些網路服務程式。

在 Debian GNU/Linux 剛剛安裝完畢後,沒有安裝其它套件之前,在可由 rcconf 控制的開機程式裡,必須要留下來的有:(其它可以關掉沒關係)

而預設在 /etc/inetd.conf 裡所啟動的服務有 Inetd 內建的一些 Internal services 和一個 MTA Daemon,exim。因為一些系統程式會透過本機的 Mail Server (MTA) 來傳送信件給 root,而 Debian 預設以 exim 來擔任這個 MTA 工作。而 Inetd 內建的一些 Internal services 則是無關緊要,把它們全部關掉沒有關係。

而 update-rc.d 來搭配使用。比如說,以下指令會在進入 RunLevel 0、2、3、4、5、6 時啟動 iptables,在進入 RunLevel 0、1、6 時關閉 iptables:

update-rc.d iptables start 98 0 2 3 4 5 6 . stop 20 0 1 6.

Debian GNU/Linux 目前可辨認的 RunLevel 是 0-6,一般可用的 RunLevel 是 1-5,預設 Run Level 為 2,Debian GNU/Linux 與其他發行套件不同的是使用的 RunLevel 與是否啟動網路服務或圖形化介面無關。然而,在 LinuxStandardBase (2.0) 中已經定義出清楚的用途。依照 Debian 系統極力符合 LinuxStandardBase 的政策,這些功能將納入系統中。

0 halt                                                    
1 single user mode                                        
2 multiuser with no network services exported             
3 normal/full multiuser                                   
4 reserved for local use, default is normal/full multiuser
5 multiuser with xdm or equivalent                        
6 reboot                                                  

rcconf

DebianPackages:rcconf 這個套件可以用來設定開機時要執行那些 Script 檔案。

這些 Script 檔都是位於 /etc/init.d,記得要將其屬性變更為『可執行』, DebianPackages:rcconf 才會抓得到哦!

而在 /etc/rcS.d 裡的 Script 並無法由 rcconf 來控管,所以也要注意一下!