#!/bin/bash
# 安装EPEL
yum -y localinstall ftp://10.1.1.1/epel-release-latest-7.noarch.rpm

# 更新REPO文件为内网源
curl -o /etc/yum.repos.d/CentOS-Base.repo ftp://10.1.1.1/centos7.repo
curl -o /etc/yum.repos.d/epel.repo ftp://10.1.1.1/epel7.repo

# 卸载rh自带包
yum -y remove rhnlib redhat-support* subscription-manager
rpm -e –nodeps redhat-release-server redhat-logos
rm -rf /usr/share/redhat-release* /usr/share/doc/redhat-release*

# 安装centos重要文件
yum -y install centos-release yum centos-logos
yum clean all
yum -y update

# 禁用墙
systemctl disable firewalld