linux下apache启动出错:Permission denied: make_sock: could not bind to address

之前自己编译安装的apache/php/mysql——什么,连mysql也自己编译?很正常,学习嘛—— 当时是好好的,今天启动却出错了,直接运行./httpd也一样:

[feng@localhost bin]$ ./apachectl start
httpd: Could not reliably determine the server’s fully qualified domain name, using localhost.localdomain for ServerName
(13)Permission denied: make_sock: could not bind to address [::]:80
(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

同时seLinux报警,这两行是主要的错误

(13)Permission denied: make_sock: could not bind to address [::]:80
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
毫无疑问,是权限拒绝,但之前为什么是好的呢

突然发现当前运行的账号是普通账号,而非管理员,这难怪,普通账号默认无权启动监听80端口的,su一下,输入密码,很顺利的正常启动了,当然这一行错误还是有的:

httpd: Could not reliably determine the server’s fully qualified domain name, using localhost.localdomain for ServerName

,这无所谓,没有绑定域名,反正是本机运行的。

发表评论?

0 条评论。

发表评论