1.安装Apache
yum -y install httpd
![](https://box.kancloud.cn/c1c7caad56bd08ce06e066c0fd0d0745_522x140.png)
2.开启apache服务
systemctl start httpd.service
![](https://box.kancloud.cn/62daa1309af09aa40fac558e9c8298e6_325x42.png)
3.设置apache服务开机启动
systemctl enable httpd.service
![](https://box.kancloud.cn/a6b416f751aafbc87107b850fba2353e_292x44.png)
4.验证apache服务是否安装成功
# 在浏览器输入你的ip查看IP 方法 ip addr
阿里云直接用外网访问就可以,如下图
![](https://box.kancloud.cn/4642ef3418507a80589c464f5b7b0a3a_1633x799.png)![](https://box.kancloud.cn/4642ef3418507a80589c464f5b7b0a3a_1633x799.png)
5.