#Controller和compute节点
(1)yum源备份
#mv /etc/yum.repos.d/* /opt/
(2)创建repo文件
【controller】
在/etc/yum.repos.d创建centos.repo源文件
[centos]
name=centos
baseurl=file:///opt/centos
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl=file:///opt/iaas-repo
gpgcheck=0
enabled=1
【compute】
在/etc/yum.repos.d创建centos.repo源文件
[centos]
name=centos
baseurl=ftp://192.168.100.10/centos
gpgcheck=0
enabled=1
[iaas]
name=iaas
baseurl=ftp://192.168.100.10/iaas-repo
gpgcheck=0
enabled=1
(3)挂载iso文件
挂载CentOS-7-x86_64-DVD-1804.iso】
[root@controller ~]# mount -o loop CentOS-7-x86_64-DVD-1804.iso /mnt/
[root@controller ~]# mkdir /opt/centos
[root@controller ~]# cp -rvf /mnt/* /opt/centos/
[root@controller ~]# umount /mnt/
【挂载XianDian-IaaS-v2.4.iso】
[root@controller ~]# mount -o loop XianDian-IaaS-v2.4.iso /mnt/
[root@controller ~]# cp -rvf /mnt/* /opt/
[root@controller ~]# umount /mnt/
(4)搭建ftp服务器,开启并设置自启
[root@controller ~]# yum install vsftpd -y
[root@controller ~]# vi /etc/vsftpd/vsftpd.conf
添加anon_root=/opt/
保存退出
[root@controller ~]# systemctl start vsftpd
[root@controller ~]# systemctl enable vsftpd
(5)配置防火墙和Selinux
【controller/compute】
编辑selinux文件
# vi /etc/selinux/config
SELINUX=permissive
关闭防火墙并设置开机不自启
# systemctl stop firewalld.service
# systemctl disable firewalld.service
# yum remove -y NetworkManager firewalld
# yum -y install iptables-services
# systemctl enable iptables
# systemctl restart iptables
# iptables -F
# iptables -X
# iptables -Z
# service iptables save
(6)清除缓存,验证yum源
【controller/compute】
# yum clean all
# yum list