Apache no services installed 安装apache后没有服务

建站 码拜 11年前 (2013-05-04) 1911次浏览 0个评论

Apache 2.2安装完之后,右下角的图标却是红色的。放鼠标上去的提示是:No services installed ,很显然,是由于服务没有安装。

解决办法是:

我的安装路径是:C:Program FilesApache Software FoundationApache2.2

1、打开cmd定位到:C:Program FilesApache Software FoundationApache2.2bin

2、输入httpd.exe -k install -n apache2

出现以下提示:

C:Program FilesApache Software FoundationApache2.2bin>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.3 for ServerName

解决这个问题方法:把/conf/httpd.conf文件的#ServerName 前的#去掉,再执行上面的操作。

再输入net start apache2

之后我们看见了成功的信息

C:Program FilesApache Software FoundationApache2.2bin>net start apache2
apache2 服务正在启动 .
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,然后杀之即可。


CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明Apache no services installed 安装apache后没有服务
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!