安装Apache无法正常启动的原因

2009-05-13 11:43:29来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

  为在安装成功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
nsswitch.conf(5)
.
     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
named(8)
, 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
ifconfig(8)
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
Center (NIC)
, 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

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Exciting.......

下一篇:如果不安装xauth,DISPLAY变量就不会设置