1. 安裝Apache組件
[root@mycentos shell]# yum install httpd
2. 安裝成功後,檢測有無httpd進程
[root@mycentos shell]# ps -e |grep httpd
3. 如沒有,啓用該服務
[root@mycentos shell]# systemctl restart httpd.service
4. 使用瀏覽器訪問本機IP地址,如果顯示鏈接失敗如下:
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/basic.target.wants/firewalld.service.
注意:如果你還是希望使用iptables來進行防火牆配置,記得一定要做下面設置:
[root@mycentos Desktop]# yum install iptables-services
[root@mycentos
Desktop]#
systemctl enable iptables