本文摘自PHP中文网,作者coldplay.xixi,侵删。
centos关闭防火墙命令:1、临时关闭,代码为【systemctl stop firewalld】;2、禁止开机启动,代码为【systemctl disable firewalld】。

本文操作环境:Windows7系统,centos6&¢os7版本,Dell G3电脑。
centos关闭防火墙命令:
CentOS6关闭防火墙使用以下命令,
1 2 3 4 | service iptables stop
chkconfig iptables off
|
CentOS7中若使用同样的命令会报错,
1 2 | stop iptables.service
Failed to stop iptables.service: Unit iptables.service not loaded.
|
这是因为CentOS7版本后防火墙默认使用firewalld,因此在CentOS7中关闭防火墙使用以下命令,
1 2 3 4 5 6 | systemctl stop firewalld
systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
|
当然,如果安装了iptables-service
,也可以使用下面的命令,
阅读剩余部分
相关阅读 >>
CentOS怎么使用ssh远程连接
CentOS7怎么开启vnc服务
CentOS控制台乱码怎么办
CentOS无法进入图形界面
详解CentOS ssh安装与配置
CentOS怎么卸载jdk
CentOS如何修改php.ini
CentOS磁盘空间不足怎么办
如何清理CentOS垃圾
CentOS如何共享文件夹?
更多相关阅读请进入《CentOS》频道 >>
转载请注明出处:木庄网络博客 » centos关闭防火墙命令是什么