免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: dingcic
打印 上一主题 下一主题

[FreeBSD] httpd (no pid file) not running[结贴] [复制链接]

论坛徽章:
0
21 [报告]
发表于 2007-04-12 12:34 |只看该作者
ports安装apache后应该在/etc/rc.conf中加入一行:
apache22_enable="YES"

然后使用:
/usr/local/etc/rc.d/apache22 start

/usr/local/etc/rc.d/apache22 stop
这两个命令启动或者停止apache

如果仍然不能解决问题,请在apache启动后运行:
sockstat | grep :80
把结果贴出来。另外运行一下:
telnet localhost 80
把运行的情况贴出来

论坛徽章:
0
22 [报告]
发表于 2007-04-12 14:42 |只看该作者
原帖由 LnBSD 于 2007-4-12 07:31 发表
  1. echo 127.0.0.1 localhost `hostname` >/etc/hosts
复制代码


我的hosts本来就是这样设的,再用你的方式试过也是没有解决.

论坛徽章:
0
23 [报告]
发表于 2007-04-12 14:43 |只看该作者
原帖由 大大狗 于 2007-4-12 10:22 发表
我的 hosts 是这样的


我按你的方式:
::1                     localhost localhost.power.local
127.0.0.1           localhost localhost.power.local
::1                     power.local power
127.0.0.1           power.local power

问题依然

论坛徽章:
0
24 [报告]
发表于 2007-04-12 14:46 |只看该作者
原帖由 isjfk 于 2007-4-12 12:34 发表
ports安装apache后应该在/etc/rc.conf中加入一行:
apache22_enable="YES"

然后使用:
/usr/local/etc/rc.d/apache22 start

/usr/local/etc/rc.d/apache22 stop
这两个命令启动或者停止apac ...


我的rc.conf:
accf_data_load="YES"
accf_http_load="YES"
apache22_enable="YES"
apache22_http_accept_enable="YES"

用你的方式启动停止:
power# /usr/local/etc/rc.d/apache22 start
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
power# /usr/local/etc/rc.d/apache22 stop
apache22 not running? (check /var/run/httpd.pid).
power#

用你的方式启动查看:
power# /usr/local/etc/rc.d/apache22 start
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
power# sockstat |grep :80
power# sockstat -4
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
lytumirrorsshd      762   3  tcp4   192.168.3.90:22       192.168.3.80:4870
root     sshd       759   3  tcp4   192.168.3.90:22       192.168.3.80:4870
root     snmpd      716   6  udp4   *:161                 *:*
root     sshd       698   3  tcp4   *:22                  *:*
mysql    mysqld     674   5  tcp4   127.0.0.1:3306        *:*
power#

telnet本机:
power# telnet localhost 80
Trying ::1...
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
telnet: Unable to connect to remote host
power# .

[ 本帖最后由 dingcic 于 2007-4-12 14:48 编辑 ]

论坛徽章:
0
25 [报告]
发表于 2007-04-12 14:51 |只看该作者
再贴下我的top:
last pid:   917;  load averages:  0.00,  0.00,  0.00                                                 up 0+00:17:54  14:49:14
33 processes:  1 running, 32 sleeping
CPU states:  0.0% user,  0.0% nice,  0.0% system,  0.0% interrupt,  100% idle
Mem: 42M Active, 16M Inact, 26M Wired, 24M Buf, 413M Free
Swap: 2048M Total, 2048M Free

  PID USERNAME    THR PRI NICE   SIZE    RES STATE  C   TIME   WCPU COMMAND
  762 lytumirror    1  96    0  6228K  3272K select 0   0:00  0.00% sshd
  766 root          1  20    0  4996K  3088K pause  0   0:00  0.00% csh
  674 mysql         4  20    0   150M 18504K kserel 0   0:00  0.00% mysqld
  759 root          1   4    0  6276K  3288K sbwait 0   0:00  0.00% sshd
  917 root          1  96    0  2352K  1608K CPU0   0   0:00  0.00% top
  716 root          1 100    0  4032K  3316K select 0   0:00  0.00% snmpd
  765 lytumirror    1   8    0  1776K  1404K wait   0   0:00  0.00% su
  638 mysql         1   8    0  1728K  1312K wait   0   0:00  0.00% sh
  510 root          1  96    0  1376K   980K select 0   0:00  0.00% syslogd
  763 lytumirror    1   8    0  1756K  1372K wait   0   0:00  0.00% sh
  705 root          1   8    0  1388K  1100K nanslp 0   0:00  0.00% cron
  750 root          1   5    0  1344K   952K ttyin  0   0:00  0.00% getty
  753 root          1   5    0  1344K   952K ttyin  0   0:00  0.00% getty
  756 root          1   5    0  1344K   952K ttyin  0   0:00  0.00% getty
  752 root          1   5    0  1344K   952K ttyin  0   0:00  0.00% getty
  754 root          1   5    0  1344K   952K ttyin  0   0:00  0.00% getty
  757 root          1   5    0  1344K   952K ttyin  0   0:00  0.00% getty
  751 root          1   5    0  1344K   952K ttyin  0   0:00  0.00% getty
  755 root          1   5    0  1344K   952K ttyin  0   0:00  0.00% getty
  698 root          1  96    0  3524K  2708K select 0   0:00  0.00% sshd
  840 nobody        1   4    0  8632K  5996K accept 0   0:00  0.00% httpd
  895 nobody        1   4    0  8632K  5996K accept 0   0:00  0.00% httpd
  827 nobody        1   4    0  8632K  5996K accept 0   0:00  0.00% httpd
  912 nobody        1   4    0  8632K  5996K accept 0   0:00  0.00% httpd
  758 nobody        1   4    0  8632K  6012K accept 0   0:00  0.00% httpd
  859 nobody        1   4    0  8632K  5996K accept 0   0:00  0.00% httpd
  810 nobody        1   4    0  8632K  5996K accept 0   0:00  0.00% httpd
  626 root          1  96    0  1288K   824K select 0   0:00  0.00% usbd
  466 root          1  96    0   528K   388K select 0   0:00  0.00% devd
  130 root          1  20    0  1252K   728K pause  0   0:00  0.00% adjkerntz

机器刚启动起来的时候就已经有一个httpd在top里能看到.再apachectl start后会增加httpd.好象第次增加两个.apachectl stop不会减少httpd.
我用pkill httpd后,再启动还是老样子

论坛徽章:
0
26 [报告]
发表于 2007-04-12 23:19 |只看该作者
没有人帮忙了?

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
27 [报告]
发表于 2007-04-12 23:30 |只看该作者
原帖由 dingcic 于 2007-4-12 14:43 发表


我按你的方式:
::1                     localhost localhost.power.local
127.0.0.1           localhost localhost.power.local

::1                     power.local power
127.0.0.1           power ...


红色部分改成 127.0.0.1 localhost.power.local localhost
                   ::1            localhost.power.local localhost

论坛徽章:
0
28 [报告]
发表于 2007-04-12 23:37 |只看该作者
原帖由 大大狗 于 2007-4-12 23:30 发表


红色部分改成 127.0.0.1 localhost.power.local localhost
                   ::1            localhost.power.local localhost



#
#
127.0.0.1               localhost.power.local localhost
::1                     localhost.power.local localhost
::1                     power.local power
127.0.0.1               power.local power
192.168.3.90            power.local

#
# Imaginary network.
#10.0.0.2               myname.my.domain myname
#10.0.0.3               myfriend.my.domain myfriend
#
# According to RFC 1918, you can use the following IP networks for
# private nets which will never be connected to the Internet:
#
#       10.0.0.0        -   10.255.255.255
#       172.16.0.0      -   172.31.255.255
#       192.168.0.0     -   192.168.255.255
#
# In case you want to be able to connect to the Internet, you need
# real official assigned numbers.  Do not try to invent your own network
# numbers but instead get one from your network provider (if any) or
# from your regional registry (ARIN, APNIC, LACNIC, RIPE NCC, or AfriNIC.)
#
~
~
~
~
~
~
~
~
/etc/hosts: 35 lines, 1169 characters.
power# pkill httpd
power# apachectl start
power# apachectl stop
httpd (no pid file) not running
power#

如故

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
29 [报告]
发表于 2007-04-12 23:44 |只看该作者
实在不行就 make reinstall

论坛徽章:
0
30 [报告]
发表于 2007-04-12 23:45 |只看该作者
原帖由 大大狗 于 2007-4-12 23:44 发表
实在不行就 make reinstall

只有这个办法了?我就想弄明白它.应该有办法的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP