タグアーカイブ sarge

Bind の導入(Debian woody)

# apt-get install bind
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  netbase
The following NEW packages will be installed:
  bind netbase
0 packages upgraded, 2 newly installed, 0 to remove and 0  not upgraded.
Need to get 841kB of archives. After unpacking 1978kB will be used.
Do you want to continue? [Y/n] Y
Get:1 ftp://ftp.jp.debian.org stable/main netbase 4.07 [47.5kB]
Get:2 http://security.debian.org stable/updates/main bind 1:8.3.3-2.0woody2 [794kB]
Fetched 841kB in 14s (57.0kB/s)
Preconfiguring packages ...
Selecting previously deselected package netbase.
(Reading database ... 47621 files and directories currently installed.)
Unpacking netbase (from .../archives/netbase_4.07_all.deb) ...
Selecting previously deselected package bind.
Unpacking bind (from .../bind_1%3a8.3.3-2.0woody2_i386.deb) ...
Setting up netbase (4.07) ...

Setting up bind (8.3.3-2.0woody2) ...
Starting domain name service: named.

#

apt sources.listの設定 (Debian sarge)

sargeのupdateサポートは既に終了しているため、 以下のように変更した。

deb http://archive.debian.org/debian/ Debian-3.1 main contrib non-free
deb-src http://archive.debian.org/debian/ Debian-3.1 main contrib non-free

日本語入力設定(Debian sarge)

1.Canna のインストール

# apt-get install canna

2.locale 設定

# dpkg-reconfigure locales

ja.JP.eucJP」を選択する。
/etc/locale.gen に ja.JP.EUC-JP EUC-JP の行が追加されていることを確認する。

3. Xの日本語入力環境の設定  Xで漢字変換にCannaを使用し、emacsは使用しない場合は以下のように設定する。

# user-ja-conf  または  set-language-env
Setting up users' native language environment
by modifying their dot-files.
Type "set-language-env -h" for help.

パッケージ一覧を取得しています...
Canna サーバが動いています。
Wnn サーバが動いていません。
ネットワークのどこか別のコンピュータで Wnn サーバーが動いていますか [y/N] N<Enter>
SKK サーバーが動いていません。
ネットワークのどこか別のコンピュータで SKK サーバーが動いていますか [y/N] N<Enter>
Anthy が動いていません。
PRIME が動いていません。
日本語には関係ない様々な設定を行いますか [Y/n] n<Enter>

------- /home/ユーザ名/.Xresources -------
X Window System で動くプログラムの設定です。

設定を行いますか [Y/n] Y<Enter>
設定します...

------- /home/ユーザ名/.bash_profile -------
bash 使用時に、ログイン時に実行されます。
単に、.bashrc を実行するだけの内容です。

設定を行いますか [Y/n] Y<Enter>
設定します...

------- /home/ユーザ名/.bashrc -------
bash が起動するときに実行されます。
さまざまな設定をしているので、目を通しておいてください。

設定を行いますか  [Y/n] Y<Enter>
設定します...

------- /home/ユーザ名/.canna -------
Canna の設定です。

設定を行いますか  [Y/n] Y<Enter>
設定します...

------- /home/ユーザ名/.cshrc -------
csh が起動するときに実行されます。
さまざまな設定をしているので、目を通しておいてください。

設定を行いますか  [Y/n] n<Enter>
設定しません。

------- /home/ユーザ名/.emacs -------
emacs の設定です。
emacs20, emacs21 に対応しています。
xemacs21 は、.xemacs/init.el で設定します。

設定を行いますか  [Y/n] n<Enter>
設定しません。

------- /home/ユーザ名/.inputrc -------
bash など、readline ライブラリを用いたプログラムの設定です。

設定を行いますか  [Y/n] Y<Enter>
設定します。

------- /home/ユーザ名/.xsession -------
xdm を使って X Window System にログインしたときに実行されます。
また、startx や xinit を使って X を起動したときにも実行されます。

設定を行いますか  [Y/n] Y<Enter>
設定します。

------- /home/ユーザ名/.xemacs/init.el -------
xemacs21 の設定です。

設定を行いますか  [Y/n] n<Enter>
設定しません。
------------------
    設定が終了しました。設定を有効にするには、一度ログアウト
してから再びログインしてください。
    それぞれのドットファイルを読んで、どのように変更されたか
確認してください。気に入らない設定は、直接変更するか、
'language-env end' 以降の行に再設定を書き加えて下さい。
    詳しくは /usr/share/doc/language-env/README.ja.eucJP.gz を
参照して下さい。

[Enter] キーを押してください。終了します。

4. ログオフ
一度ログオフすると設定が読み込まれ、日本語入力が可能になる。
日本語入力は、<Shift>+<Space> で切り替える。

gccのインストール(sarge)

# apt-get install gcc
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  binutils cpp cpp-3.3 gcc-3.3
Suggested packages:
  binutils-doc cpp-doc manpages-dev autoconf automake libtool flex bison gdb gcc-doc
  gcc-3.3-doc
Recommended packages:
  libc-dev libc6-dev
The following NEW packages will be installed:
  binutils cpp cpp-3.3 gcc gcc-3.3
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 5516kB of archives.
After unpacking 15.3MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.debian.org sarge/main binutils 2.15-6 [2333kB]
Get:2 http://archive.debian.org sarge/main cpp-3.3 1:3.3.5-13 [1541kB]
Get:3 http://archive.debian.org sarge/main cpp 4:3.3.5-3 [29.6kB]
Get:4 http://archive.debian.org sarge/main gcc-3.3 1:3.3.5-13 [1608kB]
Get:5 http://archive.debian.org sarge/main gcc 4:3.3.5-3 [4914B]
Fetched 5516kB in 3m20s (27.6kB/s)
Selecting previously deselected package binutils.
(Reading database ... 9114 files and directories currently installed.)
Unpacking binutils (from .../binutils_2.15-6_powerpc.deb) ...
Selecting previously deselected package cpp-3.3.
Unpacking cpp-3.3 (from .../cpp-3.3_1%3a3.3.5-13_powerpc.deb) ...
Selecting previously deselected package cpp.
Unpacking cpp (from .../cpp_4%3a3.3.5-3_powerpc.deb) ...
Selecting previously deselected package gcc-3.3.
Unpacking gcc-3.3 (from .../gcc-3.3_1%3a3.3.5-13_powerpc.deb) ...
Selecting previously deselected package gcc.
Unpacking gcc (from .../gcc_4%3a3.3.5-3_powerpc.deb) ...
Setting up binutils (2.15-6) ...

Setting up cpp-3.3 (3.3.5-13) ...
Setting up cpp (3.3.5-3) ...
Setting up gcc-3.3 (3.3.5-13) ...
Setting up gcc (3.3.5-3) ...

#
# apt-get install libc6-dev
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  linux-kernel-headers
Suggested packages:
  glibc-doc manpages-dev
The following NEW packages will be installed:
  libc6-dev linux-kernel-headers
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 4464kB of archives.
After unpacking 16.9MB of additional disk space will be used.
Do you want to continue? [Y/n]

Get:1 http://archive.debian.org sarge/main linux-kernel-headers 2.5.999-test7-bk-17 [1399kB]
Get:2 http://archive.debian.org sarge/main libc6-dev 2.3.2.ds1-22sarge6 [3065kB]
Fetched 4464kB in 2m41s (27.6kB/s)
Selecting previously deselected package linux-kernel-headers.
(Reading database ... 9349 files and directories currently installed.)
Unpacking linux-kernel-headers (from .../linux-kernel-headers_2.5.999-test7-bk-17_powerpc.deb) ...
Selecting previously deselected package libc6-dev.
Unpacking libc6-dev (from .../libc6-dev_2.3.2.ds1-22sarge6_powerpc.deb) ...
Setting up linux-kernel-headers (2.5.999-test7-bk-17) ...
Setting up libc6-dev (2.3.2.ds1-22sarge6) ...
#

gccのインストール(Debian sarge)

apt-getでインストールしようとすると..

# apt-get install gcc
Reading Package Lists... Done
Building Dependency Tree... Done
gcc is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
  gcc-3.3: Depends: binutils (>= 2.15-5) but it is not installable
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

となったので、「apt-get -f install」を実行してみる。

# apt-get -f install
Reading Package Lists... Done
Building Dependency Tree... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  gcc gcc-3.3
0 upgraded, 0 newly installed, 2 to remove and 2 not upgraded.
4 not fully installed or removed.
Need to get 0B of archives.
After unpacking 4264kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 9773 files and directories currently installed.)
Removing gcc ...
Removing gcc-3.3 ...
Setting up cpp-3.3 (3.3.5-13) ...
Setting up cpp (3.3.5-3) ...
# apt-get install gcc
Reading Package Lists... Done
Building Dependency Tree... Done
The following extra packages will be installed:
  binutils cpp cpp-4.3 gcc-4.3 gcc-4.3-base libc6 libgcc1 libgmp3c2 libgomp1
  libmpfr1ldbl locales
Suggested packages:
  binutils-doc cpp-doc gcc-4.3-locales gcc-multilib make manpages-dev autoconf
  automake1.9 libtool flex bison gdb gcc-doc gcc-4.3-multilib  libmudflap0-4.3-dev
  gcc-4.3-doc libgcc1-dbg libgomp1-dbg libmudflap0-dbg glibc-doc libc6-i686
Recommended packages:
  libc6-dev libc-dev
The following packages will be REMOVED:
  base-config
The following NEW packages will be installed:
  binutils cpp-4.3 gcc gcc-4.3 gcc-4.3-base libgmp3c2 libgomp1 libmpfr1ldbl
The following packages will be upgraded:
  cpp libc6 libgcc1 locales
4 upgraded, 8 newly installed, 1 to remove and 115 not upgraded.
Need to get 18.2MB of archives.
After unpacking 16.1MB of additional disk space will be used.
Do you want to continue? [Y/n] y

ネットワークの設定(Debian sarge)

ネットワークの設定は、/etc/network/interfacesを編集します。

固定IPを設定する場合は、下記のように設定します。

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.1.2
network 192.168.1.0
netmask 255.255.255.0
broadcast 192.168.1.255
gateway 192.168.1.1

DHCPを利用する場合は、下記のようにします。

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

ネットワークを再起動すると、設定が反映されます。

# /etc/init.d/networking restart

DNSの設定は/etc/resolv.confで行います。

nameserver 192.168.1.251
nameserver 192.168.1.252

ホストの設定は/etc/hostsで行います。

127.0.0.1 localhost.localdomain localdomain

sarge導入時のメモ

・ベースシステムの再設定

# base-config

・locale の再設定

# dpkg-reconfigure locales

locale の設定ファイルは
/etc/locale.gen, /etc/emvironment

・X Window System のインストール

# apt-get install x-window-system-core

・X の再設定

# dpkg-reconfigure -plow xserver-xfree86

・Gnome のインストール

# apt-get install gnome gdm gdm-themes

X の起動は

  $ startx

X をインストールすると、次回立ち上げからはグラフィカルログインになる。

・X で日本語を表示するため、kochiフォントをインストールする

# apt-get install ttf-kochi-*
# apt-get install x-ttcidfont-conf

・サービス自動起動の制御  portmap を起動させない場合

~# 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
~#

但し、inetdをupdateした場合はリンクが再び作成されてしまう。
これを防ぐために、RunLevel?に停止用のリンクを作成する。

~# update-rc.d portmap stop 18 5 .
   Adding system startup for /etc/init.d/portmap ...
     /etc/rc5.d/K18portmap -> ../init.d/portmap
~#

portmap を起動する場合

~# update-rc.d portmap defaults 18
 Adding system startup for /etc/init.d/portmap ...
     /etc/rc0.d/K18portmap -> ../init.d/portmap
     /etc/rc1.d/K18portmap -> ../init.d/portmap
     /etc/rc6.d/K18portmap -> ../init.d/portmap
     /etc/rc2.d/S18portmap -> ../init.d/portmap
     /etc/rc3.d/S18portmap -> ../init.d/portmap
     /etc/rc4.d/S18portmap -> ../init.d/portmap
     /etc/rc5.d/S18portmap -> ../init.d/portmap
~#

これで、portmapの自動起動の設定がされる。
但しこれでは優先度が全て同じ設定になってしまう。
これを、起動・停止別、RunLevel?別に設定したい場合は以下のようにする。

~# update-rc.d portmap start 18 2 3 4 5 . start 32 0 6 . start 43 S . stop 81 1 .
 Adding system startup for /etc/init.d/portmap ...
     /etc/rc1.d/K81portmap -> ../init.d/portmap
     /etc/rc0.d/S32portmap -> ../init.d/portmap
     /etc/rc2.d/S18portmap -> ../init.d/portmap
     /etc/rc3.d/S18portmap -> ../init.d/portmap
     /etc/rc4.d/S18portmap -> ../init.d/portmap
     /etc/rc5.d/S18portmap -> ../init.d/portmap
     /etc/rc6.d/S32portmap -> ../init.d/portmap
     /etc/rcS.d/S43portmap -> ../init.d/portmap
~#

・キーボードの設定

キーボードを「jp106」にしたい場合は、以下のようにする。

~# install-keymap jp106
Looking /etc/console/boottime.kmap.gz
~#

・マウントポイントの変更

/etc/fstab の /dev/hda3 の設定を以下のように変更し、
/dev/hda3 のマウント先を /mnt から /home に変更する。
/dev/hda3 /home ext3 defaults,noatime 0 0
/home 配下のファイルを /mnt にコピーする。

# cp -pr /home/* /mnt

マウントし直す。

# umount /mnt # mount /home