Linux CentOS部署Apache服务

准备

关闭防火墙

service iptables status #查看是否开启
service iptables stop #临时关闭
chkconfig iptables off #永久关闭

关闭selinux

详见:https://blog.csdn.net/qq_43471489/article/details/125471955

setenforce 0 #临时关闭
#永久关闭需要修改配置文件
vim /etc/sysconfig/selinux

安装

yum install httpd -y

常用命令

重启服务

service httpd restart

目录

html目录

将 html、css、js等放入到下面目录:

/var/www/html

原文出处:https://malaoshi.top/show_1IX5W0pwqLb0.html