Next Previous Contents

11. 基本系統管理

11.1 網路相關

11.2 Kernel Module相關

相關系統設定檔:/etc/modules、/etc/modutils,/etc/modules.conf

modconf

11.3 開機相關

/etc/inittab

/etc/init.d

/etc/rcN.d

在/etc/rcN.d N=1,2,3,4,5中,會看到一些 S10xxx,S20xxx 這些代表什麼呢?其實就是開機之後的Service啟動檔,怎麼說呢。比如說我希望開機馬上啟動alsa這個service,而大家也知道的,alsa預設聲音是靜音,所以我希望在啟動alsa之後,馬上調整聲音大小。

OK...為了完成這個機制,我們來想這個機制,而假設裡面有一個檔案或是link叫做 S10alsa為alsa的service啟動,那我們寫一個檔案,姑且假設為 volume 而因為這個動作要在alsa之後,所以我們把volume的檔名改成 S11volume... 聰明的你應該看得出來,中間的數字11是不是比S10alsa的10來的大,沒錯,這就是優先順序,以數字小的為先啟動,以此類推...

其實在/etc/rcN.d中不只是S開頭的service 還有K開頭的,K開頭的service主要是關機才會啟動的。比如我寫一個K10rmTmp,主要清除/tmp下的檔案關機的時候,他也會執行這個檔案,把/tmp清光光。

而數字也跟S一樣,所以可以自己寫一些設定檔,比如hdparm...

11.4 其他

11.5 Smart Debian Backup

    if you move all your config and isntall db files to known directories..

        and if you descipline yourself and your users to put data only
        into /usr/local or /home.... than you're all set...

        just backup /etc and /home and /usr/local...
        ( everything else "should have been installed from cdrom" )

        and if you wanna backup pending emails etc..etc..
        more stuff to look in /var/*...

        - problem is people put stuff where they like...
        - some packages still put stuff in what they consider the "right place"
        which may or may not be what you consider the "right place"


        c ya
        alvin
        http://www.Linux-Backup.net

        simplified deb backup should be something like:

        - save it
        - dpkg --get-selections * > /mnt/floppy/backup.pkg.lst
        - backup user tweeked files

        - build your new box from cdrom or floppy

        - restore it
        dpkg --set-selections < /mnt/floppy/backup.pkg.lst
        apt-get update
        apt-get dist-upgrade
        - restore your user tweeked files 
    

11.6 例行工作(經驗談)

- 定期upgrade(apt-get update;apt-get upgrade)


Next Previous Contents