安装Apache2.4[httpd]
yum install httpd
增加软件源
默认软件源中没有PHP7.2,需要epel软件源和webtatic软件源
rpm -Uvh https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
安装PHP7.2
yum install php72w-common php72w-cli php72w-devel php72w-ldap php72w-mbstring php72w-mysql
参考:https://blog.csdn.net/zhezhebie/article/details/73325663
启动httpd并设置开机启动
systemctl enable httpd.service
systemctl start httpd.service
在防火墙中开放80端口
firewall-cmd --add-port=80/tcp
firewall-cmd --permanent --add-port=80/tcp
打开浏览器输入IP能看到欢迎页即一切正常