cd /etc/yum.repos.d/
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.orig
sed -i -e 's/mirrorlist/#mirrorlist/' CentOS-Base.repo
sed -i -e 's/#baseurl/baseurl/' CentOS-Base.repo
sed -i -e 's/lt.mirrors.sohu.com/mirror.centos.org/' CentOS-Base.repo
sed -i -e "39 a set history=1000"/etc/vimrc
sed -i -e "39 a syntax on"/etc/vimrc
sed -i -e "39 a set tabstop=4"/etc/vimrc
sed -i -e "39 a set showmatch"/etc/vimrc
sed -i -e "39 a set vb t_vb="/etc/vimrc
sed -i -e "39 a set mouse=a"/etc/vimrc
sed -i -e "39 a set ignorecase"/etc/vimrc
sed -i -e "39 a set autowrite"/etc/vimrc
sed -i -e "39 a set ruler"/etc/vimrc
#安装完成后做一些基本的设置
#关闭SELINUX
cp /etc/sysconfig/selinux /etc/sysconfig/selinux.save
sed -i '/SELINUX=enforcing/s/SELINUX=enforcing/SELINUX=disabled/'/etc/sysconfig/selinux
#修改主机名,修改俩文件/etc/sysconfig/network和/etc/hosts
sed -i -e "/HOSTNAME/s/^/#/"/etc/sysconfig/network
sed -i -e "$ a HOSTNAME=centos101.hayashi2.com"/etc/sysconfig/network
sed -i -e "/127.0.0.1/c 127.0.0.1 centos101.hayashi2.com centos101 localhost.localdomain localhost"/etc/hosts