Linux使用脚本关闭iptables和SELinux.

每次新装系统第一件事就是干掉这俩货.不会用的话就先禁用掉免得惹麻烦.

#! /bin/bash

iptables -F
service iptables save
service iptables stop
chkconfig iptables off

setenforce 0

cp -rf /etc/selinux/config /etc/selinux/config.bk
sed 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config.bk > /etc/selinux/config
原文地址:https://www.cnblogs.com/viator42/p/3517502.html