免安装版apache注册window服务
来源:互联网 发布:360 云盘mac如何使用 编辑:程序博客网 时间:2024/06/09 15:33
安装apache:
从官网下载apache2.2.29发现是免安装版的。首先就需要对apache注册服务
把apache拷贝到一个目录下,打开cmd
执行
httpd.exe -k install -n apache2
D:\tools\Apache22\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: Syntax error on line 35 of D:/tools/Apache22/conf/httpd.conf: ServerR
oot must be a valid directory
出现error,提示ServerRoot目录错误,修改为conf/httpd.conf文件中ServerRoot 为"D:\tools\Apache22",apache所在的目录
再次执行httpd.exe -k install -n apache2发现
D:\tools\Apache22\bin>httpd.exe -k install -n apache2
[Mon Apr 20 16:07:54 2015] [error] apache2: Service is already installed.
该服务已存在
说明已经安装上了,刚才是测试报错。
下面开始启动apache
D:\tools\Apache22\bin>net start apache2
apache2 服务正在启动 .
apache2 服务无法启动。
又出现报错,说明配置文件还有错误。免安装版真费劲!
查看log,没有记录日志。只能删掉window的服务,再次安装查看错误
删除服务命令:
D:\tools\Apache22\bin>sc delete apache2
[SC] DeleteService 成功
再次安装:
D:\tools\Apache22\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.
Syntax error on line 179 of D:/tools/Apache22/conf/httpd.conf:
DocumentRoot must be a directory
提示DocumentRoot错误
修改为conf/httpd.conf文件中DocumentRoot为 "D:\tools\Apache22\htdocs"
检查一下conf文件中是否还有别的这样路径的错误,有就修改过来
再次启动发现还有错误,重新安装服务:
D:\tools\Apache22\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.
Syntax error on line 110 of D:/tools/Apache22/conf/extra/httpd-ahssl.conf:
SSLCertificateFile: file 'D:/Apache22/conf/ssl/server.crt' does not exist or is
empty
是ssl验证错误,从目录结构看,也是路径的问题,不过我这里暂时不需要ssl,这个模块用不到,就先注释掉。重新启动
D:\tools\Apache22\bin>net start apache2
apache2 服务正在启动 .
apache2 服务已经启动成功。
服务启动成功!
打开浏览器访问http://127.0.0.1(默认端口80)
从官网下载apache2.2.29发现是免安装版的。首先就需要对apache注册服务
把apache拷贝到一个目录下,打开cmd
执行
httpd.exe -k install -n apache2
D:\tools\Apache22\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: Syntax error on line 35 of D:/tools/Apache22/conf/httpd.conf: ServerR
oot must be a valid directory
出现error,提示ServerRoot目录错误,修改为conf/httpd.conf文件中ServerRoot 为"D:\tools\Apache22",apache所在的目录
再次执行httpd.exe -k install -n apache2发现
D:\tools\Apache22\bin>httpd.exe -k install -n apache2
[Mon Apr 20 16:07:54 2015] [error] apache2: Service is already installed.
该服务已存在
说明已经安装上了,刚才是测试报错。
下面开始启动apache
D:\tools\Apache22\bin>net start apache2
apache2 服务正在启动 .
apache2 服务无法启动。
又出现报错,说明配置文件还有错误。免安装版真费劲!
查看log,没有记录日志。只能删掉window的服务,再次安装查看错误
删除服务命令:
D:\tools\Apache22\bin>sc delete apache2
[SC] DeleteService 成功
再次安装:
D:\tools\Apache22\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.
Syntax error on line 179 of D:/tools/Apache22/conf/httpd.conf:
DocumentRoot must be a directory
提示DocumentRoot错误
修改为conf/httpd.conf文件中DocumentRoot为 "D:\tools\Apache22\htdocs"
检查一下conf文件中是否还有别的这样路径的错误,有就修改过来
再次启动发现还有错误,重新安装服务:
D:\tools\Apache22\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.
Syntax error on line 110 of D:/tools/Apache22/conf/extra/httpd-ahssl.conf:
SSLCertificateFile: file 'D:/Apache22/conf/ssl/server.crt' does not exist or is
empty
是ssl验证错误,从目录结构看,也是路径的问题,不过我这里暂时不需要ssl,这个模块用不到,就先注释掉。重新启动
D:\tools\Apache22\bin>net start apache2
apache2 服务正在启动 .
apache2 服务已经启动成功。
服务启动成功!
打开浏览器访问http://127.0.0.1(默认端口80)
出现一个apache的页面或者It works!则安装成功!
附;apache官网免安装版apache2.2.29 64位(最讨厌在blog里面balabala说一大堆,最后想下载的时候毛都找不到)
0 0
- 免安装版apache注册window服务
- 免安装版Tomcat注册Windows服务
- Apache服务免安装版配置
- Window下mysql免安装版安装、卸载多服务
- 免安装版的Tomcat注册为windows服务
- Tomcat 免安装版注册为系统服务
- 免安装版的Tomcat注册为windows服务
- 绿色免安装版myql注册删除服务指令
- window下为apache注册服务
- Mysql Window 免安装版
- 免安装版的Tomcat注册为windows服务---解读(转)
- 如何将免安装版的TOMCAT注册成系统服务
- 将免安装的tomcate注册为服务
- 自己动手打造Apache绿色免安装版
- apache免安装
- Mysql免安装版配置服务
- window下免安装PostgreSQL
- window下免安装PostgreSQL
- rubymine 入门简单例子教程
- 正式入驻CSDN
- java.lang.NoSuchMethodException: com.sun.proxy.$Proxy
- ios8 远程推送的注册代码
- c1 驾考成都龙岗科目三考试经验
- 免安装版apache注册window服务
- 论文图片编辑
- Why is machine learning used heavily for Google's ad ranking and less for their search ranking?
- CUnit详解(基于linux下的白盒单元测试)
- LCS的两种解法比较
- 多个applicationContext.xml互相引用
- POI导入导出Excel模板···
- 黑马程序员——c语言函数的基本认识
- iOS后台定位实现