#!/bin/bash
# install centos7 or rhel6.5
read -p "please select what version do you want to install, centos7 or rhel6.5: " version
if [ "$version" = "centos7" ]
then
echo "===*stop firewalld,NetworkManager,selinux*==="
systemctl disable firewalld
systemctl disable NetworkManager
setenforce 0
else
echo "===*stop firewalld,NetworkManager,selinux*==="
chkconfig iptables off
chkconfig NetworkManager off
setenforce 0
fi
参考文档:https://blog.csdn.net/qq_34889607/article/details/81901767