在cygwin上运行apache2

cygwin上运行linux软件是很方便啦,不过像httpd这样的后台守护进程,还需要一些帮助才行。

安装cygwin时选中apache httpd。
安装cygserver。(好像叫cygrunserver)
执行/usr/bin/cygserver-config。会在windows的服务中生成CYGWIN cygserver

$ /usr/bin/cygserver-config
Generating /etc/cygserver.conf file
Warning: The following function requires administrator privileges!
Do you want to install cygserver as service?
(Say "no" if it's already installed as service) (yes/no) yes
The service has been installed under LocalSystem account.
To start it, call `net start cygserver' or `cygrunsrv -S cygserver'.
Further configuration options are available by editing the configuration
file /etc/cygserver.conf. Please read the inline information in that
file carefully. The best option for the start is to just leave it alone.
Basic Cygserver configuration finished. Have fun!

启动cygserver

$ net start cygserver
CYGWIN cygserver 服务正在启动 .
CYGWIN cygserver 服务已经启动成功。

配置/etc/apache2/httpd.conf并启动apache

$ /usr/sbin/apachectl2 -k start

如果未启动cygserver直接启动apache,会发生下面错误。

/usr/sbin/apachectl2: line 78: 3088 Bad system call

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值