注:
今天发现这东西不好找了,还是转一下吧^_^
1:文件系统中/lib有
[root@hjembed /]# ls lib
ld-2.3.2.so libm.so libresolv.so
ld-linux.so.2 libm.so.6 libresolv.so.2
libc-2.3.2.so libnss_dns-2.3.2.so librt-2.3.2.so
libc.so libnss_dns.so librt.so
libc.so.6 libnss_dns.so.2 librt.so.1
libcrypt-2.3.2.so libnss_files-2.3.2.so libstdc++.so
libcrypt.so libnss_files.so libstdc++.so.6
libcrypt.so.1 libnss_files.so.2 libstdc++.so.6.0.1
libdl-2.3.2.so libpng.a libutil-2.3.2.so
libdl.so libpng.so libutil.so
libdl.so.2 libpng.so.3 libutil.so.1
libgcc_s.so libpng.so.3.1.2.15 libuuid.so.1
libgcc_s.so.1 libpthread-0.10.so libuuid.so.1.2
libjpeg.so libpthread.so libz.so
libjpeg.so.62 libpthread.so.0 libz.so.1
libjpeg.so.62.0.0 libpthread.so_orig libz.so.1.2.3
libm-2.3.2.so libresolv-2.3.2.so
上面与此相关的是libnss* libresolv*
2: 四个文件
[root@hjembed /]# cat /etc/hosts
127.0.0.1 localhost
59.69.74.87 hujunlinux #为我开发的host 机器
[root@hjembed /]# cat /etc/resolve.conf
nameserver XXXXXX #设置DNS服务器
[root@hjembed /]# cat /etc/host.conf
order hosts,bind
还有一个nsswitch.conf , 我是直接从host machine: FC2 下考出来的
[root@hjembed /]# cat /etc/nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# nisplus or nis+ Use NIS+ (NIS version 3)
# nis or yp Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# db Use the local database (.db) files
# compat Use NIS on compat mode
# hesiod Use Hesiod for user lookups
# [NOTFOUND=return] Stop searching if not found so far
#
# To use db, put the "db" in front of "files" for entries you want to be
# looked up first in the databases
#
# Example:
#passwd: db files nisplus nis
#shadow: db files nisplus nis
#group: db files nisplus nis
passwd: files
shadow: files
group: files
#hosts: db files nisplus nis dns
hosts: files dns
# Example - obey only what nisplus tells us...
#services: nisplus [NOTFOUND=return] files
#networks: nisplus [NOTFOUND=return] files
#protocols: nisplus [NOTFOUND=return] files
#rpc: nisplus [NOTFOUND=return] files
#ethers: nisplus [NOTFOUND=return] files
#netmasks: nisplus [NOTFOUND=return] files
bootparams: nisplus [NOTFOUND=return] files
ethers: files
netmasks: files
networks: files
protocols: files
rpc: files
services: files
netgroup: files
publickey: nisplus
automount: files
aliases: files nisplus
3:试验:
[root@hjembed /]# ping www.baidu.com
PING www.a.shifen.com (211.94.144.100): 56 data bytes
--- www.a.shifen.com ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss
[root@hjembed /]# ping hujunlinux (主机名)
PING hujunlinux (59.69.74.87): 56 data bytes
64 bytes from 59.69.74.87: icmp_seq=0 ttl=64 time=0.5 ms
64 bytes from 59.69.74.87: icmp_seq=1 ttl=64 time=0.5 ms
64 bytes from 59.69.74.87: icmp_seq=2 ttl=64 time=0.5 ms
64 bytes from 59.69.74.87: icmp_seq=3 ttl=64 time=0.5 ms
64 bytes from 59.69.74.87: icmp_seq=4 ttl=64 time=0.5 ms
--- hujunlinux ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.5/0.5/0.5 ms
ok!
posted on 2008-04-24 17:01
lfc 阅读(1594)
评论(1) 编辑 收藏 引用