#!/bin/bash
#Auther jia.yu
#version v1.0
SELINUX_state=`getenforce`
FIREWALL_state=`systemctl status firewalld | awk 'NR==3 {print $2}'`
#stop firewall
if [ $FIREWALL_state = 'active' ];then
systemctl stop firewalld
systemctl disable firewalld
else
echo "firewall is already stopped,nothing to do"
fi
#disable selinux
if [ $SELINUX_state = 'Enforcing' ];then
sed -i "s#SELINUX=enforcing#SELINUX=disabled#g" /etc/selinux/config
else
echo "selinux is already disabled,nothing to do."
fi
#yum install tools
yum -y install wget vim net-tools yum-utils lrzsz git
#vim syntax
echo "alias vi='vim'">> /etc/bashrc
echo "export LS_OPTIONS='--color=auto'">> /etc/bas
五、【云原生 | Kubernetes篇】docker/k8s系统一键初始化脚本
于 2022-06-27 16:39:29 首次发布