#修改主机名
hostnamectl set-hostname host
echo "192.168.0.101 host " >> /etc/hosts
#
#下载阿里源
#wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
#yum clean all && yum makecache
#
#关闭防火墙
#systemctl stop firewalld && systemctl disable firewalld
#
#设置SELinux
#setenforce 0
#sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
#
#修改openstack的baseurl为阿里云地址
cat > /etc/yum.repos.d/CentOS-OpenStack-rocky.repo <<EFO
[centos-openstack-rocky]
name=CentOS-7 - OpenStack rocky
baseurl=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-rocky/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
exclude=sip,PyQt4
EFO
#
#配置一下QEMU的baseurl为阿里云地址
cat > /etc/yum.repos.d/CentOS-QEMU-EV.repo << EFO
[centos-qemu-ev]
name=CentOS-$releasever - QEMU EV
baseurl=https://mirrors.aliyun.com/centos/7/vi