Chinaunix首页 | 论坛 | 博客
  • 博客访问: 111566
  • 博文数量: 12
  • 博客积分: 1581
  • 博客等级: 上尉
  • 技术积分: 280
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-12 14:10
文章分类

全部博文(12)

文章存档

2011年(1)

2010年(6)

2008年(5)

分类: BSD

2008-03-17 09:34:27

  为在安装成功Apache,我在虚拟机下重装了好几次的FreeBSD.最后都没法成功.我是用ports来安装的.我用了不同的方面安装.minix安装.custom安装,都无法成功安装Apache.错误就是ports安装完Apache后,虽然启动Apache并没有有什么错误提示,不过要查看进程的时候无法查到httpd这个进程.偏偏我的一个同事每次安装都成功,我发现在我和他安装系统的方法只有一个地方不同,那就是:
  他是在在安装完FreeBSD系统后在Configure的Networking里进行网络配置.
  而我就是安装完系统后进入系统再在/etc/rc.conf输入网络配置的.

  就是这个原因,令我错过了成功安装Apache的机会.我的解决方面如下:
  在安装完FreeBSD系统后在Configure的Networking里进行网络配置和在安装完系统后进入系统再在/etc/rc.conf输入网络配置不同的是:
  有第一种情况下,系统会将你的domain写入到/etc/rc.conf和/etc/hosts里面去.而第二种情况就只是把网络配置写入到/etc/rc.conf里而已.

  这样情况就开始明朗了.在第一种情况下,Apache能启动的原因为:它将domain写入/etc/rc.conf的同时也将它写入到/etc/rc.conf里面去了.而/etc/hosts的作用为:

man hosts:
The hosts file contains information regarding the known hosts on the net-
work. It can be used in conjunction with DNS, and the NIS maps
`hosts.byaddr' and `hosts.byname', as controlled by .
For each host a single line should be present with the following informa-
tion:

Internet address
official host name
aliases

Items are separated by any number of blanks and/or tab characters. A
``#'' indicates the beginning of a comment; characters up to the end of
the line are not interpreted by routines which search the file.

When using the name server , this file provides a backup used
when the name server is not running. For the name server, it is sug-
gested that only a few addresses be included in this file. These include
addresses for the local interfaces that needs at boot time
and a few machines on the local network.

This file may be created from the official host data base maintained at
the Network Information Control , though local changes may be
required to bring it up to date regarding unofficial aliases and/or
unknown hosts. As the data base maintained at NIC is incomplete, use of
the name server is recommended for sites on the DARPA Internet.

Network addresses are specified in the conventional ``.'' (dot) notation
using the routine from the Internet address manipulation
library, . Host names may contain any printable character other
than a field delimiter, newline, or comment character.

就这样,只要你把你的domain在写入/etc/rc.conf的同时也将它写入到/etc/hosts里就行了.

这种情况我只有虚拟机上发生过,不知道真实的机器会不会也有这种情况.
阅读(1499) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:安装djbdns

给主人留下些什么吧!~~