在 CentOS 上启动 Apache 服务,您可以使用以下命令:
打开终端。
输入以下命令以启动 Apache 服务:
sudo systemctl start httpd
sudo systemctl status httpd
如果 Apache 服务已成功启动,您将看到 “Active: active (running)” 的状态信息。
sudo systemctl enable httpd
现在,Apache 服务将在每次系统启动时自动运行。