systemctl start firewalld.service#啟動firewall
systemctl stop firewalld.service#停止firewall
systemctl disable firewalld.service#禁止firewall開機啟動
systemctl start iptables.service#啟動
systemctl stop iptables.service#停止iptables
systemctl disable iptables.service#禁止iptables開機啟動
安裝命令:yum -yinstall httpd
配置文件默認路徑:/etc/httpd/conf/httpd.conf
啟動服務命令:systemctl start httpd.service
開機自動啟動:systemctl enable httpd.service
查看狀態:systemctl status httpd.service
查看進程是不是存在:ps -ef | grep httpd
查看端口是不是正在監聽:netstat -lntp
我用的華為雲的服務器,開始因為不熟悉,沒修改安全組策略,沒開放80端口,所以導致一直訪問不到,這個不是防火牆,是雲服務器提供的保護機制,開啟80端口之后就正常了。