#!/bin/bash

#颜色字体
red='\033[0;31m'
green='\033[0;32m'
yellow='\033[0;33m'
plain='\033[0m'

#安装基本工具
[ ! -x /usr/bin/wget ] && yum install -y wget
[ ! -x /usr/bin/vim ] && yum install -y vim
[ ! -x /usr/bin/gcc ] && yum install -y gcc
[ ! -x /usr/bin/rsync ] && yum install -y rsync

#关闭selinux
if [ $(getenforce) != "Disabled" ];then
     setenforce 0
     sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
fi

#关闭防火墙
systemctl stop firewalld
systemctl disable firewalld

#cpu核数
cpu_core_num=$(grep processor /proc/cpuinfo |wc -l)

#获取当前脚本运行的目录
workdir=$( cd $( dirname "$0") && pwd )
