yum install httpd -y ##apache软件
yum install httpd-manual ##apache的手册
systemctl start httpd ##开启apache服务
systemctl enable httpd ##关闭apache服务
firewall-cmd --list-all ##列出火墙信息
firewall-cmd --permanent --add-service=http ##永久允许http
firewall-cmd --reload ##火墙从新加载策略
/var/www/html ##apache的/目录,默认发布目录
/var/www/html/index.html ##apache的默认发布文件
vim /var/www/html/index.html ##写默认发布文件内容
<h1> hello world </h1>
yum install httpd -y
yum install httpd-manual
systemctl start httpd
firewall-cmd --list-all
firewall-cmd --permanent --add-service=http
firewall-cmd --reload
进入 /var/www/html 并 创建index.html 文件 touch index.html
用vi/vim编辑器进入 index.html
输入<h1> hello world </h1>
在浏览器输入http://ip