在终端以root权限运行以下命令:
yum install httpd -y
启动Apache
systemctl start httpd
设置开机启动
systemctl enable httpd
firewall设置允许远程登录:
firewall-cmd --permanent --add-service=http systemctl restart firewalld
测试Apache
浏览器访问 http://localhost/ or http://server-ip-address/