在Ubuntu上启动Apache2服务器,你可以使用以下命令:
打开终端(快捷键:Ctrl + Alt + T)
输入以下命令来启动Apache2服务:
sudo systemctl start apache2
sudo systemctl enable apache2
sudo systemctl status apache2
如果Apache2已成功启动,你应该会看到类似于以下的输出:
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: active (running) since ...
现在,你的Apache2服务器已经在Ubuntu上启动并运行了。你可以通过访问http://your_server_ip_address
来查看默认的Apache2欢迎页面。