Debian 3.1 (Sarge) Kernel 2.6 最小構成インストール

Debianインストーラーに従っていると余計なパッケージまでインストールしてしまいます。
※パッケージ選択画面で何もチェックを付けていないのにもかかわらずですっ。
書籍にも雑誌にもウェブにもあまり書かれていないのでココにmemoをしておくことにします。


途中までは、http://d.hatena.ne.jp/ARCH/20060702/1157392083に沿って下さい。
注意すべきポイントは、「Debian Software selection」Choose software to installと書かれた画面。
ここで何もチェックを付けずに進めると、基本パッケージ(余計)までインストールされてしまいます。
それを回避するには『manual package selection』を選択してからOKすること。
そしてaptitudeに入ってから、何もチェックを付けずにqで抜けて下さい。
コレで余計なパッケージが一切入らずにインストールできます!


ただこのままですと、ホントに必要なパッケージまでインストールされないので注意が必要です。
インストールされないもので、、、確実に必要。
ssh

必要になることが多い。
bc bin86 bind9-host binutils bison cpp cpp-3.3 dc dictionaries-common dnsutils doc-debian doc-linux-text dpkg-dev file finger flex ftp g++ g++-3.3 gcc gcc-3.3 gdb gnu-efi gnupg iamerican ibritish ispell less libbz2-1.0 libc6-dev libdb4.3 libdns16 libevent1 libgc1 libgpmg1 libident libidn11 libisc7 libkrb53 libldap-2.2-7 libldap2 liblwres1 libmagic1 libncursesw5 libnfsidmap1 libnss-db libreadline4 libreadline5 libsasl2 libstdc++5-3.3-dev libtasn1-0 linux-kernel-headers lsof m4 make manpages-dev mime-support mpack mtools mtr-tiny mutt ncurses-term patch perl perl-modules procmail python python-newt python2.3 rcs reportbug sharutils slang1 strace tcsh texinfo time traceroute w3m wamerican whois ca-certificates libsasl2-modules perl-doc python2.3-cjkcodecs python2.3-iconvcodec python2.3-japanese-codecs python2.3-korean-codecs wbritish

私は要らない。
lpr nfs-common pidentd portmap


必要に応じてaptitude install [パッケージ名] でインストールして下さい。
私は即SSHをコンソールでインストールして、残りの作業はSSHで行います。
コピペも出来るし作業記録が残しやすいですからね。


おまけ。
LAMP構成にするならこのパッケージ群をインストール!
aptitude install apache2 libapache2-mod-php4 php4-mysql mysql-server php4-gd php4-imagick php4-pear php4-pear-log

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

玄箱 Debian 3.1 (Sarge) Kernel 2.6

玄箱HGをDebian化。忘れるのでmemoです。折角なのでSarge+Kernel 2.6。
玄箱以外へのDebianインストールはこっち。http://d.hatena.ne.jp/ARCH/20060702


Windowsにて、玄人志向ウェブサイトより新規セットアップ用ファームウェアVer1.01:26.5MBをダウンロード。
http://www.kuroutoshikou.com/products/kuro-box/kurog101.zip
270氏ウェブサイトより『改造済み「玄箱うぉううぉう配布Debian化パッケージ」』をダウンロード。
http://genbako.vodapone.com/debian-2.6.16.9/debian-sarge-2.6.16.9-KUROHG-20060422.tgz


kurog101.zipを展開。
kurog101/KuroBoxSetup.exeが玄箱内にファイルを展開してくれます。
kurog101/image.zipが玄箱内に展開されるファイル群を格納。中身はtmpimage.tgz。さらにこの中身が実体。


debian-sarge-2.6.16.9-KUROHG-20060422.tgzをtmpimage.tgzにリネーム。
tmpimage.tgzをimage.zipという名前で再圧縮。
このファイルをkurog101.zipで展開したimage.zipと置き換える。


KuroBoxSetup.exeを実行。自動的に再起動。


Telnet 192.168.0.100


Debian GNU/Linux 3.1 KURO-BOX
KURO-BOX login: tmp-kun
Password:
Linux KURO-BOX 2.6.16.9-kuroboxHG #2 Sat Apr 22 06:56:34 JST 2006 ppc GNU/Linux
起動、ログインOK。


tmp-kun@KURO-BOX:~$ su -
Password:
KURO-BOX:~# uname -a
Linux KURO-BOX 2.6.16.9-kuroboxHG #2 Sat Apr 22 06:56:34 JST 2006 ppc GNU/Linux


パッケージ一覧です。これは私用のmemo。
KURO-BOX:~# dpkg -l
Desired=Unknown/Install/Remove/Purge/Hold

Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
/ Name Version Description

+++-==============-==============-============================================
ii adduser 3.63 Add and remove users and groups
ii apt 0.5.28.6 Advanced front-end for dpkg
ii apt-utils 0.5.28.6 APT utility programs
ii aptitude 0.2.15.9-2 terminal-based apt frontend
ii at 3.1.8-11 Delayed job execution and batch processing
ii base-config 2.53.10 Debian base system configurator
ii base-files 3.1.2 Debian base system miscellaneous files
ii base-passwd 3.5.9 Debian base system master password and group
ii bash 2.05b-26 The GNU Bourne Again SHell
ii bsdmainutils 6.0.17 collection of more utilities from FreeBSD
ii bsdutils 2.12p-4sarge1 Basic utilities from 4.4BSD-Lite
ii console-common 0.7.49 Basic infrastructure for text console config
ii console-data 2002.12.04dbs- Keymaps, fonts, charset maps, fallback table
ii console-tools 0.2.3dbs-56 Linux console and font utilities
ii coreutils 5.2.1-2 The GNU core utilities
ii cpio 2.5-1.3 GNU cpio -- a program to manage archives of
ii cron 3.0pl1-86 management of regular background processing
ii debconf 1.4.30.13 Debian configuration management system
ii debconf-i18n 1.4.30.13 full internationalization support for debcon
ii debianutils 2.8.4 Miscellaneous utilities specific to Debian
ii dhcp-client 2.0pl5-19.1 DHCP Client
ii diff 2.8.1-11 File comparison utilities
ii dpkg 1.10.28 Package maintenance system for Debian
ii dselect 1.10.28 a user tool to manage Debian packages
ii e2fslibs 1.37-2sarge1 ext2 filesystem libraries
ii e2fsprogs 1.37-2sarge1 ext2 file system utilities and libraries
ii ed 0.2-20 The classic unix line editor
ii exim 3.36-16 An MTA (Mail Transport Agent)
ii fileutils 5.2.1-2 The GNU file management utilities (transitio
ii findutils 4.1.20-6 utilities for finding files--find, xargs, an
ii ftp 0.17-12 The FTP client.
ii gcc-3.3-base 3.3.5-13 The GNU Compiler Collection (base package)
ii gettext-base 0.14.4-2 GNU Internationalization utilities for the b
ii grep 2.5.1.ds1-4 GNU grep, egrep and fgrep
ii groff-base 1.18.1.1-7 GNU troff text-formatting system (base syste
ii gzip 1.3.5-10sarge1 The GNU compression utility
ii hostname 2.13 A utility to set/show the host name or domai
ii ifupdown 0.6.7 high level tools to configure network interf
ii info 4.7-2.2 Standalone GNU Info documentation browser
ii initscripts 2.86.ds1-1 Standard scripts needed for booting and shut
ii ipchains 1.3.10-15 Network firewalling for Linux 2.2.x
ii iptables 1.2.11-10 Linux kernel 2.4+ iptables administration to
ii klogd 1.4.1-17 Kernel Logging Daemon
ii libacl1 2.2.23-1 Access control list shared library
ii libattr1 2.4.16-1 Extended attribute shared library
ii libblkid1 1.37-2sarge1 block device id library
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries and Timezone
ii libcap1 1.10-14 support for getting/setting POSIX.1e capabil
ii libcomerr2 1.37-2sarge1 common error description library
ii libconsole 0.2.3dbs-56 Shared libraries for Linux console and font
ii libdb1-compat 2.1.3-7 The Berkeley database routines [glibc 2.0/2.
ii libdb2 2.7.7.0-9 The Berkeley database routines (run-time fil
ii libdb3 3.2.9-22 Berkeley v3 Database Libraries [runtime]
ii libdb4.2 4.2.52-18 Berkeley v4.2 Database Libraries [runtime]
ii libgcc1 3.4.3-13 GCC support library
ii libgcrypt11 1.2.0-11.1 LGPL Crypto library - runtime library
ii libgdbm3 1.8.3-2 GNU dbm database routines (runtime version)
ii libgdbmg1 1.7.3-28 GNU dbm database routines (runtime version)
ii libgnutls11 1.0.16-13.1 GNU TLS library - runtime library
ii libgpg-error0 1.0-1 library for common error values and messages
ii libident 0.22-3 simple RFC1413 client library - runtime
ii libldap2 2.1.30-8 OpenLDAP libraries
ii liblocale-gett 1.01-17 Using libc functions for internationalizatio
ii liblockfile1 1.06 NFS-safe locking library, includes dotlockfi
ii liblzo1 1.08-1.2 A real-time data compression library
ii libncurses5 5.4-4 Shared libraries for terminal handling
ii libnewt0 0.50.17-9.6 Not Erik's Windowing Toolkit - text mode win
ii libnewt0.51 0.51.6-20 Not Erik's Windowing Toolkit - text mode win
ii libopencdk8 0.5.5-10 Open Crypto Development Kit (OpenCDK) (runti
ii libpam-modules 0.76-22 Pluggable Authentication Modules for PAM
ii libpam-runtime 0.76-22 Runtime support for the PAM library
ii libpam0g 0.76-22 Pluggable Authentication Modules library
ii libpcap0 0.6.2-2 System interface for user-level packet captu
ii libpcre3 4.5-1.2sarge1 Perl 5 Compatible Regular Expression Library
ii libperl5.6 5.6.1-8.9 Shared Perl library.
ii libpopt0 1.7-5 lib for parsing cmdline parameters
ii libreadline4 4.3-11 GNU readline and history libraries, run-time
ii libsasl2 2.1.19-1.5 Authentication abstraction library
ii libsasl7 1.5.27-3.1wood Authentication abstraction library.
ii libsigc++-1.2- 1.2.5-4 type-safe Signal Framework for C++ - runtime
ii libss2 1.37-2sarge1 command-line interface parsing library
ii libssl0.9.6 0.9.6m-1sarge1 SSL shared libraries (old version)
ii libstdc++2.10- 2.95.4-22 The GNU stdc++ library
ii libstdc++5 3.3.5-13 The GNU Standard C++ Library v3
ii libtasn1-2 0.2.10-3 Manage ASN.1 structures (runtime)
ii libtext-charwi 0.04-1 get display widths of characters on the term
ii libtext-iconv- 1.2-3 Convert between character sets in Perl
ii libtext-wrapi1 0.06-1 internationalized substitute of Text::Wrap
ii libuuid1 1.37-2sarge1 universally unique id library
ii libwrap0 7.6.dbs-8 Wietse Venema's TCP wrappers library
ii login 4.0.3-31sarge5 system login tools
ii logrotate 3.7-5 Log rotation utility
ii mailx 8.1.2-0.200405 A simple mail user agent
ii make 3.80-9 The GNU version of the "make" utility.
ii makedev 2.3.1-77 creates device files in /dev
ii man-db 2.4.2-21 The on-line manual pager
ii manpages 1.70-1 Manual pages about using a GNU/Linux system
ii mawk 1.3.3-11 a pattern scanning and text processing langu
ii modconf 0.2.48 Device Driver Configuration
ii module-init-to 3.2-pre1-2 tools for managing Linux kernel modules
ii modutils 2.4.26-1.2 Linux module utilities
ii mount 2.12p-4sarge1 Tools for mounting and manipulating filesyst
ii nano 1.2.4-5 free Pico clone with some new features
ii ncurses-base 5.4-4 Descriptions of common terminal types
ii ncurses-bin 5.4-4 Terminal-related programs and man pages
ii net-tools 1.60-10 The NET-3 networking toolkit
ii netbase 4.21 Basic TCP/IP networking system
ii netkit-inetd 0.10-10 The Internet Superserver
ii netkit-ping 0.10-10 The ping utility from netkit
ii nvi 1.79-22 4.4BSD re-implementation of vi
ii passwd 4.0.3-31sarge5 change and administer password and group dat
ii pciutils 2.1.11-15 Linux PCI Utilities
ii perl 5.8.4-8sarge3 Larry Wall's Practical Extraction and Report
ii perl-base 5.8.4-8sarge3 The Pathologically Eclectic Rubbish Lister
ii perl-modules 5.8.4-8sarge3 Core Perl modules
ii powerpc-utils 1.1.3-15 Various utilities for Linux/PowerPC
ii procps 3.2.1-2 The /proc file system utilities
ii psmisc 21.5-1 Utilities that use the proc filesystem
ii sed 4.1.2-8 The GNU sed stream editor
ii shellutils 5.2.1-2 The GNU shell programming utilities (transit
ii slang1 1.4.9dbs-8 The S-Lang programming library - runtime ver
ii slang1a-utf8 1.4.9dbs-8 The S-Lang programming library with utf8 sup
ii sysklogd 1.4.1-17 System Logging Daemon
ii sysv-rc 2.86.ds1-1 Standard boot mechanism using symlinks in /e
ii sysvinit 2.86.ds1-1 System-V like init
ii tar 1.14-2 GNU tar
ii tasksel 2.24 Tool for selecting tasks for installation on
ii tcpd 7.6.dbs-8 Wietse Venema's TCP wrapper utilities
ii telnet 0.17-29 The telnet client
ii telnetd 0.17-29 The telnet server
ii textutils 5.2.1-2 The GNU text file processing utilities (tran
ii util-linux 2.12p-4sarge1 Miscellaneous system utilities
ii whiptail 0.51.6-20 Displays user-friendly dialog boxes from she
ii yaboot 1.3.13-3 Yet Another Bootloader
ii zlib1g 1.2.2-4.sarge. compression library - runtime
KURO-BOX:~#


時刻設定。
KURO-BOX:~# date -s "2006/05/21 06:36"
Sun May 21 06:36:00 JST 2006


パッケージ群をアップデート。aptitudeでね。
その前にダウンロード先であるapt-lineの確認。


KURO-BOX:~# cat /etc/apt/sources.list
deb http://security.debian.org stable/updates main contrib
deb ftp://ftp.dti.ad.jp/pub/Linux/debian stable main contrib
deb ftp://ftp.dti.ad.jp/pub/Linux/debian-non-US stable/non-US main contrib
deb-src ftp://ftp.dti.ad.jp/pub/Linux/debian stable main contrib
deb-src ftp://ftp.dti.ad.jp/pub/Linux/debian-non-US stable/non-US main contrib


ん、Sargeからnon-USって廃止されなかった?
http://www.debian.org/releases/stable/powerpc/release-notes/ch-whats-new.ja.html#s-non-us
たぶん廃止。viで編集。
KURO-BOX:~# vi /etc/apt/sources.list
一行削除はddで。保存終了は:wq。


アップデート。
KURO-BOX:~# aptitude update
KURO-BOX:~# aptitude upgrade
いくつかのパッケージがアップデートされました。


SSHのインストール。
KURO-BOX:~# aptitude install ssh
KURO-BOX:~# vi /etc/ssh/sshd_config
ここで「パスワード認証を許可する」をNoからYesに。
KURO-BOX:~# /etc/init.d/ssh restart
KURO-BOX:~# ssh root@localhost
OKです。
次に外部からTeraTermでアクセス。OK。


ここからはSSHでアクセス。


待ち受けポートの確認。
KURO-BOX:~# netstat -a
不要なサービスを閉じます。全て「#」でコメントアウトです。
KURO-BOX:~# vi /etc/inetd.conf
inetdの再起動。
KURO-BOX:~# kill -HUP `cat /var/run/inetd.pid`
確認。
KURO-BOX:~# netstat -a
SSHのみ開けています。


初期ユーザの削除。
ホームディレクトリもね。
KURO-BOX:~# userdel -r tmp-kun


ルートパスワードの変更。もっと手前でやっとくべきですね。。
KURO-BOX:~# passwd

今期の予定

日曜日
24:00 堀江由衣の天使のたまご
25:00 ARIA The NATURAL
25:30 スクールランブル二学期

月曜日
25:15 涼宮ハルヒの憂鬱
26:15 (吉永さん家のガーゴイル)
26:45 ストロベリー・パニック

火曜日
24:00 麻衣&愛の電撃G'sラジオ ストロベリー・パニック!〜お姉様といちごそうどう〜
24:50 桜蘭高校ホスト部

水曜日
25:00 (いぬかみっ!)
25:15 <錬金3級 まじかる?ぽか〜ん>
27:10 (プリンセス・プリンセス)

木曜日

金曜日
25:30 (錬金3級 まじかる?ぽか〜ん)

土曜日
21:00 A&G超RADIO SHOW〜アニスパ!〜
24:00 田村ゆかりのいたずら黒うさぎ
24:30 (ひまわりっ!)