我使用的Linux版本是Centos 6.4的,然后在输入“sudo systemctl start httpd”时,
提示说command not found,如下所示:

经百度一波后,发现centos 使用 service 命令替代systemctl
如启动服务
service httpd start
查看httpd服务状态
service httpd status

这里记得使用的是root用户哦,不然没有权限。。。。
本文详细介绍了在Centos6.4环境下,如何使用正确的命令启动httpd服务。当尝试使用'sudosystemctlstarthttpd'命令时遇到'commandnotfound'错误,文章提供了替代方案,即使用'servicehttpdstart'命令,并提醒读者需以root用户身份执行,以确保拥有足够的权限。
我使用的Linux版本是Centos 6.4的,然后在输入“sudo systemctl start httpd”时,
提示说command not found,如下所示:

经百度一波后,发现centos 使用 service 命令替代systemctl
如启动服务
service httpd start
查看httpd服务状态
service httpd status

这里记得使用的是root用户哦,不然没有权限。。。。
1375
1万+

被折叠的 条评论
为什么被折叠?