首页 新闻 会员 周边

windows8下怎样安装apache

0
悬赏园豆:5 [已关闭问题] 关闭于 2012-12-12 18:14

我是win8企业版,x64的,安了几次都不成功,有安装过的朋友告诉一声

网络终结者的主页 网络终结者 | 初学一级 | 园豆:29
提问于:2012-11-07 11:12
< >
分享
所有回答(1)
0

pache安装完之后,右下角的图标却是红色的。放鼠标上去的提示是:No services installed ,很显然,是由于服务没有安装。
解决办法是:
我的安装路径是:C:\Program Files\Apache Software Foundation\Apache2.2
1、打开cmd定位到:C:\Program Files\Apache Software Foundation\Apache2.2\bin
2、输入httpd.exe -k install -n apache2
出现以下提示:
C:\Program Files\Apache Software Foundation\Apache2.2\bin>httpd.exe -k install -
n apache2
Installing the apache2 service
The apache2 service is successfully installed.
Testing httpd.conf....
Errors reported here must be corrected before the service can be started.
httpd.exe: Could not reliably determine the server's fully qualified domain name
, using 192.168.1.212 for ServerName
解决这个问题方法:把/conf/httpd.conf文件的#ServerName 前的#去掉,再执行上面的操作。
再输入net start apache2
之后我们看见了成功的信息
httpd: Could not reliably determine the server's fully qualified domain name
在windows下安装好apache服务器后,重新启动后,回出现上面的错误,只要把/conf/httpd.conf文件的#ServerName 前的#去掉就好了。
按照以上的方法,仍然无法启动服务,出现以下错误提示:
httpd.exe: Could not reliably determine the server's fully qualified domain name
, using 192.168.0.220 for ServerName
(OS 10048)通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 : make_sock: c
ould not bind to address 0.0.0.0:8080
no listening sockets available, shutting down
Unable to open logs
这是由于80端口被占用了,把占用80端口的进程停掉就可以了。
如何查看那个进程占用了80端口呢?
开始--运行--cmd 进入命令提示符 输入netstat -ano 即可看到所有连接的PID 之后在任务管理器中找到这个PID所对应的程序如果任务管理器中没有PID这一项,可以在任务管理器中选"查看"-"选择列"

经常,我们在启动应用的时候发现系统需要的端口被别的程序占用,如何知道谁占有了我们需要的端口,很多人都比较头疼,下面就介绍一种非常简单的方法
假如我们需要确定谁占用了我们的80端口

Windows平台
在windows命令行窗口下执行:
C:\>netstat -aon|findstr "80"
TCP 127.0.0.1:80 0.0.0.0:0 LISTENING 2448
看到了吗,端口被进程号为2448的进程占用,继续执行下面命令:
C:\>tasklist|findstr "2448"
thread.exe 2016 Console 0 16,064 K
很清楚吧,thread占用了你的端口,Kill it
如果第二步查不到,那就开任务管理器,看哪个进程是2448,然后杀之即可。

网络终结者 | 园豆:29 (初学一级) | 2012-12-12 11:52
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册