在 CentOS 上配置 Web 服务器,通常使用 Apache 或 Nginx。安装 Apache:sudo yum install httpd,启动服务:sudo systemctl start httpd。