ページ更新: 2006-05-25 (木) (5436日前)
../セットアップ(1.インストール〜起動) ../セットアップ(3.その他の設定) ネットワークの設定。 目的は、apt-get が使えて、さらに sshd が使えるようにすること。 手動で設定しているが、debianのインストーラが使っているスクリプトがあれば、もう少し楽なのだが。 [編集]dpkg -l でパッケージを確認 ## 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.47 Add and remove users and groups ii apt 0.5.4 Advanced front-end for dpkg ii apt-utils 0.5.4 APT utility programs ii at 3.1.8-11 Delayed job execution and batch processing ii base-files 3.0.2 Debian base system miscellaneous files ii base-passwd 3.4.1 Debian Base System Password/Group Files ii bash 2.05a-11 The GNU Bourne Again SHell ii bsdmainutils 5.20020211-4.9 More utilities from FreeBSD. ii bsdutils 2.11n-4 Basic utilities from 4.4BSD-Lite. ii cpio 2.4.2-39 GNU cpio -- a program to manage archives of ii cron 3.0pl1-72 management of regular background processing ii debconf 1.0.32 Debian configuration management system ii debianutils 1.16 Miscellaneous utilities specific to Debian. ii diff 2.7-29 File comparison utilities ii dpkg 1.9.21 Package maintenance system for Debian ii e2fsprogs 1.27-2 The EXT2 file system utilities and libraries ii ed 0.2-19 The classic unix line editor ii exim 3.35-1 An MTA (Mail Transport Agent) ii fdutils 5.3-7 Linux floppy utilities ii fileutils 4.1-10 GNU file management utilities ii findutils 4.1.7-2 utilities for finding files--find, xargs, an ii gettext-base 0.10.40-5 GNU Internationalization utilities for the b ii grep 2.4.2-3 GNU grep, egrep and fgrep. ii groff-base 1.17.2-15.wood GNU troff text-formatting system (base syste ii gzip 1.3.2-3 The GNU compression utility. ii hostname 2.09 A utility to set/show the host name or domai ii ifupdown 0.6.4-4 High level tools to configure network interf ii info 4.1-2 Standalone GNU Info documentation browser ii ipchains 1.3.10-15 Network firewalling for Linux 2.2.x ii iptables 1.2.6a-5 IP packet filter administration tools for 2. ii klogd 1.4.1-10 Kernel Logging Daemon ii libc6 2.2.5-6 GNU C Library: Shared libraries and Timezone ii libcap1 1.10-12 support for getting/setting POSIX.1e capabil ii libdb2 2.7.7.0-7 The Berkeley database routines (run-time fil ii libdb3 3.2.9-16 Berkeley v3 Database Libraries [runtime] ii libgdbmg1 1.7.3-27 GNU dbm database routines (runtime version). ii libident 0.22-2 simple RFC1413 client library - runtime ii libldap2 2.0.23-6 OpenLDAP libraries. ii liblockfile1 1.03 NFS-safe locking library, includes dotlockfi ii libncurses5 5.2.20020112a- Shared libraries for terminal handling ii libnewt0 0.50.17-9.6 Not Erik's Windowing Toolkit - text mode win ii libpam-modules 0.72-35 Pluggable Authentication Modules for PAM ii libpam-runtime 0.72-35 Runtime support for the PAM library ii libpam0g 0.72-35 Pluggable Authentication Modules library ii libpcap0 0.6.2-2 System interface for user-level packet captu ii libpcre3 3.4-1.1 Philip Hazel's Perl Compatible Regular Expre ii libpopt0 1.6.2-7 lib for parsing cmdline parameters ii libreadline4 4.2a-5 GNU readline and history libraries, run-time ii libsasl7 1.5.27-3 Authentication abstraction library. ii libstdc++2.10- 2.95.4-7 The GNU stdc++ library ii libwrap0 7.6-9 Wietse Venema's TCP wrappers library ii lilo 22.2-3 LInux LOader - The Classic OS loader can loa ii login 20000902-12 System login tools ii logrotate 3.5.9-8 Log rotation utility ii mailx 8.1.2-0.200204 A simple mail user agent. ii makedev 2.3.1-58 Creates device files in /dev. ii man-db 2.3.20-18 The on-line manual pager ii manpages 1.39-1.1 Man pages about using a Linux system. ii mawk 1.3.3-8 a pattern scanning and text processing langu ii mbr 1.1.5-1 Master Boot Record for IBM-PC compatible com ii modconf 0.2.43 Device Driver Configuration ii modutils 2.4.15-1 Linux module utilities. ii mount 2.11n-4 Tools for mounting and manipulating filesyst ii nano 1.0.6-2 free Pico clone with some new features ii ncurses-base 5.2.20020112a- Descriptions of common terminal types ii ncurses-bin 5.2.20020112a- Terminal-related programs and man pages ii net-tools 1.60-4 The NET-3 networking toolkit ii netbase 4.07 Basic TCP/IP networking system ii netkit-inetd 0.10-9 The Internet Superserver ii netkit-ping 0.10-9 The ping utility from netkit ii nvi 1.79-20 4.4BSD re-implementation of vi. ii passwd 20000902-12 Change and administer password and group dat ii pciutils 2.1.9-4 Linux PCI Utilities (for 2.[1234].x kernels) ii perl-base 5.6.1-7 The Pathologically Eclectic Rubbish Lister. ii ppp 2.4.1.uus-4 Point-to-Point Protocol (PPP) daemon. ii pppconfig 2.0.14 A text menu based utility for configuring pp ii pppoe 3.3-1.1 PPP over Ethernet driver ii pppoeconf 0.9.10.6 configures PPPoE/ADSL ii procps 2.0.7-8 The /proc file system utilities. ii psmisc 20.2-2.1 Utilities that use the proc filesystem ii sed 3.02-8 The GNU sed stream editor. ii shellutils 2.0.11-11 The GNU shell programming utilities. ii slang1 1.4.4-7.2 The S-Lang programming library - runtime ver ii sysklogd 1.4.1-10 System Logging Daemon ii syslinux 1.66-1 Bootloader for Linux/i386 using MS-DOS flopp ii sysvinit 2.84-2woody1 System-V like init. ii tar 1.13.25-2 GNU tar ii tasksel 1.18 Tool for selecting tasks for installation on ii tcpd 7.6-9 Wietse Venema's TCP wrapper utilities ii telnet 0.17-18 The telnet client. ii textutils 2.0-12 The GNU text file processing utilities. ii util-linux 2.11n-4 Miscellaneous system utilities. ii whiptail 0.50.17-9.6 Displays user-friendly dialog boxes from she less とか入ってない。エディタは ed, nano, nvi。dhcpのクライアントもないのか... ppp, pppoe は不要なので、後で消す。 [編集]ネットワークの仮設定 #[編集]ネットワーク (2004-07-30) #既存のネットワークと今回設定するcoLinuxの環境。
エディタ #コンソールは colinux-console-nt.exe だとキーボードの配列が合致する。 カーソルが表示されないが、reset すれば表示される。が、すぐに表示されなくなる。 でも、nvi では101配列みたいだし、カーソルが見えなくなる。 普段 vi 使っていないので、nano を使って次のファイルを修正。 [編集]/etc/resolv.conf #オリジナル nameserver 195.34.32.11 こういう風に修正。 nameserver 192.168.1.2 ★DNSのアドレス domain home.discypus.jp ★LANのドメインを書いてみたり。(オプション)[編集] /etc/networks/interfaces #オリジナル # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or # /usr/share/doc/ifupdown/examples for more information. auto lo eth0 iface eth0 inet static address 192.168.0.40 gateway 192.168.0.1 netmask 255.255.255.0 修正後。 # Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or # /usr/share/doc/ifupdown/examples for more information. auto lo eth0 iface lo inet loopback ★ local がないと困りそうなので追加。 iface eth0 inet static address 192.168.1.6 ★ coLinuxのアドレス。DHCPサーバで登録済み。 gateway 192.168.1.1 ★ ルータのアドレス netmask 255.255.255.0[編集] /etc/hosts #ついでに。 オリジナルは存在しない。 修正後。このホスト自身はDNSに登録しちゃったので、localhostだけ。 127.0.0.1 localhost[編集] ネットワーク設定の反映と接続確認 #で、設定を反映させる。(ちなみに、Gatewayは router.home.discypus.jp) # /etc/init.d/networking restart ★設定を反映。 # route ★確認。 Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.1.0 * 255.255.255.0 U 0 0 0 eth0 default router.home.dis 0.0.0.0 UG 0 0 0 eth0 動作確認。 # ping 192.168.1.1 ★ gateway PING 192.168.1.1 (192.168.1.1): 56 data bytes 64 bytes from 192.168.1.1: icmp_seq=0 ttl=64 time=45.0 ms ^C # ping 192.168.1.2 ★ dns PING 192.168.1.2 (192.168.1.2): 56 data bytes 64 bytes from 192.168.1.2: icmp_seq=0 ttl=64 time=29.3 ms ^C # ping www.debian.org ★外、DNSを引けているかどうかも同時に確認 PING www.debian.org (194.109.137.218): 56 data bytes 64 bytes from 194.109.137.218: icmp_seq=0 ttl=50 time=296.6 ms[編集] less, sshd, ng-cjk #プライマリなftpサイトに負担を掛けるのは申し訳ないが、lessとsshd だけでさっさと入れたいので、(あ、apt-cache は入ってる) # apt-get update # apt-get install ssh ng-cjk less sshで繋ぐ前に、一般ユーザを用意する。 ssh で繋ぐ。 rootにもパスワードを設定する。 rootをログアウトする前に、sshで一般ユーザでログインし、su - がちゃんと 実行できること(rootのパスワードが間違っていないこと)を確認する。 |