您的位置:首页 > 运维架构 > Apache

Apache解决error setting limit (Operation not permitted)及could not bind to address 0.0.0.0:80 的方法

2015-01-03 19:07 811 查看


Apache解决error setting limit (Operation not permitted)及could not bind to address 0.0.0.0:80 的方法

在终端执行命令 service apache2 start后,在终端输出如下内容

* Starting web server apache2

/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)

(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

Unable to open logs

Action ‘start’ failed.

The Apache error log may have more information.

[fail]

解决方法:

网上又看到Apache1024以下的端口需要root权限才能执行,所以只需在启动命令前加上sudo就可以了。

参考:http://zhidao.baidu.com/link?url=Z7Gvo7SKY9wOIQX36A5uj4QzuVhL1aBC5Qe14FhU5eMq8bwkkH3uejr5vZc7EM0zvOFhnf4wgvd8Wd2hortLm4M8M9rZvpr_jixeVcxiuay
普通用户只有bind 1024以后的端口的权限。请选择1024以后的端口,或者测试时用root用户。


另外http://blog.sina.com.cn/s/blog_417ad82e0101eomt.html 中给出了关于一些问题的解决方法,可供参考。

解决/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted) 的方法是将 /user/sbin目录下的apache2ctl  文件中的ULIMITE_MAX_FILES修改为=ULIMITE_MAX_FILES “”

注:这里建议注释掉,然后修改,这样可以做到简单恢复。

修改完成后,在终端输入service   Apache2  start后会在终端输出

* Starting web server apache2

(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

Unable to open logs

Action ‘start’ failed.

The Apache error log may have more information.

[fail]

虽然没有完全解决问题,但是已经解决了/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted) 的问题,其实这里我也不清楚是什么问题。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐