背景:由于自己买了一台阿里云的服务器,就想着自己在服务器上搭建wordpress用于将来自己写博客使用。无奈访问服务器外网ip无法出现安装的界面。检查了安全组后发现安全组设置是正常的,再检查防火墙,防火墙开着导致无法访问。
CentOS 7.0默认使用的是firewall作为防火墙
查看防火墙状态
firewall-cmd --state
停止firewall
systemctl stop firewalld.service
禁止firewall开机启动
systemctl disable firewalld.service
关闭selinux
进入到/etc/selinux/config文件
vi /etc/selinux/config
将SELINUX=enforcing改为SELINUX=disabled
如果安装了iptables-service也可以使用下面的命令,
yum install -y iptables-services
//关闭防火墙
service iptables stop
//检查防火墙状态
service iptables status