Debian 3.1 (Sarge) Kernel 2.6

Debina 3.1 r2 Kernel 2.6 インストールmemo。


玄箱用では無いです。玄箱のエントリはこっち。
http://d.hatena.ne.jp/ARCH/20060520



インストーラをダウンロード。
今回は理化学研究所から。速いからね。
http://ftp.riken.go.jp/Linux/debian/debian-cd/3.1_r2/i386/iso-cd/debian-31r2-i386-businesscard.iso


私はVMwareを利用しているのでisoを焼くことはありません。


CD-ROMから起動。
ロゴと共にPress F1 for Help, or ENTER to boot: と表示されるので、
linux26
と入力しEnter。これでKernel 2.6でインストールされます。


Choose LanguageとでますのでEnglishを選択。
日本語で進めてもいいんですが、インストール後に日本語が文字化けしてしまうので。


Choose country or regionとでますのでotherを選択。
AsiaのなかのJapanを選択。


Select a keyboard layoutとでるのでJapaneseを選択。


Configure the network
IPなどはDHCPで自動取得。
Host name:とでますのでホスト名を入力。私はdebianのまま。
Domain name:ドメイン名を入力。私は空のまま。


Partition disks
ディスクの内容を消しますか?
とのことなので、Erase entire disk:-を選択。


パーティションはどう区切る?
とのことなので、All files in one partitionを選択。
ルート以下を全てひとつのパーティションに保存します。


内容確認です。よければ、
Finish partitioning and write changes to diskを選択。
ホントに消してもいいの?と聞いてきますのでYesを選択。


Install the GRUB boot loader to the master boot recoad?
真っ新なHDDだとブートローダが無いので、インストールするか聞いてきます。Yesを選択。


Finish the installationとでますのでContinueを選択。
必要に応じてCD-ROMを抜いてください。
自動的に再起動。


Welcome to your new Debian systemとでますのでOKを選択。


Time zone configuration
時刻設定。
時刻はGMTですか?と聞かれるのでNoを選択。


タイムゾーンはTokyoですか?と聞かれるのでYesを選択。


Enter a password for root
ルートのパスワードの設定。
パスワードを入力しOKを選択。
もういちど聞かれるので再入力しOKを選択。


A user account will be created for you to use instead of
the root account for non-administrative activities.
要は一般ユーザの作成。
Enter a full name for the new user
ユーザネームを入力。アカウント名ではないので注意。


Enter a username for your account
アカウント名を入力。


Enter a password for the new user
パスワードを入力しOKを選択。
もういちど聞かれるので再入力しOKを選択。


Apt configuration
パッケージのダウンロード先を選択します。
httpを選択。
Japanを選択。
ftp.riken.go.jpを選択。


HTTP proxy
プロキシを設定している場合は入力。


Choose software to install
インストールするソフトウェアを選択します。
私は何も付けずにOKを選択。
ソフトウェアのインストールが開始されます。
※最小構成でインストールする場合はコチラのエントリを参照してください。
http://d.hatena.ne.jp/ARCH/20060904/1157395166


Configuring Exim v4
メールサーバの設定です。
今のところメールサーバにすることはないのでlocal delivery onlyを選択。
メールサーバにするとしてもEximを使うことは無いと思いますし。


Root and postmaster mail recipient
rootとpostmaster宛のメールを先ほどの一般ユーザにも配信します。
通常は一般ユーザを利用しなさいとのことでしょう。


Setup of your Debian system is complete
もし再設定するならbase-configと入力しなさいとのこと。OKを入力。
これでインストールが完了です。


次にSSHで外から入れるようにします。
コンソールからrootでログイン。
debian:~# vi /etc/ssh/sshd_config
PasswordAuthentication no
をyesにします。
SSHの再起動。
debian:~# /etc/init.d/ssh restart
これで外からパスワード認証で入れるようになります。
ついでに、ifconfigでもしてIPを確認。


ココからはUTF-8 TeraTerm Pro with TTSSH2で接続。
まずはIPアドレスを固定にします。
debian:~# vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.50
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1


DNS設定の確認。
debian:~# cat /etc/resolv.conf
search
nameserver 192.168.0.1
debian:~#


解放ポートの確認。
debian:~# netstat -l
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:auth *:* LISTEN
tcp 0 0 localhost.localdom:smtp *:* LISTEN
tcp 0 0 *:863 *:* LISTEN
tcp6 0 0 *:ssh *:* LISTEN
udp 0 0 *:bootpc *:*
udp 0 0 *:857 *:*
udp 0 0 *:860 *:*
udp 0 0 *:sunrpc *:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 16426 /dev/printer
debian:~#


不要なサービスの停止。
NFSやPORTMAPを利用する場合はそのままで。
debian:~# update-rc.d -f nfs-common remove
update-rc.d: /etc/init.d/nfs-common exists during rc.d purge (continuing)
Removing any system startup links for /etc/init.d/nfs-common ...
/etc/rc0.d/K79nfs-common
/etc/rc1.d/K79nfs-common
/etc/rc2.d/S21nfs-common
/etc/rc3.d/S21nfs-common
/etc/rc4.d/S21nfs-common
/etc/rc5.d/S21nfs-common
/etc/rc6.d/K79nfs-common
debian:~# update-rc.d -f portmap remove
update-rc.d: /etc/init.d/portmap exists during rc.d purge (continuing)
Removing any system startup links for /etc/init.d/portmap ...
/etc/rc0.d/S32portmap
/etc/rc1.d/K81portmap
/etc/rc2.d/S18portmap
/etc/rc3.d/S18portmap
/etc/rc4.d/S18portmap
/etc/rc5.d/S18portmap
/etc/rc6.d/S32portmap
/etc/rcS.d/S43portmap
debian:~#


debian:~# vi /etc/inetd.conf
#ident stream tcp wait identd /usr/sbin/identd identd
identなんて利用しないのでコメントアウトします。


再起動
debian:~# reboot


で、さっきインストールしたときとパッケージが違うのは何故・・・。。


追記:
パッケージ選択画面で、「何も付けずにOKを押す」と必須・推奨・標準のパッケージがインストールされます。
もしも最小構成でインストールするなら「自分でパッケージを選択する」を選び、何も選ばず終了すると上記のパッケージも入りません。
でもホントに必要なパッケージもインストールされないので…。