首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法在CentOS 7上启动服务

无法在CentOS 7上启动服务
EN

Server Fault用户
提问于 2020-09-13 10:02:14
回答 1查看 1.6K关注 0票数 1

突然,我无法在我的VPS(CentOS 7)上启动服务。例如,

代码语言:javascript
复制
service httpd start
Redirecting to /bin/systemctl start  httpd.service
Authorization not available. Check if polkit service is running or see debug message for more information.
Failed to start httpd.service: Connection timed out
See system logs and 'systemctl status httpd.service' for details.

这可能是因为我用作主机名的域名已过期。我不知道服务命令背后的逻辑。我启动httpd,为什么它要调用polkit服务?polkit服务也已死亡,无法启动。"service polkit status -l“命令显示了一条消息:

代码语言:javascript
复制
Lost the name org.freedesktop.PolcyKit1 - exiting

如何解决这个问题?

EN

回答 1

Server Fault用户

回答已采纳

发布于 2020-09-13 15:07:06

您需要使用sudo

代码语言:javascript
复制
[user@localhost ~]$ sudo systemctl start httpd

或以root身份登录

代码语言:javascript
复制
[root@localhost ~]# systemctl start httpd

以便启动和停止服务。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/1033709

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档