900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > linux环境下 普通用户使用service httpd restart 重启Apache失败

linux环境下 普通用户使用service httpd restart 重启Apache失败

时间:2019-03-30 02:27:13

相关推荐

linux环境下 普通用户使用service httpd restart 重启Apache失败

在项目中,linux环境下,修改php.ini 配置文件后,需要重启Apache是配置生效,但是用户为普通用户,执行service httpd restart后,报错如下:

[fst@newgame1 httpd]$ service httpd restart

Stopping httpd: [ OK ]

rm: cannot remove `/var/run/httpd/httpd.pid': Permission denied

Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:8484

(98)Address already in use: make_sock: could not bind to address 0.0.0.0:8484

no listening sockets available, shutting down

Unable to open logs

[FAILED]

出现改问题的原因是,普通用户没有权限进行以上操作。

解决方法是使用sudo指令提升普通用户的权限即可:

[fst@newgame1 httpd]$ sudo service httpd restart

Stopping httpd: [ OK ]

Starting httpd: [ OK ]

这样Apache重启就成功了!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。