經過了重重險阻和煩人的事前準備工作,終於走到這一步了...

讓我們開始安裝 Debian GNU/Linux 吧!

這裡的範例是以 CD-ROM 來安裝 Debian GNU/Linux。如果您是使用軟碟片來安裝的話,不用太擔心,步驟幾乎是一模一樣的。

在以光碟開機後,會出現這個歡迎畫面。按下 <Enter> 來直接開機,或是按下 <F3> 來指定開機的參數。

如果您想使用 Kernel 2.4.18 的核心,在按下 <F3> 後,鍵入 bf24 <Enter> 即可,否則將會以 Kernel 2.2.20 來安裝。

使用軟碟片來安裝的人在下載時就要選定所使用的核心,所以沒有這些選項的。

如果您的電腦無法正確顯示 Linux 的圖形介面(如某些 Notebook)、或是您的電腦的速度不夠快,可以使用 video=vga16:off 這個參數來進入純文字的安裝模式,但是這樣一來就不能使用中文的安裝介面了。

如果安裝程式無法支援某些 RAID 控制卡,像是 Adaptec-2400A 之類的,可以在這裡使用 bf2.4 flavor 選項,再用磁片來載入它的驅動程式。

                  Welcome to Debian GNU/Linux 3.0!

This is a Debian CD-ROM. Keep it available once you have installed
your system, as you can boot from it to repair the system on your hard
disk if that ever becomes necessary (press <F3> for details).

For a "Safe" installation with kernel 2.2.20, you can press <ENTER> to begin.
If you want additional features like modern hardware support, specify a
defferent boot flavor at the poot prompt (press <F3> to get an overview).
If you run into trouble or if you already have questions, press <F1>
for quick installation help.

WARNING: You should completely back up all of your hard disks before
    proceeding. The installation procedure can completely and irreversibly
    erase them! If you haven't made backups yet, remove the CD-ROM 
    from the drive and press <RESET> or <Control-Alt-Del> to get back to
    your old system.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent 
permitted by applicable law. For copyright information, press <F10>.

Press <F1> for help, or <ENTER> to boot.

boot: _

那麼在這裡就輸入 bf24 video=vga16:off 開機了。

接下來出現的是歡迎畫面。

您可以在安裝過程中隨時按下 <Ctrl><Alt><Del> 來中斷安裝並重新開機。

☆ 如果您要在安裝 Debian GNU/Linux 之前還要先做一些設定,如:分割硬碟,

  可以在任何時刻按下 <Alt><F2> 進入 CLI (Command Line Interface) 來進行這些設定。

  設定完畢後可以按 <Alt><F1> 回到原始安裝畫面哦!

我們就來開始一步一步安裝 Debian GNU/Linux 吧:

 
在分割磁碟後而未 Format 之前,如果您有記錄舊的磁碟分割表的話,被刪除磁區裡的所有檔案還是可以完完全全救回來!請參考 SPFDisk 官方網站 上的說明。
建議您在安裝之前就規劃好要如何分割您的磁碟了。如果能事先分割好您的磁碟那就更好了。
注意 Linux 的 Partition System ID 是 83,而 Linux Swap 的是 82。
 
如果您像筆者一樣將 MS Windows 2000 的 pagefile.sys 及 Linux 的 Swap 拿來共用的話,
在這裡就選擇「Do Without a Swap partition」吧!
   
注意: 磁碟分割區一旦 Format 了,事後想反悔就來不及囉!
 
在這裡如果您是使用 bf24 開機的話,可以選擇將磁碟區格式化為 Ext2、Ext3 或是 Reiserfs 這三種格式。
建議是選擇 Ext3 啦!Reiserfs 似乎要加上 Patch 才能使用 Quota 的功能呢!
 
如果您不是使用 bf24 開機的話,在日後昇級 Kernel 後還是可以透過
tune2fs -J /dev/hdX#
來將 Ext2 轉換成 Ext3。
 
如果您事後想把 Ext3 轉換回 Ext2,可以試試以下指令:
tune2fs -O ^has_journal /dev/hdX#
fsck.ext2 -f /dev/hdX#
 
如果您想使用 XFS 的話,請到這 裡下載 Debain GNU/Linux 的 XFS 安裝光碟。
 
接下來就是將剛才分割完的磁碟區掛載為 / 目錄。
如果您還要繼續掛載別的如 /var 目錄,就繼續選擇 Initialize a Linux Partition 然後進行掛載即可。
 
它是在 編譯 Kernel 後所出現的。這時您要指定安裝程式要如何取得模組檔案,
如:光碟片、軟碟、或是透過網路安裝。
 
如果您不知道您需要哪一個模組,那麼暫時不要設定也可以。
(但是建議至少要載入網路卡的模組。我就說事前的準備工作很重要的嘛~)
 
如果您所安裝的 Linux 版本不支援您的網路卡的話,您可以在安裝完 Linux 後再想辨法編譯您的網路卡驅動程式,
或是乾脆去借張已支援的網路卡來暫用。
因為 Debian GNU/Linux 沒了網路威力就減半了呀!
 
您可以在安裝完畢之後再使用 modconf 叫出這個畫面。
或者您也可以到時再直接修改 /etc/modules 來新增模組。
在最糟糕的情況之下,等安裝完 Debian 再來編譯模組也不遲。
 
建議:您在這裡不妨可以考慮載入以下模組:
 
o kernel/drivers/char/agp 內的 agpgart:讓系統支援 AGP 加速。
 
o kernel/drivers/net 內的相關模組:網路卡的模組全在裡面了。
 
o kernel/drivers/net/wireless內的相關模組:無網網路卡的相關模組。
 
o kernel/drivers/sound 內的相關模組:音效卡的模組全在裡面了。
 
o kernel/drivers/usb 內的 hid:讓 hotplug 等 USB 裝置管理程式可以順利驅動 USB 的搖桿。
 
o kernel/arch/i386/kernel 內的 apm:讓系統可以在關機時自行關閉電源。
     
在這裡可以設定:
 
HostName:
這台電腦的『主機名稱』。依自己喜好想一個吧!
是否使用 DHCP:
DHCP Server 是用來自動替用戶端指定如:IP 位址、Netmask、Gateway、Domain Name、DNS Server 等等的資訊的,
如果不曉得的話,大多是 Yes。(不過您的網路大概是沒有 DHCP Server 吧?)
不過筆者喜歡使用固定 IP,所以在這裡筆者大多還是設 No。
本機的 IP 位址:
不曉得的話就設定為 192.168.1.X 吧!X 為 2 至 254。
1 可能被您的 ADSL Modem(像是 Hinet ADSL Modem)佔去了,
而 255 以後不能使用。
設定 Netmask:
Netmask 是用來判別某個 IP 的電腦是否和您位於同一個區域網路上。
不曉得的話就設定為 255.255.255.0。
設定 Gateway:
指定電腦要對區域網路之外連線時所使用的 Router 的 IP 位址。
不曉得的話就留白吧!
注意:PPPoE 使用者務必要留白!除非您知道如何修改 Routing Table!
設定 Domain Name:
不曉得的話就留白吧!
設定 DNS Server 的 IP Address:
不曉得的話就留白吧!
如果是使用 PPPoE 來連接 Internet 時,會自動指定這個位址。
 
大概做如此設定是沒有問題的。事後可以利用 dpkg-reconfig etherconf 來修改這些設定。
 
如:光碟片、軟碟、或是透過網路安裝。
這時在安裝的則是一套 Linux 最最基本的套件了,全部大約佔 110 MB 的硬碟空間。
   
不過忘了做也沒有關係,也有很多種方法可以讓 Debian GNU/Linux 順利開機的。
 

其實目前為止安裝程式只走了一半。重開機後還有後半段要努力呢!

如果這時無法順利重新開機,大多是在建立 LILO 時出了問題。沒關係,我們使用緊急修復模式開機:

先從光碟機開機後,(按下 <F3> 可以查看其它的啟動方法)
在 boot: 那裡輸入 rescue root=/dev/hda1;
如果是 bf24 則是輸入:rescbf24 root=/dev/hda1。
在這裡的 /dev/hda1 是 Linux 所安裝的分割區位置,依您所規劃的磁碟分割而定。
這樣子應該就可以正常開機了。而 LILO 的問題等開完機後再來修。

接下來續繼我們的安裝工作:

GMT:如果不曉得它是什麼,或是您的電腦中還有 MS Windows 系統,那還是設 No 好了。
事後可以利用 tzsetup -y -g 再來修改這些設定。
   
但是可能和一些老舊程式會不相容。筆者一直都是選「是」的啦,也沒出過任何問題。
事後可以利用 dpkg-reconfigure passwd 再來修改這些設定。
   
這樣子在遭遇別人的暴力攻擊時不會一下子就垮掉了。
建議是英文大小寫+數字+特殊符號,至少 8 個字以上,這樣子可以在受到暴力攻擊時拖上一點時間。
 
只有在最不得已的時候才會切換到管理者去。(慘痛經驗太多了)。
如果您要現在建立一個一般使用者帳號就選「是」吧!
也可以日後再找機會來建立一般使用者帳號。
註:在 Debian GNU/Linux 裡大多是用 adduser 來新增使用者哦!
   
我們會在有需要時才會一點一點得安裝新套件,所以現在先選「否」跳過吧!
 
一樣,我們現在還沒必要安裝新的套件,所以選「取消」跳過去吧!
 
一樣,選「否」跳過去吧!
 
一樣,選「否」跳過去吧!
   
Debian 的 Package 都是以 .deb 檔案結尾的,
所以在這裡問的是要不要把剛才所下載的 Debian 套件移除掉以節省硬碟空間。
因為我們沒有並沒有下載任何新的 Debian 套件,所以選「是」或「否」都是一樣的。
 
所以在這裡要設定 exim 的運作方式。
這裡有 5 個選項,如果不曉得的話,選 4 吧!
 
 (1) Internet site; mail is sent and received directly using SMTP. If your
     needs don't fit neatly into any category, you probably want to start
     with this one and then edit the config file by hand.
 (2) Internet site using smarthost: You receive Internet mail on this
     machine, either directly by SMTP or by running a utility such as
     fetchmail. Outgoing mail is sent using a smarthost. optionally with
     addresses rewritten. This is probably what you want for a dialup
     system.
 (3) Satellite system: All mail is sent to another machine, called a "smart
     host" for delivery. root and postmaster mail is delivered according
     to /etc/aliases. No mail is received locally.
 (4) Local delivery only: You are not on a network.  Mail for local users
     is delivered.
 (5) No configuration: No configuration will be done now; your mail system
     will be broken and should not be used. You must then do the
     configuration yourself later or run this script, /usr/sbin/eximconfig,
     as root. Look in /usr/share/doc/exim/example.conf.gz

Select a number from 1 to 5, from the list above.
Enter value (default=`1', `x' to restart): _
之後,便要設定寄給 root 的信由誰代收了:
Mail for the `postmaster' and `root' accounts is usually redirected
to one or more user accounts, of the actual system administrators.
By default, I'll set things up so that mail for `postmaster' and for
various system accounts is redirected to `root', and mail for `root'
is redirected to a real user.  This can be changed by editing /etc/aliases.

Note that postmaster-mail should usually be read on the system it is
directed to, rather than being forwarded elsewhere, so (at least one of)
the users you choose should not redirect their mail off this machine.

Which user account(s) should system administrator mail go to ?
Enter one or more usernames separated by spaces or commas .  Enter
`none' if you want to leave this mail in `root's mailbox - NB this
is strongly discouraged.  Also, note that usernames should be lowercase!
Enter value (`x' to restart):
事後可以利用 /usr/sbin/eximconfig 再來修改這些設定。

到這裡,Debian 的安裝工作大功告成!這時,可以用 root 登入進來看一下什麼是 Debian GNU/Linux 了。

或者也可以按下 <Ctrl><Alt><Del> 重新開機,使用備份軟體把 Debian GNU/Linux 備份起來再說。