間違いを 防ぐため 環境を 表示する事の 代案として 内情を 記載
# mount /dev/sda5 on / type ext3 (rw) /dev/sda8 on /var/data type ext2 (rw) none on /proc type proc (rw) none on /dev/pts type devpts (rw,gid=5,mode=620)
pc1 の 設定ファイルの 内容を 見て行きます これが 最終では有りませんが 参考に 表示 しておきます。まず /etc/hosts
# sed -e '/^#/d' /etc/hosts | sed -e 1d 127.0.0.1 localhost 192.168.0.5 lx.bcnet.ne.jp lx 192.168.0.6 ws.bcnet.ne.jp ws 192.168.0.7 mc.bcnet.ne.jp mc 192.168.2.8 nyanta.no-ip.info nyanta
つぎは /etc/hosts.allow
# sed -e '/^#/d' /etc/hosts.allow ALL : LOCAL ALL : 192.168.0.0/255.255.255.0: allow ipop3d : 192.168.0.0/255.255.255.0:allow ipop3d : 192.168.2.0/255.255.255.0:allow
つぎは /etc/resolv.conf
# sed -e '/^#/d' /etc/resolv.conf search bcnet.ne.jp nameserver 127.0.0.1 nameserver 192.168.0.5 nameserver 192.168.0.1 nameserver 192.168.2.8
”/etc/exports”に 関しては ssh と scp にて 対応するので 今回は 見送 る 事に しておきます。基本的に nfs は 使用しない。次は sendmail 関連の access と local-host-names です。まず access
# cat /etc/mail/access 192.168.0 RELAY 127.0.0.1 RELAY cricrima-sa.no-ip.info RELAY bcnet.ne.jp RELAY 192.168.2 RELAY nyanta.no-ip.info RELAY
次は /etc/mail/local-host-names
# cat /etc/mail/local-host-names bcnet.ne.jp nyanta.no-ip.info 192.168.0.8 192.168.0.7 192.168.0.6 192.168.2.8
bind (named) 関連 まず /var/named/bcnet.hosts
# cat /var/named/bcnet.hosts $TTL 86400 @ IN SOA lx.bcnet.ne.jp. root.lx.bcnet.ne.jp. ( 20030121 ; Serial 3600 ; Refresh 900 ; Retry 604800 ; Expire 86400 ) ; Minimum TTL ; IN NS lx.bcnet.ne.jp. IN MX 10 lx.bcnet.ne.jp. ;nl IN A 192.168.0.8 adsl IN A 192.168.0.1 lx IN A 192.168.0.5 ws IN A 192.168.0.6 mc IN A 192.168.0.7 www IN CNAME lx ;qqq IN CNAME nl ; ;
/var/named/bcnet.hosts.rev
# cat /var/named/bcnet.hosts.rev $TTL 3D @ IN SOA lx.bcnet.ne.jp. root.lx.bcnet.ne.jp. ( 20030121 ; Serial 3600 ; Refresh 900 ; Retry 604800 ; Expire 3600) ; Minimum TTL IN NS lx.bcnet.ne.jp. 1 IN PTR adsl.bcnet.ne.jp. 5 IN PTR lx.bcnet.ne.jp. 6 IN PTR ws.bcnet.ne.jp. 7 IN PTR mc.bcnet.ne.jp. ;8 IN PTR nl.bcnet.ne.jp.
/etc/rc.d/rc.inet1 です かなり 長いですが 参考に 示しておきます
# sed -e '/^#/d' /etc/rc.d/rc.inet1 HOSTNAME=`cat /etc/HOSTNAME` /sbin/ifconfig lo 127.0.0.1 /sbin/route add -net 127.0.0.0 netmask 255.0.0.0 lo if [ -f /var/run/inet1-scheme ] ; then INET1_SCHEME=`cat /var/run/inet1-scheme` else INET1_SCHEME="fixed" fi if [ "$INET1_SCHEME" = "fixed" ] ; then # IF YOU HAVE AN ETHERNET CONNECTION, use these lines below to configure the # eth0 interface. If you're only using loopback or SLIP, don't include the # rest of the lines in this file. # Edit for your setup. IPADDR="192.168.0.5" # REPLACE with YOUR IP address! NETMASK="255.255.255.0" # REPLACE with YOUR netmask! NETWORK="192.168.0.0" # REPLACE with YOUR network address! BROADCAST="192.168.0.255" # REPLACE with YOUR broadcast address, if you # have one. If not, leave blank and edit below. GATEWAY="192.168.0.1" # REPLACE with YOUR gateway address! # Uncomment the line below to configure your ethernet card. /sbin/ifconfig eth0 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK} # Edit for your setup. IPADDR="192.168.2.1" # REPLACE with YOUR IP address! NETMASK="255.255.255.0" # REPLACE with YOUR netmask! NETWORK="192.168.2.0" # REPLACE with YOUR network address! BROADCAST="192.168.2.255" # REPLACE with YOUR broadcast address, if you # Uncomment the line below to configure your ethernet card. /sbin/ifconfig eth1 ${IPADDR} broadcast ${BROADCAST} netmask ${NETMASK} # If the line above is uncommented, the code below can also be uncommented. # It sees if the ethernet was properly initialized, and gives the admin some # hints about what to do if it wasn't. if [ ! $? = 0 ]; then cat << END Your ethernet card was not initialized properly. Here are some reasons why this may have happened, and the solutions: 1. Your kernel does not contain support for your card. Including all the network drivers in a Linux kernel can make it too large to even boot, and sometimes including extra drivers can cause system hangs. To support your ethernet, either edit /etc/rc.d/rc.modules to load the support at boottime, or compile and install a kernel that contains support. 2. You don't have an ethernet card, in which case you should comment out this section of /etc/rc.d/rc.inet1. (Unless you don't mind seeing this error...) END fi # Uncomment these to set up your IP routing table. # /sbin/route add -net ${NETWORK} netmask ${NETMASK} eth0 if [ ! "$GATEWAY" = "" ]; then /sbin/route add default gw ${GATEWAY} netmask 0.0.0.0 metric 1 fi elif [ "$INET1_SCHEME" = "dhcp" -o "$INET1_SCHEME" = "DHCP" ] ; then if [ -x /sbin/dhcpcd ] ; then /sbin/dhcpcd else cat << END Dhcpcd was not found. Please install dhcpcd. END fi fi echo 1 > /proc/sys/net/ipv4/ip_forward
にゃんたろう 拝!
2005年11月21日 (月) 23:37:11 JST 作成
✈