1、基础平台linux
1.一台装有VMware的windows系统(可联网)canvas
2.CentOS 7.1 64bit镜像vim
2、最小化安装两台CentOS 7.1 的虚拟机controller、compute1,要求以下:windows
controller:内存2G、硬盘100G、CPU 2核(勾选Virtualization engine中:Virtualize Intel VT-x/EPT or AMD-V/RVI,不然后期建立实例报错)、网卡2个工具
compute1: 内存4G、硬盘100G、CPU 2核(勾选Virtualization engine中:Virtualize Intel VT-x/EPT or AMD-V/RVI,不然后期建立实例报错)、网卡2个spa
系统最小化安装、关闭firewalld、selinux:rest
systemctl stop firewalld.service systemctl disable firewalld.service sed -i '/SELINUX/s/enforcing/disabled/g' /etc/sysconfig/selinux setenforce 0
3、网卡配置code
网卡数目及配置参照官网(官网有绘制的结构图,能够对应着看一下);因为是在虚拟机搭建,网卡模式的选择这里不作过多讲解,可查看相关资料orm
controller:server
ens33:10.0.0.11/24(NAT)
ens34: 作外部接口,不配置IP(桥接)
配置ens34保证以下:
vim /etc/sysconfig/network-scripts/ifcfg-ens34 DEVICE=ens34 TYPE=Ethernet ONBOOT="yes" BOOTPROTO="none"
compute1:
ens33:10.10.0.31/24(NAT)
ens34:作外部接口,不配置IP(桥接)
配置ens34保证以下:
vim /etc/sysconfig/network-scripts/ifcfg-ens34
DEVICE=ens34 TYPE=Ethernet ONBOOT="yes" BOOTPROTO="none"
4、绑定hosts
在各节点/etc/hosts文件中添加以下:
# controller
最好重启系统:
reboot
5、验证各节点连通性
yum -y install net-tools ntp ntpdate vim
compute1:
yum -y install net-tools ntpdate vim
7、配置各节点时间同步
controller:
cat /etc/ntp.conf | grep -v "#" | grep -v ^$ driftfile /var/lib/ntp/drift restrict default nomodify notrap nopeer noquery restrict 127.0.0.1 restrict ::1 restrict 10.0.1.0 mask 255.255.255.0 nomodify notrap restrict 10.0.0.0 mask 255.255.255.0 nomodify notrap server s2m.time.edu.cn iburst includefile /etc/ntp/crypto/pw keys /etc/ntp/keys disable monitor
systemctl stop ntpd; ntpdate s2m.time.edu.cn;/sbin/hwclock -w;systemctl start ntpd
compute1:
crontab -e */5 * * * * /usr/sbin/ntpdate 10.0.0.11; /sbin/hwclock -w /usr/sbin/ntpdate 10.0.0.11; /sbin/hwclock -w