LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: goletsgo

能否在一台电脑上同时使用服务器和客户端的程序?

[复制链接]
 楼主| 发表于 2004-9-8 20:49:58 | 显示全部楼层
我的nsswitch.conf是这样的:

  1. passwd:         compat
  2. group:          compat
  3. shadow:         compat

  4. hosts:          files dns
  5. networks:       files

  6. protocols:      db files
  7. services:       db files
  8. ethers:         db files
  9. rpc:            db files

  10. netgroup:       nis

复制代码

怎么才能设成本机优先呢?
我这里找不到gethostbyname的帮助,man和info都不行:(
 楼主| 发表于 2004-9-8 20:54:12 | 显示全部楼层
另外我/etc/hostname里写的是debian
/etc/hosts里写的是127.0.0.1 localhost
这俩文件有啥区别?还有个host.conf
发表于 2004-9-10 02:33:46 | 显示全部楼层
在/etc/hosts里加上
127.0.0.1 debian
再试试
 楼主| 发表于 2004-9-10 10:25:51 | 显示全部楼层
问题解决了,是我的网络设置有问题,开机的时候没有开loopback,我在interfaces里加上
auto lo
iface lo inet loopback
就好了
发表于 2004-9-11 09:56:32 | 显示全部楼层
楼主的服务器端程序也贴出来学习下吧~~~
 楼主| 发表于 2004-9-12 12:53:17 | 显示全部楼层
其实是照着精华区里的教程写的,自己搜一下吧:)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表