创建两个虚拟机
控制节点controller
计算节点compute
先将Xiandian镜像和centos镜像上传
机选节点加两个硬盘
磁盘分区分区
fdisk /dev sdb
fdisk /dev sdc
编辑文件
vi /etc/selinux/config
找到SELINUX=enforcing这一行
将enforcing替换成permissive
清除iptables规则关闭防火墙(两台虚拟机都要进行)
setenforce 0
iptables -F
iptables -X
iptables -Z
iptables-save
systemctl stop firewalld
systemctl disable firewalld
上传镜像
CentOS-7.2-x86_64-DVD-1511.iso /opt/centos
XianDian-IaaS-v2.2.iso
创建两个目录centos和iaas
mkdir /opt/centos
mkdir /opt/iaas
将镜像文件挂载到指定的目录
[root@controller ~]# mount -o loop /root/CentOS-7.2-x86_64-DVD-151.iso /opt/centos
[root@controller ~]# mount -o loop /root/XianDian-IaaS-v2.2.iso /opt/iaas/
控制节点
删除原来的yum源文件
rm -rvf /etc/yum.repos.d/*
配置新的yum源文件
vi /etc/yum.repos.d/local.repo
[centos]
name=centos
baseurl=file:///opt/centos
enabled=1
gpgcheck=0
[iaas]
name=iaas
baseurl=file:///opt/iaas/iaas-repo
enabled=1
gpgcheck=0
检查yum源是否生效
安装ftp服务并启动
[root@controller ~]# yum install -y vsftpd
[root@controller ~]# vi /etc/vsftpd/vsftpd.conf
在最后添加anon_root=/opt
计算节点
配置yum源
rm -rvf /etc/yum.repos.d/*
vi /etc/yum.repos.d/local.repo
[centos]
name=centos
baseurl=ftp://192.168.100.10/centos
enable