2019独角兽企业重金招聘Python工程师标准>>>
#!/bin/bash
printf "============备份/etc/selinux/config\n"
cp /etc/selinux/config /etc/selinux/config.back
printf "============修改配置,关闭selinux\n"
sed -i 's/SELINUX=enforcing/#SELINUX=enforcing/' /etc/selinux/config
sed -i 's/SELINUXTYPE=targeted/#SELINUXTYPE=targeted/' /etc/selinux/config
sed -i '$a SELINUX=disabled' /etc/selinux/config
printf "============关闭selinux\n"
setenforce 0
printf "============安装wget\n"
yum install wget -y
printf "============下载aliyun源\n"
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
printf "============删除旧缓存\n"
yum clean all
printf "============创建新缓存\n"
yum makecache
printf "============更新yum\n"
yum update -y
printf "============安装编译器gcc gcc-c++\n"
yum install gcc gcc-c++ -y