centos学习笔记-安装配置apache

1.安装apache

#yum install httpd

2.配置开机启动

systemctl enable httpd

3.修改防火墙设置允许80端口通过

firewall-cmd --permanent --zone=public --add-service=http

firewall-cmd --permanent --zone=public --add-service=https

firewall-cmd --reload

4.浏览器打开地址输入ip地址检查是否有测试页面

5.在/var/www/html/目录下添加一个名为index.html的网页文件

猜你喜欢

转载自www.cnblogs.com/renren-study-notes/p/10464315.html